MongoDB server-related selection and foundation optimization reference

Source: Internet
Author: User
Tags file system mongodb mongodb server reference mysql database linux

Hard Drive selection

1. The hard disk has the condition as far as possible chooses the SAS disk, does not have the money the Choice SSD, Funsion-io and so on, moreover. SATA disks can also be considered selectively according to the original application environment

2. RAID can choose RAID10 and RAID5, recommended to choose RAID10, it is the speed is also relatively safe, RAID5 words suitable for reading more business. But it is recommended to use RAID10, space in exchange for time. RAID5 in the case of a disk problem, the performance of the speed drop!

3. Raid card selection, try to choose a large brand RAID card, so as to reduce the occurrence of a variety of RAID card failures. There is also the raid cache to choose relatively large!

Memory selection

Now the memory is the era of cabbage prices, now the general notebook to 16G, no company will be entangled in memory, theoretically any server is the larger the memory, especially the database server, at least 16G above.

CPU Selection

Choose 64-bit CPU This needless to say, and also is the cache to large, CPU to many core threads, but some databases on multi-core CPU requirements are not very strict, such as: Mongodb,mongodb memory requirements are very high! MySQL InnoDB engine CPU utilization ratio is high, as far as possible choose the strong point cpu!

System Selection

1. The system must be 64-bit system, can be Linux can also be unix,linux have a lot of choices, commonly used is CentOS Ubuntu aulympic, Unix can choose Open source FreeBSD

2. Kernel selection, recommend more than 2.6 of the kernel, also not too high

3. File system selection, there are several options: EXT3/EXT4/XFS,EXT4 and XFS more suitable for the database, in fact, XFS is more suitable as a MySQL database file system, can be on the basis of EXT3 performance increased 1.5 times times.

Other aspects:

Network card at least choose thousand m, million m better, not million m can also do bonding.

In short, for different applications to choose the type of machine, especially as data, the database layer as far as possible to choose a relatively good server.

The following is a simple description of the hardware selection for the MONGODB server:

1. Related hardware level

Network minimum for thousand m network card, have million m better!

Large memory (can be set according to the size of the index memory, in principle, the larger the memory the better.) )

2 Dual-Core high-speed CPU,MONGODB instances do not need to be multi-core, because MongoDB to CPU multi-core support is not very good, but as a MONGOs routing server for CPU resource consumption more!

The MongoDB instance has a separate mount disk for frequent operations that store data for MongoDB to isolate IO.

Disks can be considered with RAID10 or RAID5, and funds allow you to consider using SSD to save

2. System level

Use 64-bit systems to support more memory and allow for greater storage data

Prohibit file system update read count statistics (modify/etc/fstab file)

Mount-o Remount,noatime/data

If there are large files in the stored data, it is recommended that you use a file system such as Ext4/xfs

Here you can consider separating the data directory from the log file and the associated middleware directory (if any), isolating IO

Ulimit settings

Set Maximum Open file descriptor

Cat/etc/security/limits.conf

Soft Nofile 102400

Hard Nofile 102400

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.