On Tue, 2007-02-06 at 11:41 -0800, Dan Price wrote:
Because ZFS gathers writes into transaction groups and schedules them for asynchronous write to the platter, we often see very large mailboxes complete their writes very fast (example: 0.3 seconds for 128MB mailbox fully rewritten). When dovecot calls fsync on the mailbox, ZFS is forced to commit all of those changes to the platter right then and there, and forces the application to wait. (ZFS will make sure all the changes get to the platter in the next 10 seconds or so anyway).
What about if you remove the fsync() call only in lib-storage/index/mbox/mbox-sync.c? I think I'll go and remove that anyway, since it doesn't really guarantee anything in there. The other fsyncs and fdatasyncs are more useful in guaranteeing data integrity.