Memory Swap Issues

Swap space on a hard drive has been with Linux from almost the beginning. Ram was very expensive and swap let things like kernel building happen. However, the use of swap to disk during audio tasks is the death of the track being recorded, or a noticeable audio glitch in a live performance.

What can be done?

My guess is that more Ram and swappiness set to 1 or even 0 would be the best start. Trying to use zram may be a help too if the user is careful to keep essential audio tasks from going in there. I don't know if this is possible. Turning swap off while recording might be something to try too. More testing needed.

Memory Leaks

While looking at swap another issue was found. Some programs have memory leaks. That is a program keeps asking for some memory, but never gives up memory it no longer needs. Swappiness can be set to zero, but if a program has a memory leak, at some point the Linux kernel will push even programs that are idle for only a short time into swap so it can grant memory to the leaking program.

UbuntuStudio/audio-settings/swap (last edited 2012-05-24 13:37:14 by len-ovenwerks)