coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH]: add an option to disable direct I/O in shred


From: Andreas Kinzler
Subject: Re: [PATCH]: add an option to disable direct I/O in shred
Date: Thu, 15 Oct 2015 13:46:14 +0200
User-agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 14.10.2015 18:48, Pádraig Brady wrote:
some disks can be very slow with direct I/O and shred. I developed a
small patch that adds a new
option -i, --nodirectio to disable direct I/O.
Interesting. direct I/O was added in 2004 to improve performance
by avoid page cache thrashing, as suggested in:
https://bugs.debian.org/207035
Can you give us some details on where direct I/O is slower?
Are you working with files or device nodes?
Which type of disk device is this?

I use shred for block devices only. My measurements show that
direct I/O is indeed optimal for block devices where the device has
its write cache enabled. If for some reason the write cache is
disabled and/or cannot be enabled, then shred with direct I/O is
very slow because the device must complete a physical transaction
for each 64 KB write request. In this case, the option to disable
direct I/O is very helpful.

In my case the cache could not be enabled on some older SATA (via AHCI)
drives.

Regards Andreas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]