3 ms·
AFAIK even a file of 45bytes takes up at least an inode and an entire data block on disk. So on most systems it doesn't matter if the file is 4096bytes or any s
by solarexplorer 14y ago
AFAIK even a file of 45bytes takes up at least an inode and an entire data block on disk. So on most systems it doesn't matter if the file is 4096bytes or any smaller. And if you need to send the file over the network, the source code still beats the binary in size...
- 0x0 14y agoActually some file systems are capable of storing the file contents inside slack inode or directory entry space, for files that are very small.
- solarexplorer 14y agoTrue. There are also things like UFS fragments and ReiserFS tail packing etc, but does plain ext3 or ext4 implement any of these optimizations? I don't think so. So in the most common case nothing is gained by this optimization.
- e12e 14y agoIt looks like support for in-line data in ext4 is comming to mainline in 3.8: http://www.phoronix.com/scan.php?page=news_item&px=MTI1NTA http://www.phoronix.com/scan.php?page=news_item&px=MTI1N... As this has been discussed for quite some time, I actually thought it was already enabled in ext4 -- apparently not. BTRFS supports "space efficient packing of small files" - by suballocating blocks. Not sure what the real mimimum size on disk for a file is though -- but apparently you can approach header+<data> size both on btrfs and ext4 (and on BSD under UFS2 afaik).