[SERVER-29465] Add warning about Windows SystemFileCacheSize for WiredTiger Created: 06/Jun/17 Updated: 30/Oct/23 Resolved: 10/Nov/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.0-rc4 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Alexander Gorrod | Assignee: | Xiangyu Yao (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||
| Sprint: | Storage 2017-10-23, Storage 2017-11-13 | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||
| Description |
|
Some MongoDB users on Windows have switched to enabling direct_io because the file system cache on Windows is greedy by default and can lead to content in allocated memory getting swapped out - which leads to terrible performance. Windows provides the SetSystemFileCacheSize API that allows limiting the amount of memory that can be used by the file system cache. The setting is global across the computer. We could add code into MongoDB that calls the API, and limits the amount of memory the file system cache can use to a percentage of available memory. The call should only be done for storage engines that have a cache management layer. MMAP relies on the file system cache using all available memory - limiting how much memory is available would hurt MMAP users. There is further discussion in |
| Comments |
| Comment by Muhammad Yahya (Inactive) [ 17/Feb/20 ] |
|
Upgrading to newer version of 3.6 will get rid of this issue? |
| Comment by Githook User [ 10/Nov/17 ] |
|
Author: {'name': 'Xiangyu Yao', 'username': 'xy24', 'email': 'xiangyu.yao@mongodb.com'}Message: |
| Comment by Xiangyu Yao (Inactive) [ 18/Oct/17 ] |
|
After talking to Alex via Slack, I decided to use 40% as the percentage threshold (SystemFileCacheSize/TotalMemory) for this warning. - it matches in well with the default WiredTiger cache size, which is around 50%. |