Bug 39432 - Increase default inode density
Increase default inode density
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UCS Installer
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.1
Assigned To: Arvid Requate
Philipp Hahn
http://geoff.com.au/content/format-dr...
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-29 16:59 CEST by Arvid Requate
Modified: 2015-11-17 12:12 CET (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Troubleshooting
Max CVSS v3 score:


Attachments
double_node_ratio_default.patch (508 bytes, patch)
2015-09-29 17:04 CEST, Arvid Requate
Details | Diff
quadruple_inode_ratio_for_debian-install.patch (715 bytes, patch)
2015-09-29 17:10 CEST, Arvid Requate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2015-09-29 16:59:28 CEST
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.
Comment 1 Arvid Requate univentionstaff 2015-09-29 17:04:29 CEST
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.
Comment 2 Arvid Requate univentionstaff 2015-09-29 17:10:23 CEST
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.
Comment 3 Arvid Requate univentionstaff 2015-10-15 17:34:49 CEST
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.
Comment 4 Arvid Requate univentionstaff 2015-10-19 15:16:59 CEST
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.
Comment 5 Philipp Hahn univentionstaff 2015-10-27 15:27:51 CET
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
Comment 6 Stefan Gohmann univentionstaff 2015-11-17 12:12:18 CET
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".