2 ms·
You'll only be wasting space proportional to the number of objects, and the overhead is much smaller on ext4 (default fs on most linux distros) like the sibling
by fulafel 5y ago
You'll only be wasting space proportional to the number of objects, and the overhead is much smaller on ext4 (default fs on most linux distros) like the sibling comment explains. Most databases are quite small, and most of the rest are less than huge, so in most cases you won't be wasting huge amounts of space.
- quantumofalpha 5y agoOverhead seems to be about 4KiB, at least using default ext4 parameters: # zfs create -V 100G -b 4096 tank/test && mkfs.ext4 -v /dev/zvol/tank/test && mount /dev/zvol/tank/test /mnt && cd /mnt # df -k . Filesystem 1K-blocks Used Available Use% Mounted on /dev/zd16 102626232 24 97366944 1% /mnt # for x in `seq 1000000`; do echo $x >$x; done # create 1M tiny files # df -k . Filesystem 1K-blocks Used Available Use% Mounted on /dev/zd16 102626232 4022348 93344620 5% /mnt # bc -l (97366944-93344620)*1024/1000000 # free space diff per file 4118.859776 Plus you're wasting an inode per record - a limited resource in ext4, increasing which requires reformatting. You'd probably run out of inodes much sooner than out of space.
- fulafel 5y agoInteresting, indeed the inline data option is not enabled even by the latest e2fsprogs even though the feay has been there a long time. Re inodes, this is a good point too. These definitely reduce the size of db that fs works nicely for.