Is the fsync() fake on FreeBSD6.1?

Ivan Voras ivoras at fer.hr
Wed Jun 28 21:06:24 UTC 2006


Bruce Evans wrote:

>> But I see strange results with iostat. It shows 16KB transactions, 
>> ~2900 tps and 46 MB/s. On the other hand, the program runs for ~36 
>> seconds, which gives ~1390 tps (this is a single desktop drive). Since 
>> 36 seconds of 46MB/s would result in a file 1.6 GB in size, while it's 
>> clearly 50000*512=25MB, iostat is lying.
> 
> This is because you fsync() every 512 bytes.  The file system then writes
> a 16K inode block and a 16K data block, giving 64 times as much i/o as
> necessary.

Ok, so you're saying that it actually does 46MB/s, rewriting 16K FS 
blocks over and over?

In that case, wouldn't all writes to the FS, especially with 
soft-updates be minimally 16K+16K? It doesn't look like it when I 
monitor a live server - there are 8KB and 4KB writes... maybe UFS 
fragments complicate the (ac)counting.


More information about the freebsd-fs mailing list