On 14/10/15 16:55, Andreas Kinzler wrote: > Hello Developers, > > 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 It was inadvertently disabled in coreutils 6.0 in 2006, but re-enabled in coreutils 8.21 2013. 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? If for example you were working directly with a disk device node (shred /dev/sdb etc.), then we might disable direct I/O in that case, assuming there would be minimal cache pressure in that case (it would have to be tested). If you were working with files then perhaps we might leverage the invalidate_cache() functionality from dd. Note shred writes 64KiB at a time. thanks, Pádraig.
