简体   繁体   English

Mongodb写入性能令人困惑

[英]Mongodb write performance is confusing

I did a write performance test in MongoDB using YCSB and it is producing the confusing result,我使用 YCSB 在 MongoDB 中做了一个写性能测试,它产生了令人困惑的结果,

在此处输入图片说明

./bin/ycsb load mongodb -s -P workloads/workloada -p recordcount=10000 -threads $tread_count -p mongodb.url="mongodb://testuser:testpassword@12.18.56.14:27017/admin" -p mongodb.auth="true"

Consider the 10K write performance result with different threads (Execution in Parallel using YCSB) when the number of threads are increasing from 4 to 128, I expected the decrease in total time and increase in operations per second考虑当线程数从 4 增加到 128 时,不同线程(使用 YCSB 并行执行)的 10K 写入性能结果,我预计总时间会减少,每秒操作数会增加

But in 128 threads for 10K count, It shows a sudden increase in Total time and Decrease in Operations per second, Is it expected?但是在 10K 计数的 128 个线程中,它显示总时间突然增加,每秒操作数减少,这是预期的吗? If so could someone explain it please.如果是这样,请有人解释一下。

Thanks,谢谢,
Harry哈利

As the number of threads goes up, locking overhead and lock contention increase.随着线程数量的增加,锁定开销和锁争用也会增加。 Eventually adding more threads no longer improves performance.最终添加更多线程不再提高性能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM