CNFS: round up writev to CNFS_BLOCKSIZE [PATCH]

Russ Allbery rra at stanford.edu
Tue Jun 7 04:55:28 UTC 2005


"Miquel van Smoorenburg" <list-inn-workers at news.cistron.nl> writes:

> Right now, CNFS blocks are written starting on a CNFS_BLOCKSIZE
> boundary, but not ending on one.

> That means that even if CNFS_BLOCKSIZE is a multiple of the
> filesystem blocksize, the OS still needs to read the last block
> from disk in order to complete the write (remember - partial
> block writes need a read from disk first).

> On a system that gets a full feed, that means ~70 random reads/sec
> from disk that can easily be eliminated by writing some extra
> zero bytes so that a multiple of CNFS_BLOCKSIZE gets written.

> This will only make a real difference on filesystems that have
> a blocksize of which CNFS_BLOCKSIZE (512 by default) is a multiple.
> If you have a filesystem with 4K blocksize (as most are) then it
> would make sense to change CNFS_BLOCKSIZE to 4096 as well on
> your system.

Thanks, applied.

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.


More information about the inn-workers mailing list