Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

How to change the size of SHM in stretch testing ?

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
DoubleHP
Posts: 72
Joined: 2016-10-09 08:55
Has thanked: 1 time

How to change the size of SHM in stretch testing ?

#1 Post by DoubleHP »

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: 72
Joined: 2016-10-09 08:55
Has thanked: 1 time

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

#2 Post by DoubleHP »

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.

Post Reply