Add disk cache for LINUX 115 Network Disk Client

Source: Internet
Author: User
I recently used a 115 online storage disk to download something. It was initially a 12 m optical fiber, and the data written to the disk every second was kept around 1 ms. I was so scared to upgrade to 115 m optical fiber two days ago and then open the online storage, the HDD lights on the host are constantly on. Does this product give fsync every time after receiving the buffer? The strace artifact finds that there is no fsync, that is, the cache is disabled when the file is opened.

Recently, I used a 115 online storage disk to download things. At the beginning, it was a 12 m optical fiber, and the data written to the disk per second was kept at around 1 m/s. I upgraded it to 115 m optical fiber two days ago, and then I was scared to open the online storage, the HDD lights on the host are constantly on. Does this product give fsync every time after receiving the buffer? The strace artifact finds that there is no fsync, that is, the cache is disabled when the file is opened. After looking for the UI of this client, we found that the linux version of this product is very simple and there is no disk cache configuration. You can find a good tool named eatmydata on the Internet. You can use LD_PRELOAD to remove open/fsync, disable open cache, and disable fsync, run the following command after apt-get is installed:

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libeatmydata.so.1.1.1 115panERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libeatmydata.so.1.1.1' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.

Check that the original 115 network disk is a 32-bit program, and then install the 32-bit version of libeatmydata. Then try again and there will be no error. Look at dstat and iotop, and you can't see frequent disk operations.

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.