[SERVER-13405] Update with $set on fairly large document perf regression 2.6.0-rc2 vs 2.4 Created: 28/Mar/14 Updated: 06/Dec/22 Resolved: 27/Dec/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | 2.6.0-rc2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Andrew Emil (Inactive) | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Done | Votes: | 1 |
| Labels: | 26qa | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Assigned Teams: |
Query
|
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Participants: |
| Description |
|
Using YCSB we have identified a potential performance regression in 2.6 on updates. It seems like $set updates (which should not cause document moves) on multiple fields against documents of about 1k in size are significantly slower in 2.6. None of the updated fields are indexed, all of the queries for the updates are against _id. We have written a small python script to reproduce this regression, it is attached to this ticket. The script should be run using 2 machines, 1 client, 1 server. On the server just run mongo (2.4 or 2.6), on the client run the test script (make sure to modify the line where MongoClient is created to point at your server). Note, the testing was done using the pymongo trunk code. Simply run the script against 2.4 and 2.6 and compare the elapsed time output. Additionally, in my testing I could see the regression using mongostat on the server. Output from a sample test run: Note that this regression was originally found running YCSB (in particular, workloada) with many threads. The repro script attached here is single threaded, but seems to show the same issue. |
| Comments |
| Comment by Asya Kamsky [ 27/Dec/17 ] |
|
I'm going to close this based on the measurement that 3.6 is about 30-40% faster on this update scenario than 3.4 and 3.4 was already showing about 20% improvement for this use case. |
| Comment by Asya Kamsky [ 21/Dec/17 ] |
|
FYI, I just tested this with 3.6 vs 3.4 and updates are significantly faster with 3.6 (in 3.6 mode) - about 30% for updates of documents with large number of fields - the more fields are being updated, the faster. |