syko
syko

Reputation: 3637

How fio benchmark tool performs sequential disk reads?

I use fio to test read/write bandwidth of my disks.

Even for the sequential read test, I can let it run the multiple threads.

What does it mean by running multiple threads on sequential read test?

I tried to read the open source codes of fio, but I couldn't really figure it out.

Can any one give me an idea?

Upvotes: 1

Views: 1354

Answers (1)

Anon
Anon

Reputation: 7164

Sadly you didn't include a jobfile with your question and didn't say what platform you're running on. Here's a stab at answers:

  • Yes it does multiple sequential reads though wouldn't it have to do this even with a single thread?
  • No each thread has its own offset but unless you use offset and size they will all work inside the same "region".

On Linux fio actually defaults to using separate processes per job and each process has its own file descriptor (for ioengines that use files) for each file used. Further, some ioengines (e.g. libaio, pvsync but there are many others) use syscalls that take the offset you want to do the I/O at with the request itself so even if they do share a descriptor their offset is not impacted by others using the same descriptor.

There may be problems if you use the sync ioengine, ask fio to use threads rather than processes and have those threads work on the same file. That ioengine has to use lseek prior to doing its I/O so perhaps there's a chance for another thread's lseek to sneak in before the I/O is submitted. Note that the sync I/O engine is not the default one used with recent fio versions.

Perhaps the fio mailing list can say more?

Upvotes: 2

Related Questions