MongoDB optimized pre-read

Source: Internet
Author: User

1. Optimize Pre-reading
Optimize IO performance by using the Linux Blockdev command to set the pre-read size to smaller and reduce the unused data consumption in memory
The RA represents the read-ahead size (sector), the recommended value is 16 to 32, such as the document is small, the pre-reading value can be smaller, modified MongoDB restart to take effect.

Read-Ahead default 256 sectors with a size of 128K

MongoDB is a lot of random access, readhead to set a little bit. For example, just read 10k, but read 128K.


[email protected]:~# blockdev--report
RO RA SSZ BSZ startsec Size Device
rw 4096 0 800166076416/DEV/SDA
RW 2048 524288000/dev/sda1
rw 4096 1026048 799639863296/dev/sda2
rw 4096 0 53687091200/dev/dm-0
rw 4096 0 33822867456/dev/dm-1
rw 4096 0 712125710336/dev/dm-2

use the following command
Blockdev--setra 128/dev/sda2
represents a read-ahead size of 128*512 bytes/sector =64k

This article is from the DBA Sky blog, so be sure to keep this source http://9425473.blog.51cto.com/9415473/1661060

MongoDB optimized pre-read

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.