Package: initramfs-tools-core
Version: 0.130
Severity: normal
Hi,
Not sure whether this is a bug but every system a I run, like this box with 32 GB of RAM, I can see udev taking 50%.
root@goosfraba:/etc/initramfs-tools# df -kh
Filesystem Size Used Avail Use% Mounted on
udev 16G 16G 0 100% /dev
tmpfs 3.2G 11M 3.2G 1% /run
/dev/mapper/diskspace-root 5.0G 1.8G 3.3G 36% /
/dev/mapper/diskspace-usr 95G 14G 82G 15% /usr
tmpfs 16G 5.8G 9.9G 37% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/sdb2 2.0G 337M 1.5G 19% /boot
/dev/mapper/diskspace-home 250G 208G 42G 84% /home
/dev/mapper/diskspace-usrlocal 500G 362G 139G 73% /usr/local
/dev/mapper/diskspace-tmp 5.0G 296M 4.8G 6% /tmp
/dev/mapper/diskspace-steam 640G 483G 127G 80% /opt/steam
/dev/mapper/diskspace-var 20G 8.2G 12G 41% /var
tmpfs 3.2G 20K 3.2G 1% /run/user/1000
And very often I find my machine, which runs steam games, runs off memory and uses swap.
If I force to use less memory, the memory footprint gets very low.
root@goosfraba:~# mount -o remount,size=100M /dev/shm
root@goosfraba:~# mount -o remount,size=100M /run/user/1000
root@goosfraba:~# mount -o remount,size=10M /run/user/1000
root@goosfraba:~# mount -o remount,size=10M /sys/fs/cgroup
root@goosfraba:~# df -kh
Filesystem Size Used Avail Use% Mounted on
udev 10M 10M 0 100% /dev
tmpfs 10M 10M 56K 100% /run
/dev/mapper/diskspace-root 5.0G 1.8G 3.3G 35% /
/dev/mapper/diskspace-usr 95G 14G 82G 15% /usr
tmpfs 100M 0 100M 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 10M 0 10M 0% /sys/fs/cgroup
/dev/sdb2 2.0G 298M 1.5G 17% /boot
/dev/mapper/diskspace-tmp 5.0G 38M 5.0G 1% /tmp
/dev/mapper/diskspace-usrlocal 500G 362G 139G 73% /usr/local
/dev/mapper/diskspace-var 20G 8.0G 13G 40% /var
/dev/mapper/diskspace-home 250G 208G 42G 84% /home
/dev/mapper/diskspace-steam 640G 483G 127G 80% /opt/steam
tmpfs 10M 0 10M 0% /run/user/1000
I traced back it is because the way temporary memory is assigned on boot time from initrd here: /usr/share/initramfs-tools/init
27 # Note that this only becomes /dev on the real filesystem if udev's scripts
28 # are used; which they will be, but it's worth pointing out
29 mount -t devtmpfs -o nosuid,mode=0755 udev /dev
30 mkdir /dev/pts
31 mount -t devpts -o noexec,nosuid,gid=5,mode=0620 devpts /dev/pts || true
32 mount -t tmpfs -o "noexec,nosuid,size=10%,mode=0755" tmpfs /run
33 mkdir -m 0755 /run/initramfs
It creates /run with 10% memory usage limitation (which stills insanely high for a 32 GB of RAM system), but not on /dev. I was able to fix enforcing size on line 29, like this:
mount -t devtmpfs -o nosuid,mode=0755,size=10M udev /dev
So I'm not sure if this is bug or something that could have initram.conf to permit setup properly. But it exists. And all my Debian/Ubuntu systems display the same.
Note: after enforcing /dev to 10MB over the steam box, I never got swap in use again.
Vänliga hälsningar/Best Regards,
Helio Loureiro
http://helio.loureiro.eng.brhttps://se.linkedin.com/in/helioloureirohttp://twitter.com/helioloureiroNote: if you failed to reach me, try my alternative mail "
helio.loureiro@gmail.com".
I'm implementing DKIM on my mail server, so some disturbance is expected.