<EDIT>
This is not necessary.
Both Jack1 and Jack2 uses shm (RAM-backed storage) by default. >> https://wiki.linuxaudio.org/wiki/system ... ilesystems
Verifiable with:
Code: Select all
ls -alFh /dev/shm
Code: Select all
du -h /dev/shm/*
Code: Select all
df -h | grep shm
Code: Select all
mount | grep shm
But resizing is possible by "size=".
- Jack Winter wrote:
/dev/shm is a tmpfs even if you haven't mounted it so in fstab, it's automatic nowdays, and as all tmpfs by default it gets a maximum of half your ram.
https://www.cyberciti.biz/tips/what-is- ... usage.html
Code: Select all
┌───────────┬──────────────┬────────────────┐
│ /dev/shm │ always tmpfs │ Linux specific │
├───────────┼──────────────┼────────────────┤
│ /tmp │ can be tmpfs │ FHS 1.0 │
├───────────┼──────────────┼────────────────┤
│ /var/tmp │ never tmpfs │ FHS 1.0 │
└───────────┴──────────────┴────────────────┘
https://superuser.com/a/1030777
<EDIT>
khz wrote: ↑Thu Dec 08, 2022 7:14 pmI had a total of 8 GB RAM installed in the computer.
With the shm entry in the fstab [1] he shows me this:
khz wrote: ↑Wed Jan 02, 2019 5:48 pmCode: Select all
~ $ df -h shm 7,4G 155M 7,2G 3% /dev/shm tmpfs 7,4G 12K 7,4G 1% /tmp
Without the shm entry in the fstab [1] he shows me this:
[1]
Code: Select all
shm /dev/shm tmpfs nodev,nosuid,noexec,size=7500M 0 0
</EDIT>
</EDIT>
I've been using this entry for years. Since I wrote this, I want to ask if this is correct, just to be on the safe side.
Is that true?
khz wrote:@realTimeConfigQuickScan
Code: Select all
** Warning: no tmpfs partition mounted on /tmp
As "root" in the console, add "nano /etc/fstab":
Code: Select all
shm /dev/shm tmpfs nodev,nosuid,noexec,size=7500M 0 0 tmpfs /tmp tmpfs defaults,size=7500M,mode=1777 0 0
("size=7500M" <-- adjusted to your actually built-in RAM, size=lessM than actually built-in RAM. (M = Megabyte).)
("F2" "yes" "enter") and computer "reboot".>> "tmpfs /tmp tmpfs defaults,size=7500M,mode=1777 0 0" is still useful when you compile a lot. But it has nothing to do with audio/jack. <<
@shm
http://jackaudio.org/faq/build_info.html
(For Linux only) tmpfs file system
JACK’s performance on Linux is much improved if it can use a “tmpfs” (shared memory) file system for certain purposes. Specifically, it will try to use a tmpfs filesystem mounted on /dev/shm by default. You can test if you have this already by running the following command in a terminal:Code: Select all
mount | grep shm
If it generates any output, you are all set. Most modern Linux systems will be this way. If yours is not then we are going to assume that you know what you are doing and understand how to set up a new tmpfs filesystem and how to tell JACK to use it.
https://wiki.archlinux.org/index.php/Pu ... n_a_chroot
/dev/shm should also be mounted for efficiency and good performance.
https://www.spinics.net/lists/linux-aud ... 29692.html
> JACK compiled with System V SHM support.
cannot create /dev/shm/jack-1000 directory (Permission denied)
Hi,
It seems pretty clear to me that this is a permissions problem, not a
kernel issue. I would suggest looking at how shm is mounted in your
distro and whether users are given access. On my Gentoo machine I have
this in fstab:Code: Select all
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
For me, using udev, it gets the job done.
NOTE: This also might be a groups issue. If your distro has an 'audio'
group, for instance, and if your securities setup enforces a user
being part of that group to use /dev/shm then this might stop you from
being able to creat /dev/shm/jack-1000 when you try to run Jack as a
normal user.
I think it's a good idea to use it.
- JACK/Audio2RAM is everything! -
@tmps
Why does the script issue this warning?
"tmpfs /tmp tmpfs defaults,size=7500M,mode=1777 0 0" isn't needed by jack anymore, is it?
This "tmpfs /tmp tmpfs defaults,size=7500M,mode=1777 0 0" entry is definitely helpful, for example for daily compile.
https://wiki.linuxaudio.org/wiki/system ... ilesystems
Both Jack1 and Jack2 now use /dev/shm/ so mounting /tmp/ to tmpfs is not necessary anymore.
EDIT:
https://superuser.com/questions/45342/w ... 5509#45509
/dev/shm is a temporary file storage filesystem, i.e., tmpfs, that uses RAM for the backing store. It can function as a shared memory implementation that facilitates IPC.
Recent 2.6 Linux kernel builds have started to offer /dev/shm as shared memory in the form of a ramdisk, more specifically as a world-writable directory that is stored in memory with a defined limit in /etc/default/tmpfs. /dev/shm support is completely optional within the kernel config file. It is included by default in both Fedora and Ubuntu distributions, where it is most extensively used by the Pulseaudio application. (Emphasis added.)
/tmp is the location for temporary files as defined in the Filesystem Hierarchy Standard, which is followed by almost all Unix and Linux distributions.
Since RAM is significantly faster than disk storage, you can use /dev/shm instead of /tmp for the performance boost, if your process is I/O intensive and extensively uses temporary files.
To answer your questions: No, you cannot always rely on /dev/shm being present, certainly not on machines strapped for memory. You should use /tmp unless you have a very good reason for using /dev/shm.
Remember that /tmp can be part of the / filesystem instead of a separate mount, and hence can grow as required. The size of /dev/shm is limited by excess RAM on the system, and hence you're more likely to run out of space on this filesystem.
<EDIT>Removed</EDIT>