ZFS-lighttpd2-sendfile, too high IO

Ivan Voras ivoras at freebsd.org
Tue Sep 13 10:01:01 UTC 2011


On 13/09/2011 11:38, Mark Blackman wrote:
> 
> On 13 Sep 2011, at 10:31, Ivan Voras wrote:
>>>
>>> Zfs reads whole 128K blocks (or whatever the filesystem blocksize is) at
>>> a time.  It does not read partial blocks from underlying storage. This
>>> makes it very expensive to perform many small read accesses if the reads
>>> are not subsequently cached in the ARC.
>>
>> Yes!
>>
>> Which makes it particularly "interesting" if you try to run a database
>> on it while forgetting to reset the block size to e.g. 8K before the
>> database is initialized - you get 16x more IO than you expected.
>>
> 
> Yes, I got this but what can you do if the database has already been 
> initialized? I'm guessing the only realistic option is to set the block
> size, then copy the database files to a new directory and rename the old
> and new directories so the new directory is the database store.
> 
> Perhaps you need to use an entirely new dataset?

Luckily, you just need to create a new file system and move/copy the
data over and back again.



More information about the freebsd-fs mailing list