Pulseaudio – Does Pulseaudio Leak Memory?

memorypulseaudiotop

I invoked the top command and got this:

 PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                  
3433 klutt     20   0 4790760   1.0g 282208 S   8.3   4.2   1261:15 firefox-esr              
2063 klutt      9 -11 3424532  33644  24432 S   7.0   0.1 432:44.69 pulseaudio               
3681 klutt     20   0 3958364 545000 139800 S   6.6   2.2 434:35.72 Web Content       

I understand that firefox and Web content are using a lot of memory, but pulseaudio? Is it normal that it is using over 3GB? Is it a bug?

$ uname -a
Linux desktop 5.7.0-1-amd64 #1 SMP Debian 5.7.6-1 (2020-06-24) x86_64 GNU/Linux

$ pulseaudio --version
pulseaudio 13.0

$ cat /etc/debian_version 
bullseye/sid

Best Answer

In your example, pulseaudio is using 32MB not 3GB. The RES column is physical memory. The VIRT column shows all the virtual memory used by the process. According to man top, that includes all code, data, and shared libraries plus pages that have been swapped out and pages that have been mapped but not used.

Related Question