MongoDB memory control (wsrm)

Source: Internet
Author: User

When MongoDB eats all idle memory, server operations become slower and slower. Although it does not have much impact on MongoDB's read operations, the write performance is greatly reduced at this time (it is suspected that the memory is insufficient ). Due to the need to collect a large amount of historical file data, when multiple threads collect to a certain extent, the writing speed becomes slower and slower. After multiple tests, it is found that it is related to the service memory usage peak. When the server memory usage is low, multi-thread writing is faster. When the server memory is exhausted by MongoDB ing, the write speed of multi-thread writing is too slow to be miserable, this situation is obvious even in a single thread. Although MongoDB provides runcommnad( {closealldatabase: 1}) or disables the database to release the cache, this affects normal read/write operations. Therefore, reserving a certain amount of memory space for the server has become a solution to ensure fast writing. Of course, under normal circumstances, there will be no such frequency of file write operations, but the current situation is special, is to collect a large number of historical files. To verify this problem, we can use Windows system resource manager (wsrm) to runProgramMemory and CPU usage control (Windows2003/windows2008), here windows2008 is used, in the Control Manager panel add function select Windows system resource manager to install. For details, see the link for wsrm usage.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.