Where the open source database community meets: Use code PERCONA75 and secure your spot for Percona Live.  Register

MongoDB 3.2 WiredTiger in iiBench

December 15, 2015
Author
Vadim Tkachenko
Share this Post:

MongoDBMongoDB 3.2 was recently released with WiredTiger as the default storage engine.

In just over five years, MongoDB has evolved into a popular database. MongoDB 3.0 supported “pluggable storage engines.” The B-Tree-based WiredTiger should outperform IO-optimized RocksDB and PerconaFT in in-memory workloads, but it demonstrates performance degradation when we move into IO workloads.

There are reports that WiredTiger 3.2 comes with improved performance, so I ran a quick benchmark against WiredTiger 3.0.

My interest is in not only the absolute performance, but also how it performs during checkpointing. In my previous test we saw periodic drops:  https://www.percona.com/blog/2015/07/14/mongodb-benchmark-sysbench-mongodb-io-bound-workload-comparison/.

For this test I am using iiBench by Mark Callaghan: https://github.com/mdcallag/iibench-mongodb.

WiredTiger command line:

Storage: Intel SSD DC P3600 SSD 1.6TB
Server: Bare Metal powered by Intel(R) Xeon(R) CPU E5-2680

For workload, I inserted 200 million records with 1 index.

The results (click on image to get higher resolution):

wt32

WiredTiger 3.2 is indeed faster. It finished in 31 min (compared to 51 min for WiredTiger 3.0).

However, the performance stalls are still there. There are periods of one minute or longer when WiredTiger refuses to process data.

0 0 votes
Article Rating
Subscribe
Notify of
guest

18 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Mark Callaghan
10 years ago

iibench-mongodb is from Tim, not sure he has merged all of my changes
https://github.com/tmcallaghan/iibench-mongodb

Attila Tozser (@ATozser)

Why the syncdelay was increased to that high?

leafonsword
10 years ago

WiredTiger also support LSM-Tree besides B-Tree,while LSM-Tree seems have better IO performance;So you should also have a test with LSM-Tree

Mark Callaghan
10 years ago
Reply to  leafonsword

The WiredTiger LSM is not officially supported (yet). The current choices for write-optimized engines are RocksDB (MongoRocks) and Toku.

Attila Tozser (@ATozser)

If the result was the same with 60 sec. it means that the checkpointing plays no role here (maybe worth to try a low number instead). Would be interesting to see the IO stats of the OS. It could be OS or HW level issue. Filesystem, volume manager, blockdevice settings or OS dirty cache flush driven direct IO. In your previous test linked in the post, the performance is constant, (still with the drops, but constant.) There are/were BUGs in wiredTiger around bad throughput but they are related to oplog functionality, how wiredTiger is mocking capped collections, this part mostly should be worked around in mongodb 3.2 but the ticket you linked supports this. Still i would say this is OS related.

Dennis
10 years ago

Vadim, I am willing to bet a large amount of beer that the “stall periods” that you are seeing are not on MongoDB side but rather represent a bottleneck in your SSD. I would recommend you to run an iometer load test on the same hardware with a similar stress pattern (aggressive random writes), and you will see that the load test will periodically stall because your SSD gets overwhelmed and takes a time out.

Mark Callaghan
10 years ago
Reply to  Dennis

There were several bugs opened for WT stalls in the 2.6/3.0 release cycle. Here is one still open for 3.2.
https://jira.mongodb.org/browse/SERVER-16575

Attila Tozser (@ATozser)

Based on the specs, this Intel PCI flash can do like 56.000 random writes a second (peak in a well distributed workload, with many threads, i assume). Which is a lot, though at least in the beginning of the tests you are doing a lot more than that in MongoDB. And we can say that is by design behavior of MongoDB,(arguably unlucky it is doing lots of random ios), but for sure at 300k ops, you saturate the SSD card.

Alex Malafeev
9 years ago

An iops on a disk is not necessarily what mongo/os/filesystem is doing when it processes and batches writes. I would bet large amount of sparkling water that checking iostat -x 1 would show the drive not really being saturated.

Bob
Bob
10 years ago

Why no details? What was your iibench config? Not even any info about how many threads were doing insert? Nothing about how disk was configured? xfs? ext4 is not recommended by mongodb docs and xfs is. was journal on separate device? why did you turn off journal compression? If results are practically the same with default settings, why not measure default settings that the rest of the world use?

Van
Van
10 years ago

Vadim, Can you post the /etc/mongod.conf that you used for the test involved WiredTiger ?

Alex Malafeev
9 years ago

Was the size of the inserted collection + indexes larger than ram? We typically see these kinds of things when the working set (used% and/or dirty% via mongostat) get above 80%, which is where the default config stutters. Interestingly enough in my testing the disk is not the limiting factor in the sense that a 4k write benchmark via fio or whatever can push the disk quite a bit more.

(crossposted from the dzone article too)

Far
Enough.

Said no pioneer ever.
MySQL, PostgreSQL, InnoDB, MariaDB, MongoDB and Kubernetes are trademarks for their respective owners.
© 2026 Percona All Rights Reserved