[SERVER-38270] Weird behavior in caching collections with different average size documents in MongoDB Created: 27/Nov/18 Updated: 06/Dec/22 Resolved: 17/Apr/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | WiredTiger |
| Affects Version/s: | 4.0.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Moditha | Assignee: | Backlog - Storage Engines Team |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Storage Engines
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: |
|
||||||||
| Participants: | |||||||||
| Description |
|
When collections with different average sized documents (x,2x,3x,4x,5x) but having same number of documents within them the cache is behaving differently than expected. Before the eviction takes into place the distribution of the cache for the data is as follows. ( The collections are accessed in the same frequency and the memory is smaller than the collections) This is the expected behavior as bigger sized documents mean bigger memory footprint. But, after the cache eviction takes place the distribution of the cache is as follows. This means the eviction policy is evicting more of the bigger collection and giving priority to smaller ones (the opposite trend) |
| Comments |
| Comment by Sulabh Mahajan [ 17/Apr/19 ] |
|
I am closing this ticket because |
| Comment by Moditha [ 18/Dec/18 ] |
|
Just for future reference. It is not the creation time but rather the name of the collection. I guess the eviction takes place in some order (alphabatical) of the collections. Therefore somehow the latter collections gets evicted more. Maybe a random pick would be better if the collections are picked in an order |
| Comment by Moditha [ 05/Dec/18 ] |
|
|