What is the average time (may be in millisecond) of Linux file operations?

Hi,

What is the average time (may be in millisecond) of Linux file operations? For example, usually a process accesses (e.g., reads, opens, writes, or mixing of those operations) a file, how long by average of the accessing time that a process has operated with a file, in general?

Can anyone point out some reading about this? I really appreciate this.

Best,

Winai

That would be impossible to easily quantify … too many variables … I/O bandwidth, CPU speed, Memory (and cache) speed and bandwidth, whether the file was cached, hard drive speed, which file system is being used, which distro (and what other running processes), etc. etc. etc…

Welcome to the forum, by the way :slight_smile:

Thank you very much for your reply, thus I may need to look at the the average time of an OS file operations, may be?

File operations will differ from PC to PC (and on the same PC) depending on hardware, and what else the PC is doing … that’s an unanswerable question.

Now if you asked something like … are write operations less/more I/O intensive in ext4 than NTFS under the same conditions … that may be answerable.

Why do you ask ?

The speed of file operations is generally dictated by the speed of the computer, rather than by Linux … and also by the number of read/write request needed for a given operation. For a simple block read / write there will for example be two factors;

  • The time it takes to move the disk head to the correct position
  • The time it takes to transfer the information from the read head to the computer’s memory

Typically for a desktop computer the average “seek time” is around 10ms and transfer speeds are around 100Mbytes/sec. So, if you have a file operation that involves reading 20Mb from three different places on the disk, the average time you would expect it to take would be 3 x 10ms + 200ms, i.e. 230ms.
[although this is always going to be an average since you never know where disk head actually is and how far it will need to move …]

(Note that for server hard disks you would probably expect 3ms seek times, and up to 200Mb/sec throughput, and for SSD 0.1ms seek times with 500Mb/sec throughput - so obviously the type of hardware will change your figures fairly drastically)

Try this - 10-Way Linux File-System Comparison On Linux 3.10 - Phoronix

That Phoronix data is a file system “comparison”, not an “average” … which I still maintain is impossible :slight_smile:

It’s the closest OP is going to get to be honest

True enough :slight_smile: