Test SSD write speed under Linux

Source: Internet
Author: User
Tags diff

Recently bought a 256GB SSD SSD, want to test the write speed, so the following operation.

Part of the code:

1Gettimeofday (&start, NULL);2     intFD = open ("Test1.dat", o_rdwr|o_creat);3     if(FD <0){4printf"Open error!\n");5         return 0;6     }7 //Lseek (FD, 0, seek_set);8 Write (FD, PData, Data_len);9 Close (FD);TenGettimeofday (&end, NULL); One  A //display elapsed time in US -diff =1000000* (END.TV_SEC-START.TV_SEC) + (End.tv_usec-start.tv_usec); -  theprintf"The data length is%d\n Byte", Data_len); -printf"The difference is%ld us\n", diff);

Test one, the data size 288,000 byte,5 times the maximum time, the write speed is about 288000 Byte/2058us = 133.46 MB/s

Test two, data size 1,440,000 byte = 1.37mb,5 takes the longest time, the write speed is about 1440000 byte/9356 US = 146.78 MB/s

Test three, data size 14,400,000 byte = 13.7mb,5 take maximum time, then write speed is about 14400000 byte/100234 US = 137.01mb/s

Test SSD write speed under Linux

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.