ycsb - Why does MongoDB perform better with multi-threaded client compared to a single threaded client? -


we benchmarked oracle 10g , mongodb ycsb ( https://github.com/brianfrankcooper/ycsb/wiki ), when tried increase number of threads 1,000,000 datasets, oracle's performance remained constant after 4 threads mongodb kept on performing better , better till 8 threads , after reads better, writes , updates (operations/sec) remained constant.

we ran benchmark on 2 cpu xeon quad core (total 8 cores) + 8 gb ram on lan.

what observed mongodb performed better multi-threaded client comparing single-threaded client, question is: when mongodb can perform better more load why can't same less load (say couple of threads) utilizing multiple cores?

it logically simple process request on single core. have code receives request, , deals it.

it not simple process single request on 2 cores, because doing requires break request components, farm out work, synchronize answers, , build single response. , if work, while can reduce wallclock time (how time clock on wall sees pass), you're invariably going make request take more cpu time (total cpu resources consumed).

in system mongodb expect have lot of different clients making requests, there no need try parallelize handling of single request, , every reason not to.

the bigger question why oracle didn't increase concurrency after 4 cpus. there number of possible reasons, 1 reasonable guess encountered sort of locking needed guarantee consistency. (mongodb not offer consistency, , avoids type of bottleneck.)


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -