Page 2 of 4

Re: Wiki update

Posted: Mon Dec 31, 2018 2:22 pm
by lilith
Thanks, I downloaded the new version.

Re: Wiki update

Posted: Mon Dec 31, 2018 2:26 pm
by khz
noedig wrote:

Code: Select all

lowlatency.linuxaudio.org      Linux Audio Low-Latency Performance How-To
lilith@realTimeConfigQuickScan wrote:

Code: Select all

** Warning: no tmpfs partition mounted on /tmp
   For more information, see:
   - http://wiki.linuxaudio.org/wiki/system_configuration#tmpfs
   - http://lowlatency.linuxaudio.org
So the lowlatency.linuxaudio homepage had dealt with the "tmpfs" / "shm" topic?

Re: Wiki update

Posted: Mon Dec 31, 2018 2:30 pm
by lilith
khz wrote:
noedig wrote:

Code: Select all

lowlatency.linuxaudio.org      Linux Audio Low-Latency Performance How-To
lilith@realTimeConfigQuickScan wrote:

Code: Select all

** Warning: no tmpfs partition mounted on /tmp
   For more information, see:
   - http://wiki.linuxaudio.org/wiki/system_configuration#tmpfs
   - http://lowlatency.linuxaudio.org
So the lowlatency.linuxaudio homepage had dealt with the "tmpfs" / "shm" topic?
I got the same warning with the old version.

Re: Wiki update

Posted: Mon Dec 31, 2018 2:50 pm
by khz
As far as I remember you had both entries ("shm/tmpfs") in /etc/fstab and later removed the "tmpfs" entry.
If so: Logical because the script searches for "tmpfs" and you only entered "shm".
Only adding the "shm" entry is correct . According to jack Homepage jack uses "shm".

Re: Wiki update

Posted: Mon Dec 31, 2018 3:03 pm
by lilith
khz wrote:As far as I remember you had both entries ("shm/tmpfs") in /etc/fstab and later removed the "tmpfs" entry.
If so: Logical because the script searches for "tmpfs" and you only entered "shm".
Only adding the "shm" entry is correct . According to jack Homepage jack uses "shm".
Exactly, so this needs to be changed in the script :D

Re: Wiki update

Posted: Mon Dec 31, 2018 3:18 pm
by khz
If what I wrote is true. I have found very little in the intenet on this subject. That surprises me.
I don't have any current links on this topic and of us audio users we are the only two who may have entered this entry in the fstab? ;-)
EDIT: Added "size=7500M" to shm.

Re: Wiki update

Posted: Mon Dec 31, 2018 4:37 pm
by raboof
lilith wrote:
khz wrote:As far as I remember you had both entries ("shm/tmpfs") in /etc/fstab and later removed the "tmpfs" entry.
If so: Logical because the script searches for "tmpfs" and you only entered "shm".
Only adding the "shm" entry is correct . According to jack Homepage jack uses "shm".
Exactly, so this needs to be changed in the script :D
What exactly do you think should be changed in the script? Could you propose a PR?

Re: Wiki update

Posted: Mon Dec 31, 2018 5:01 pm
by khz

Re: Wiki update

Posted: Wed Jan 02, 2019 1:44 pm
by lilith
khz suggested to add the size of the RAM in the shm line in fstab:

Code: Select all

shm           /dev/shm     tmpfs         nodev,nosuid,noexec,size=7500M      0 0
I forgot the M after 7500 and the result was that Jack didn't start, even Chromium and Firefox didn't start. There where some IO errors shown. After adding the M all is working fine again. Crazy how this affects things.

Re: Wiki update

Posted: Wed Jan 02, 2019 2:38 pm
by Jack Winter
FWIW & IIRC /dev/shm defaults to half of your ram as do the other tmpfs that you have mounted. Changing this is probably mostly useful if you want to limit how much an app can use, not that I've ever seen one actually using much at all. If you don't need to either make it smaller nor bigger then it's probably easier to leave it out of fstab altogether..

Re: Wiki update

Posted: Wed Jan 02, 2019 2:44 pm
by lilith
Jack Winter wrote:FWIW & IIRC /dev/shm defaults to half of your ram as do the other tmpfs that you have mounted. Changing this is probably mostly useful if you want to limit how much an app can use, not that I've ever seen one actually using much at all. If you don't need to either make it smaller nor bigger then it's probably easier to leave it out of fstab altogether..
Thanks, I'll change it to 4000M then. When I looked very little was used always.

e.g. now:

tmpfs 7,4G 188M 7,2G 3% /dev/shm

BTW: When is it used or what are the criteria when shm is used and when normal RAM?

Re: Wiki update

Posted: Wed Jan 02, 2019 3:14 pm
by Jack Winter
JACK uses it by default and it was added as a config option for the kernel back in 2.x.

IIRC, back then JACK used /tmp, but was changed to use /dev/shm when that became a standard feature of the kernel. IMO there really isn't any reason at all to bother with this, unless you really are paranoid and would want to make sure that no malicious application starves you of RAM, but if so then you really ought to do the same with all your tmpfs mounts too.. ;)

Re: Wiki update

Posted: Wed Jan 02, 2019 3:19 pm
by khz
I have "size" in the fstab to define the maximum RAM usage. The gcc can also occupy 512 GB RAM. I'm wondering if internet RAM wouldn't be the better solution https://www.cs.swarthmore.edu/~newhall/nswap2L.html.

Re: Wiki update

Posted: Wed Jan 02, 2019 3:22 pm
by lilith
I'll take it out completely. As stated somewhere else this is also better for SSD on the long-term.

Re: Wiki update

Posted: Wed Jan 02, 2019 4:35 pm
by lilith
Jack Winter wrote:JACK uses it by default and it was added as a config option for the kernel back in 2.x.

IIRC, back then JACK used /tmp, but was changed to use /dev/shm when that became a standard feature of the kernel. IMO there really isn't any reason at all to bother with this, unless you really are paranoid and would want to make sure that no malicious application starves you of RAM, but if so then you really ought to do the same with all your tmpfs mounts too.. ;)
If I don't have any entry in fstab it is still used as it is in the kernel by default? Can this be checked somehow?