Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Database \ MongoDB common optimization settings in Linux     - Quickly locate the mistakes by gdb location (Programming)

- C language Bubble Sort - integer sort (Programming)

- Installation JDK 1.8 under CentOS7 (Linux)

- To install MySQL 5.6 binary packages under CentOS 6.4 64bit (Database)

- 10 Best Swift Tutorial examples (Programming)

- Macro Analysis Performance: PHP Performance Analysis and Experiment (Programming)

- To install Docker under CentOS7 (Linux)

- Echo Command Examples (Linux)

- MySQL dual master configuration (Database)

- Linux systems use IP masquerading anti-hacker (Linux)

- How common Linux automation tasks (Server)

- Oracle multi-user concurrency and transaction processing (Database)

- To install Cinnamon desktop environment on your Ubuntu 14.04 / 12.04 (Linux)

- To teach you a trick to find the real IP address (Linux)

- Red Hat Linux security settings document (Linux)

- Redhat 5 prohibit IPv6 (Linux)

- Java interface (Programming)

- Using a proxy method under Linux terminal (Linux)

- Oracle bdump file soaring (Database)

- How to use the Docker Machine cluster deployment Swarm (Server)

  MongoDB common optimization settings in Linux
  Add Date : 2017-03-03      
  Here are some recommended MongoDB common optimization settings. Select the appropriate parameter values ​​in a production environment, such as pre-reading and the default number of file descriptors, etc., it will have a great impact on system performance.

** Close the database file atime

Prohibit access time of the file system update will improve the performance of the file read. This is done by increasing the noatime parameter in / etc / fstab file to achieve. E.g:

/ Dev / xvdb / data ext4 noatime 0 0

After modifying the file can be re-mount:

# Mount -o remount / data

** Increase the default file descriptors and process / thread limit

Linux default number of file descriptors and the maximum number of processes for MongoDB is generally too low. It recommended that this value is set to 64000. Because MongoDB database server for each file and each client connection need to use a file descriptor. If this number is too small may be wrong or fail to respond in the case of large-scale concurrent operation. You can modify these values ​​to the following command:

ulimit -n 64000
 ulimit -u 64000

** Disable NUMA

NUMA technology in use on a multiprocessor Linux systems, you should be banned for use NUMA. MongoDB performance may sometimes be slow at NUMA environment, especially at high load process.

** Pre-reading (readahead) settings

Pre-reading is a means to optimize the operating system file, generally is when a program requests to read a page, the file system will also read the following page and return a few. This is because very often the most time-consuming IO disk seeks. By read-ahead, the system can immediately ahead of the return data simultaneously. Suppose the program is done in a sequential read operations, so it saves a lot of disk seek time.

MongoDB will often do random access. For random access, this value should be set pre-reading smaller is better. Generally 32 is a good choice.

You can use the following command to display the current system of pre-reading:

sudo blockdev -report

To change the pre-reading, you can use the following command:

sudo blockdev -setra 32

The < device> into the appropriate storage device.

** Use NTP Time Server

Using MongoDB replication set or cluster fragmentation time, attention must use NTP time server. This will ensure proper synchronization between MongoDB clusters into principles.
- Oracle 11g DataGuard service to start automatically (Database)
- PHP with FastCGI and mod_php Comments (Server)
- How to manage and use Logical Volume Management LVM in Ubuntu (Linux)
- How to install Eclipse Luna IDE on CentOS 7 / RHEL 7 (Linux)
- How to implement Linux host Telnet SSH password Free (Server)
- Linux Command - ps: a snapshot of the current process (Linux)
- Use Aptik Battery Monitor monitoring Ubuntu laptop battery usage (Linux)
- Git Getting Started tutorial (Linux)
- Three strategies to teach you to release the device memory (Linux)
- Linux Oracle environment variable is invalid Problem Solving (Database)
- Eclipse Android development environment installation (Linux)
- Zabbix monitoring disk IO status (Server)
- About redis in Replication (Database)
- Linux firewall to prevent external network attacks (Linux)
- Oracle Linux 5.5 (64bit) Install Oracle 11gR2 RAC detailed tutorial (Database)
- Linux system security (Linux)
- redis main building and disaster recovery from a cluster deployment (Database)
- Physical backup and recovery SYSTEM table space (Database)
- Ubuntu 14.04 LTS 64-bit installation and activation Sublime Text 3 can not solve the Chinese input method to solve the problem (Linux)
- Clojure programming languages: take full advantage of the Clojure plug-in Eclipse (Programming)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.