On Wed, 6 Jan 2010, Saso Kiselkov wrote:
I've encountered a new problem on the opposite end of my app - the
write() calls to disk sometimes block for a terribly long time (5-10
seconds) when I start deleting stuff on the filesystem where my recorder
processes are writing. Looking at iostat I can see that the disk load is
strongly uneven - with a lowered zfs_txg_timeout=1 I get normal writes
every second, but when I start deleting stuff (e.g. "rm -r *"), huge
load spikes appear from time to time, even to the level of blocking all
processes writing to the filesystem and filling up the network input
buffer and starting to drop packets.
Is there a way that I can increase the write I/O priority, or increase
the write buffer in ZFS so that write()s won't block?
Deleting stuff results in many small writes to the pool in order to
free up blocks and update metadata. It is one of the most challenging
tasks that any filesystem will do.
It seems that most recent development OpenSolaris has added use of a
new scheduling class in order to limit the impact of such "load
spikes". I am eagerly looking forward to being able to use this.
It is difficult for your application to do much if the network device
driver fails to work, but your application can do some of its own
buffering and use multithreading so that even a long delay can be
handled. Use of the asynchronous write APIs may also help. Writes
should be blocked up to the size of the zfs block (e.g. 128K), and
also aligned to the zfs block if possible.
Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss