[SERVER-24384] Extremely slow writes on OSX with WiredTiger and constant collection/index creation+drop Created: 02/Jun/16 Updated: 14/Jul/16 Resolved: 03/Jun/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | WiredTiger |
| Affects Version/s: | 3.2.6 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Daniel Doubrovkine | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Darwin 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64 db version v3.2.6 (can't figure out how to find the wiredtiger version, so labeling as last, but I could be wrong) |
||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
Default installation of MongoDB 3.2.6 via brew. Basic commands like creating an index or dropping a collection take a long time.
Switching storage to mmapv1 resolves the problem. Disabling journaling doesn't help. Attached a log where there're a few restarts switching between different configurations and some test queries. |
| Comments |
| Comment by Daniel Pasette (Inactive) [ 05/Jun/16 ] |
|
Daniel, have you tried using the ephemeralForTest storage engine? I wasn't sure if in your last comment you meant that you don't have control over the storage engine setting or not, but for local unit-testing against a standalone mongod server, this could be a good approach for you. |
| Comment by Daniel Doubrovkine [ 03/Jun/16 ] |
|
Just to be clear, we don't always have control in development over configuration options of a database, for example in Travis-CI. |
| Comment by Daniel Doubrovkine [ 03/Jun/16 ] |
|
FWIW the big advantage of MongoDB is that it is (was) really cheap to bring up and tear down a database for every test, and that is what most Ruby developers using MongoDB do via libraries like database_cleaner. It's literally the default setup I've seen in just about any project. |
| Comment by Ramon Fernandez Marina [ 03/Jun/16 ] |
|
dblock, what the log shows is the following in a loop:
WiredTiger uses one file per collection and one file per index, so in this workload your system is very busy creating and removing files, which would explain the timings you're seeing. MMAPv1 uses a file per database and all your collections and indexes seem to be on the same database, so file allocation and deletion is not an issue. I'm going to close this ticket as a duplicate of Regards, |
| Comment by Daniel Doubrovkine [ 02/Jun/16 ] |
|
This is a vanilla installation, no data, and clearing /usr/local/var/mongodb every time. |