tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: posix_fallocate

On Mon, Nov 18, 2013 at 12:31:41PM +1100, matthew green wrote:
> i would buy this argument if mmap()ing a large sparse file
> and filling it up randomly (but with relatively large chunks
> at a time) did not lead to severely fragmented files that
> can take 10x to read, vs one written with plain sequential
> write() calls.

There's another option that should avoid that behaviour: make the file
system place the sparse blocks approximately where it would place them
where they written in sequential order.  One could do the same also
after an lseek() that creates a hole.

Such a change should be relatively straightforward for file systems like
UFS that limit the amount of data that is allocated in a cylinder group on
sequential writes.


Home | Main Index | Thread Index | Old Index