test read and write speed in file

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Wed Oct 23 00:53:38 EDT 2013


On Wed, 23 Oct 2013 10:12:28 +0800, wuyaalan at gmail.com said:
>       how can i test read and wirte speed in a file in linux OS.

This is a lot harder than it looks - mostly because you need to
figure out exactly what question you're actually asking.

With or without the in-memory file cache?

Streaming with readahead, or random?  If random, what access pattern?

How large a file? Kilobytes, megabytes, gigabytes, terabytes?

Access to one file, or interleaved access to multiple files?

Do you need to account for intermediate layers, such as cryptLUKS, LVM,
or even both in combination?

Are you measuring writes as complete when they hit the block cache layer,
or when they're actually writeback flushed to disk?

Do you need to include the impact of fsync() or sync() system calls?

And that's just the obvious stuff I can think of at 1AM.  There's more. :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20131023/18f22c0c/attachment.bin 


More information about the Kernelnewbies mailing list