RE: Using `direct=1` parameter in disk vs filesystem tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Davor Cubranic <davor@xxxxxxxxxxx>
> Sent: Tuesday, December 15, 2020 4:11 PM
> To: fio@xxxxxxxxxxxxxxx
> Subject: Using `direct=1` parameter in disk vs filesystem tests
> 
> I have a usage question: in testing the write speed of a raw disk
> drive, I saw “randwrite” achieve bandwidth identical to “write” even
> with small block sizes, at least until I added `--direct=1` option
> (`--fsync_on_close=1` did not make any difference). Does that mean
> that this option is pretty much required for testing raw disks?
> (Specific command line I used: "fio --filename=/dev/sdb --
> name=rawdisk --rw=randwrite --bs=4k --size=256g --runtime=60 --
> direct=1”.)
> 
> For realistic testing of writes to a *filesystem* where our
> applications won’t go beyond regular POSIX open/write/close API, I
> assume I don’t need to set the `direct` parameter?

Without direct=1, IOs go through the Linux page cache, so you
might just be testing your memory speed, not the storage subsystem.

You didn't describe your system, but servers can easily have 384 GiB
of memory nowadays. A 256 GiB workload fits entirely in the page cache
in such a system.







[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux