What is the difference between hard-disk writes and memory writes?

Source: Internet
Author: User

Write data of the same size 1 time times size,10 times size,100 times, respectively, and test large file writes and memory copies respectively.

Tfwrite woaoniyoujifen,yueliangdaibiaowodexin!
Small write 100w times begin ...
Begin sec[1433735551], microsec[956743]
Small write 100w time over.
End sec[1433735553], microsec[550436]
Large write 10w times begin ...
Begin sec[1433735553], microsec[550470]
Large write 10w times end.
End sec[1433735553], microsec[719068]
Superlarge write 1w times begin ...
Begin sec[1433735553], microsec[719078]
Superlarge Write 1w times end.
End sec[1433735553], microsec[782787]




Begin to 100w small strcpy
Begin sec[1433735553], microsec[801839]
100w small strcpy over.
End sec[1433735553], microsec[879082]
Begin to 10w large strcpy
Begin sec[1433735553], microsec[885847]
10w Large strcpy over.
End sec[1433735553], microsec[930263]
Begin to 1w Superlarge strcpy
Begin sec[1433735553], microsec[936975]
1w Superlarge strcpy over.
End sec[1433735553], microsec[978766]

From the test results, it is only 1 time times the gap between memory and hard disk in large file write.  should be hard disk and memory IO efficiency difference is not too big, file write and memory write really pull up is random small file read and write, hard disk need seek, memory address directly access. As for 1 time times the size of the file write and 10 times times the size of the file write there is a 8 times-fold gap, which may be related to frequent kernel switching.

What is the difference between hard-disk writes and memory writes?

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.