[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#912588: marked as done (initramfs dedicating 50% of RAM memory for udev)



Your message dated Thu, 1 Nov 2018 17:14:29 +0100
with message-id <2018-11-01T17-08-08@devnull.michael-prokop.at>
and subject line Re: Bug#912588: initramfs dedicating 50% of RAM memory for udev
has caused the Debian Bug report #912588,
regarding initramfs dedicating 50% of RAM memory for udev
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
912588: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=912588
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
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.br
https://se.linkedin.com/in/helioloureiro
http://twitter.com/helioloureiro

Note: 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.

--- End Message ---
--- Begin Message ---
* Helio Loureiro [Thu Nov 01, 2018 at 04:32:45PM +0100]:

> 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%.

[...]

> 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.

This is #862013, so either:

1) configure it via /etc/fstab, like `tmpfs /run tmpfs nosuid,noexec,size=500M 0 0`
   and don't forget to rebuild the initramfs afterwards)

or

2) use initramfs-tools >=0.131 with its:
   a) new initramfs.runsize kernel/boot option or
   b) RUNSIZE=... configuration option in initramfs.conf

regards,
-mika-

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply to: