MongoDB Performance Optimization

Source: Internet
Author: User

MongoDB Linux performance optimization: https://docs.mongodb.com/manual/administration/production-notes/#allocate-sufficient-ram-and-cpu

Performance optimization:

1. Close the Atime storage volume that contains the database files.

2, according to the recommendations in the Ulimit reference, the file descriptor limit,-n User process limit (ulimit) set to-u20,000 above, a low ulimit will affect MongoDB in a lot of use, may produce errors, causing the connection MongoDB process failure and service failure.

3, disable transparent pages. MongoDB behaves better on the normal (4096 bytes) virtual memory page. See transparent Page Setup. ,

4, disable NUMA in the BIOS. If this is not possible, see MongoDB on NUMA hardware.

5, a problem has been reported when using SELinux-enabled MongoDB. To avoid problems, disable SELinux as much as possible.

6, using the Wiredtiger storage engine, it is highly recommended to use XFS to avoid performance issues that may occur when using EXT4 with Wiredtiger

7, disable HTTP interface





Operation mode:

1,cat/sys/kernel/mm/transparent_hugepage/enabled to see if it starts

When viewed with a command, if the output is [always] means transparent large pages are enabled. [Never] indicates transparent large page disable, [madvise]

https://docs.mongodb.com/manual/tutorial/transparent-huge-pages/shutdown mode

2,vm.zone_reclaim_mode = 0

Configure Vm.zone_reclaim_mode = 0 To make the remote memory allocation take precedence over swap out local page

http://blog.csdn.net/shaochenshuo/article/details/53410094

3, use Noatime for DBPath mount point

After the file system properties in the/etc/fstab are added noatime, then mount-oremount/will be effective immediately.

4,sysctl-w vm.zone_reclaim_mode=0


This article is from the "Wang Xiao Acid" blog, please be sure to keep this source http://wangaimin.blog.51cto.com/8499946/1959833

MongoDB Performance Optimization

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.