[SERVER-16626] wiredtiger group commit too slow for single-threaded workloads Created: 22/Dec/14 Updated: 24/Jan/15 Resolved: 22/Dec/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 2.8.0-rc3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mark Callaghan | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Steps To Reproduce: | Run iibench – https://github.com/tmcallaghan/iibench-mysql Start mongod by: mongod --config /data/mysql/mongo.28/mongo.conf --storageEngine wiredTiger Using this mongo.conf. Repeating the test with journal compression enabled makes no difference. |
| Participants: |
| Description |
|
I ran iibench (https://github.com/tmcallaghan/iibench-mysql) changed to insert 1 document per write and fsync enabled. My storage is fast (PCIe flash). With 10 threads I get more than 10,000 docs inserted per second. When I change to 1 thread I get ~20 docs inserted per second (or 1 per 50 milliseconds). So then I start to look at WiredTiger source for a 50 millisecond sleep and find this in db/storage/wiredtiger/wiredtiger_recovery_unit.cpp
A typical thread stack during the single threaded test is: |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 22/Dec/14 ] |
|
Older drivers use the old method of doing writes - fire and forget write followed by a getLastError. |
| Comment by Mark Callaghan [ 22/Dec/14 ] |
|
This does not reproduce with mongo-java-driver-2.12.4.jar |
| Comment by Mark Callaghan [ 22/Dec/14 ] |
|
The test was doing single-doc writes. Regardless, I don't get why a 50-millisecond wait for group commit should be dependent on the version of the Java client that I use. I feel like I wasted time on this and I have better ways to waste time. |
| Comment by Ramon Fernandez Marina [ 22/Dec/14 ] |
|
Support for bulk write commands were included in the 2.12.0 Java driver. The latest release candidate appears to be 2.13.0-rc0. |
| Comment by Mark Callaghan [ 22/Dec/14 ] |
|
mongo-java-driver-2.11.4.jar Why is server-side group commit code path driver dependent? |
| Comment by Eliot Horowitz (Inactive) [ 22/Dec/14 ] |
|
What driver are you using? |
| Comment by Mark Callaghan [ 22/Dec/14 ] |
|
Also used this to get 1 or 10 threads with iibench |
| Comment by Mark Callaghan [ 22/Dec/14 ] |
|
Thread stacks from PMP (poormansprofiler.org) for all threads when it was slow: 1 sigwait,mongo::(anonymous,boost::(anonymous,start_thread,clone |