How to change the size of SHM in stretch testing ?

Kernels & Hardware, configuring network, installing services

How to change the size of SHM in stretch testing ?

Postby DoubleHP » 2017-05-04 18:45

stretch

Want to change the size of SHM ... grep /etc told me to edit /etc/default/tmpfs ... which says to read man 5 tmpfs ... which mentions the deprecated fstab approach.

In /etc/default/tmpfs I tried SHM_SIZE=3001001001 SHM_SIZE=80% and SHM_SIZE=80%VM ... none of these had any effect upon reboot.

All tips I have found in Google are deprecated and not applicable to Stretch.
DoubleHP
 
Posts: 14
Joined: 2016-10-09 08:55

Re: How to change the size of SHM in stretch testing ?

Postby DoubleHP » 2017-05-05 08:21

There is a bug, but I need someone to confirm it:
- SHM_SIZE= being ignored
- manpage mentionning fstab

For now, my fix will be "mount -o remount,size=65% /dev/shm" that can be run in rc.local or contrab in a @reboot line.

But this is not a good fix. Seems to not work the good way. I am doing this inside a Virtualbox guest. Since 6 months, the guest has 4GB RAM, 2GB SHM, and uses 1.8GB of it. From host point of view, process of guest ws using 650MB of RAM since ever. After doing the mount resize (expanding SHM from 2GB to 2.6GB), the host sees the memory usage for guest process to be 3.2GB ... so, the mount command triggers a bad systemcall and is obviously suboptimal. In either case, the guest can use 1.8 or 2.2GB in SHM, but, in the past, when guest stops using SHM, memory is given back to host; now that memory is completely afforded to guest process, even when guest stops needing that space, memory remains allocated to the guest, and can not be given to an other guest. This remains this way untill I shutdown the guest; a simple reboot of the guest does not help (cause reboot happens in the same guest process).

Note that when I tried SHM_SIZE= ... the memory allocated by guest PID had raised to high values, without having /dev/shm enlarged.
DoubleHP
 
Posts: 14
Joined: 2016-10-09 08:55


Return to System configuration

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable