Re: Linux 2.6.29

Jeff Garzik
2009-04-02T21:56:37Z

David Rees wrote:
> Either way - forcing the data to be synced to disk a couple times
> every second is a hack and causes fragmentation in filesystems without
> delayed allocation. Fragmentation really goes up if you are recording
> multiple shows at once.

Check out posix_fallocate(3). Not appropriate for every situation,
might eat additional disk bandwidth...

But if you are looking to combat fragmentation, pre-allocation (manual
or kernel-assisted) is a relevant technique. Plus, overwriting existing
data blocks is a LOT cheaper than appending to a file. fsync's more
quickly to disk, too.

Jeff