Description of problem: This very unoptimal behaviour is observed on both F11,F12 (32+64bit). On my netbook i had removd everything except libpulseaudio(for dependency reasons). Pulseaudio-client however still puts 2x64mb files in /dev/shm. A very wasteful thing to do on a netbook with a total of 2gb memory! I decided to test a bit futher: If pulseaudio server and client is installed it uses up to 380 mb in /dev/shm. I am running my netbook without use of any swap-space, and since /dev/shm is of type tmpfs, i cant see the used memory in system-monitor (its virtual memory). This explains why i have seen a tendency for applications to suddenlt crash, even though i still seem to have memory left. Turns out that its simply pulseaudio eating all my memory for no reason. Problem is easyily solved: in /etc/pulse/ i changed client.conf and daemon.conf to disable use of shm. I agree performance is important. But using 380/2048 (19%) of system-memory for pulseaudio, when its not needed, is a huge waste. I suggest use of shm is disabled as default for pulseaudio, or at least for pulseaudio-client. Version-Release number of selected component (if applicable): All How reproducible: check /dev/shm Steps to Reproduce: 1. 2. 3. Actual results: Using 380 mb of memory for pulseaudio in /dev/shm Expected results: Using less than 380 mb of memory for pulseaudio in /dev/shm Additional info:
Please note that anonymous memory mapped is not necessarily memory actually used.
Okay i was not aware of this. Is there any easy way to actually find if the pulseaudio client is actually using the 2x64mb it has allocated in /dev/shm ? And even if the memory is not actually used it prevents other programs from allocating memory in /dev/shm (even if its anonymous memory). Maybe its enough to change the following parameter in pulseaudio configuration: shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB to something like 5/10 mb . (of course depending on the actual pulseaudio usage of these files)
(In reply to comment #2) > Is there any easy way to actually find if the > pulseaudio client is actually using the 2x64mb it has allocated in /dev/shm ? No idea. In file system it looks like the files have holes, which is what I suspect to be unallocated memory: [lkundrak@trurl bear]$ du -sh /dev/shm/* 12K /dev/shm/pulse-shm-3202944171 200K /dev/shm/pulse-shm-3567843226 12K /dev/shm/pulse-shm-607205414 76K /dev/shm/pulse-shm-73718790 [lkundrak@trurl bear]$ du --apparent-size -sh /dev/shm/* 65M /dev/shm/pulse-shm-3202944171 65M /dev/shm/pulse-shm-3567843226 65M /dev/shm/pulse-shm-607205414 65M /dev/shm/pulse-shm-73718790 [lkundrak@trurl bear]$
Yes, Lubomir is right. Those file sizes only reflect allocated address space, not actual memory. Use "du" to find out how much RAM this really uses.
I agree that this problem might not be a serious one. But for machines with low memory (and therefore less available memory in /dev/shm) there is a risk that pulseaudio will quickly allocate all available memory and make it impossible for other programs to use /dev/shm. It seems like pulseaudio uses 200kb/64mb, which might indicate that its a good idea to change the default configuration to limit pulseaudios shm use to 10mb per instance.. 10x3=30mb insteadt of 3x64=192mb allocated memory in /dev/shm. And also, why does pulseaudio client allocate 2x64 mb memory in /dev/shm despite the pulseaudio and alsa-plugin-pulseaudio package being uninstalled?!