tech-kern archive

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

Re: Quota on tmpfs



On Tue, 17 Jul 2012 20:54:28 +0000 (UTC)
mlelstv%serpens.de@localhost (Michael van Elst) wrote:

> I would also guess that sparse files are very rarely used. But for
> disk usage purposes you want to consider real disk usage including
> overhead because the quotas are mostly used to partition the available
> space. That doesn't work if your quotas allow you to write a few
> thousand files of 1 byte length that account together as a single
> single block when they really occupy a few thousand blocks.

A scenario in which they're frequently used is block-based file system
transfer protocols (especially distributed ones where blocks may
download in random order, including bittorrent), also by download
managers that support "download optimization" where multiple
connections will be made to transfer multiple file sections at a time
(i.e. the DownloadThemAll Firefox extension).

Another common usage of sparse files is for live file system images.
The cost of creation (open/creat + trunk/lseek + newfs) is small
compared to writing a full image of zeros, then the blocks can be
lazily allocated and written when needed.

Apparently some database storage formats use sparse files, but the ones
I'm currently using don't seem to...
-- 
Matt


Home | Main Index | Thread Index | Old Index