Disk IO is the fastest single-threaded sequential write, and if the disk's head is constantly re-routed, the write speed is slower

Source: Internet
Author: User

(1) Read and write the best or not multi-threading, hard disk read and write speed is limited, single-threaded full load, multithreading will increase the switching between threads, will increase the time.

If you want to increase read and write speed, you should increase the hard disk, do raid

(2) The first is the hard disk write is serial, CPU calculation is parallel, if you focus on computing so many threads can improve, not called parallel computing it;

If you focus on storage, unless the amount of data is sufficient to reflect the advantages, otherwise the loss of switching between threads will certainly be more efficient underground.

(3) This is according to the algorithm, most of the algorithms are very fast, the bottleneck is on the disk IO, we have tested for most of the algorithms, more than half of the time spent on the disk IO.

For example, I deal with an image, processing the data for 1 minutes, write the image for 2 minutes, then you optimize your algorithm is very good, 10 seconds to do, you improve the efficiency of how much, but if I multi-threaded write,

I've increased productivity by a factor of 1 minutes for writing images, which is significantly more efficient than optimizing your algorithm. This thing is still for the algorithm.

(4) disk IO single-threaded sequential write the fastest, if multithreaded write, the disk's head to constantly re-address, so the write speed will be slow.

Reference: http://blog.csdn.net/chenyujing1234/article/details/7694201

Disk IO is the fastest single-threaded sequential write, and if the disk's head is constantly re-routed, the write speed is slower

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.