Univention Bugzilla – Bug 39432
Increase default inode density
Last modified: 2015-11-17 12:12:18 CET
There are situations where the default inode density is not high enough, e.g. overlayfs might suffer from that (Bug #39418), but also Bug #39270 and Bug #32255 Since ext3/ext4 filesystems do not support increasing the inode density after creation, we may want to avoid this by increasing the default inode density used in the Debian installer. The default inode_ratio is defined in /etc/mke2fs.conf: * one inode per 16KiB as [default] * one inode per 32KiB for [big] partitions (i.e. >=4TB), * one inode per 64KiB for [huge] partitions (i.e. >=16TB) The default of 16KiB corresponds to 2% of the partition. To address problems with overlayFS CoreOS currently seems to use an inode_ratio of 4KiB, corresponding to 6% of the partition. An intermediate inode_ratio of 8KiB would use 3% of the partition, and I think that's still a pretty low sacrifice (from my point of view even the 6% would be acceptable). On ext4, unused inodes apparently don't degrade fsck performance.
Created attachment 7189 [details] double_node_ratio_default.patch This patch for e2fsprogs would double the [default] inode_ratio as well as the values for [big] and [huge] partition sizes. I assume this kind of patch would not require any change in our preseed file of the debian-installer. This patch proposes a relative scaling, which I would not favour. See next comment for a different approach.
Created attachment 7190 [details] quadruple_inode_ratio_for_debian-install.patch This patch is an example of adding a special [overlayfs] "usage type" to mke2fs.conf which e.g. quadruples the inode_ratio to 4KiB (6% storage sacrifice). The patch shows, how our preseed file for the Debian installer can be adjusted to select the new "usage type" which gets passed to the mkfs.ext4 call. This patch would use 4KiB inode_density regardless of the size of the partition.
Now I cherry picked e2fsproigs from errata4.0-3 to ucs_4.1-0 and added a patch which only changes the default inode_ratio from 16KiB to 8KiB, and only for "normal" sized filesystems, [big] and [huge] are unchanged. Still need to test with new installation medium.
Ok: tune2fs -l /dev/mapper/vg_ucs-root [...] Block size: 4096 [...] Blocks per group: 32768 [...] Inodes per group: 16336 >>> 4096 * 32768 / 16336 8216 ## rounded result. Changelog adjusted.
OK: r15359 e2fsprogs OK: r64587 changelog $ dd if=/dev/zero bs=1G count=0 seek=20 of=20G $ mke2fs -F 20G $ tune2fs -l 20G >403 # 410 $ diff 403 410 13c13 < Inode count: 1310720 --- > Inode count: 2621440 16,17c16,17 < Free blocks: 5149359 < Free inodes: 1310709 --- > Free blocks: 5067439 > Free inodes: 2621429 24,26c24,26 < Inodes per group: 8192 < Inode blocks per group: 512 --- > Inodes per group: 16384 > Inode blocks per group: 1024 OK: ucs_4.1-0-latest-amd64.iso OK: tune2fs -l /dev/vga1 | grep -e ^Block -e ^Inode
UCS 4.1 has been released: https://docs.software-univention.de/release-notes-4.1-0-en.html https://docs.software-univention.de/release-notes-4.1-0-de.html If this error occurs again, please use "Clone This Bug".