shm tmps

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 50 times
Been thanked: 74 times
Contact:

Re: shm tmps

Post by raboof »

Jack Winter wrote:I think it would be exceedingly hard to make a script like realTimeConfigQuickScan perfect. Maybe best to take it as suggestions and not as the gospel truth.
It would indeed be impossible to make such a script perfect, but I still think it is much more useful to solidify our collective knowledge about tuning systems for audio in such a script (with all relevant links/references/explanations) rather than having it spread out over many forum posts :).

The code is at https://github.com/raboof/realtimeconfigquickscan/ . I don't do a ton of linux audio tuning myself anymore, but I very much welcome people to contribute and/or help reviewing!
User avatar
protozone
Established Member
Posts: 181
Joined: Tue May 08, 2018 9:02 pm
Contact:

Re: shm tmps

Post by protozone »

@khz

Thanks for the recent reply.
You were right about everything, pretty much.

And yes, the error I had from using the wrong RAM settings wasn't critical; I might have booted into Puppy Linux to edit fstab.
But I wasn't totally worried anyhow, since I always have a SWAP partition happening. I figured if I accidentally locked the system out of it's own RAM or something, it would just page as needed to SWAP for a while and keep going. The dmesg thing I got was some kind of path permissions error. But I could be wrong about a lot.

Do you know of a good file hosting site I could use to upload a PDF of my list of DAW optimizations?
Jack Winter
Established Member
Posts: 381
Joined: Sun May 28, 2017 3:52 pm

Re: shm tmps

Post by Jack Winter »

Github?
Reaper/KDE/Archlinux. i7-2600k/16GB + i7-4700HQ/16GB, RME Multiface/Babyface, Behringer X32, WA273-EQ, 2 x WA-412, ADL-600, Tegeler TRC, etc 8) For REAPER on Linux information: https://wiki.cockos.com/wiki/index.php/REAPER_for_Linux
User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

Re: shm tmps

Post by khz »

protozone wrote:You were right about everything, pretty much.
If the "you" stands for "we" (Linuxmusicians) then yes. We collect information, test and share our knowledge. :D
protozone wrote:Do you know of a good file hosting site I could use to upload a PDF of my list of DAW optimizations?
I'm afraid I can't help you there. Open a new thread and ask. There must be someone here who can give you a hint.
raboof wrote:It would indeed be impossible to make such a script perfect, but I still think it is much more useful to solidify our collective knowledge about tuning systems for audio in such a script (with all relevant links/references/explanations) rather than having it spread out over many forum posts :).
Hi raboof, THX 4 teh realTimeConfigQuickScan Very helpful! \o/ THX == :like:
. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
Drumfix
Established Member
Posts: 299
Joined: Mon Jan 26, 2009 5:15 pm
Been thanked: 11 times

Re: shm tmps

Post by Drumfix »

User avatar
protozone
Established Member
Posts: 181
Joined: Tue May 08, 2018 9:02 pm
Contact:

Re: shm tmps

Post by protozone »

thanks for the good reads.

for what it's worth, i just test-installed xubuntu 64-bit today and i noticed that the tmpfs fstab thingy was in there by default. that's the first time i've ever seen that done in 'buntu without user intervention.

i would've kept the install, but something went wrong and my hard drive partitions and dvd-rom/cd-rom and usb drives were not being mounted or noticed. so i had to delete the whole thing and go back to MX Linux. the funny thing is, as soon as I formatted the partition, it popped up on the MX Linux desktop as available. But just before that, each distro couldn't see the other while both coexisting on the same drive. it might have been a mount point problem, but i tried to put them in separate partitions. i've done this type of thing in the past, but somehow it didn't work this time.

i will try again later.
User avatar
khz
Established Member
Posts: 1648
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 42 times
Been thanked: 92 times

Re: shm tmps

Post by khz »

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.

From Wikipedia:

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.
If now both entries are present that is rather unfavorable, isn't it?
No, it doesn't matter. Works.
. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW
  • I don't care about the freedom of speech because I have nothing to say.
Post Reply