Pulseaudio using up to 3gb of ram???

Been trying to optimise Manjaro and noticed Pulseaudio at idle or boot uses 1.4GB of ram on it's own. Turn on youtube or Audacious and this practically doubles. I can't figure out why. I don't have a swap partition (no option to do so when installing not that I would anyway as normally the system uses around 700mb of ram and I have 16GB of it) so any ideas what's up?



[john@john-pc ~]$ inxi -Fxz
Host: john-pc Kernel: 5.3.6-1-MANJARO x86_64 bits: 64 compiler: gcc
v: 9.2.0 Desktop: Xfce 4.14.1 Distro: Manjaro Linux
Type: Desktop Mobo: Micro-Star model: B450 TOMAHAWK MAX (MS-7C02) v: 1.0
serial: UEFI: American Megatrends v: 3.20 date: 08/29/2019
Topology: 6-Core model: AMD Ryzen 5 3600X bits: 64 type: MT MCP arch: Zen
L2 cache: 3072 KiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
bogomips: 91245
Speed: 2799 MHz min/max: 2200/3800 MHz Core speeds (MHz): 1: 2880 2: 2684
3: 3694 4: 2113 5: 1862 6: 2052 7: 3612 8: 2059 9: 3042 10: 2790 11: 1979
12: 2101
Device-1: NVIDIA GP106 [GeForce GTX 1060 6GB] vendor: Micro-Star MSI
driver: nvidia v: 435.21 bus ID: 26:00.0
Display: x11 server: X.Org 1.20.5 driver: nvidia
resolution: 1920x1080~60Hz
OpenGL: renderer: GeForce GTX 1060 6GB/PCIe/SSE2 v: 4.6.0 NVIDIA 435.21
direct render: Yes
Device-1: NVIDIA GP106 High Definition Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel bus ID: 26:00.1
Device-2: AMD Starship/Matisse HD Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel bus ID: 28:00.4
Sound Server: ALSA v: k5.3.6-1-MANJARO
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Micro-Star MSI driver: r8169 v: kernel port: f000 bus ID: 22:00.0
IF: enp34s0 state: up speed: 1000 Mbps duplex: full mac:
Local Storage: total: 932.95 GiB used: 219.75 GiB (23.6%)
ID-1: /dev/nvme0n1 vendor: Corsair model: Force MP510 size: 447.13 GiB
ID-2: /dev/sda vendor: Samsung model: SSD 860 EVO 250GB size: 232.89 GiB
ID-3: /dev/sdb vendor: Samsung model: SSD 840 PRO Series size: 238.47 GiB
ID-4: /dev/sdc type: USB vendor: Toshiba model: USB FLASH DRIVE
size: 14.45 GiB
ID-1: / size: 438.82 GiB used: 62.16 GiB (14.2%) fs: ext4
dev: /dev/nvme0n1p2
System Temperatures: cpu: 58.5 C mobo: N/A gpu: nvidia temp: 60 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Processes: 314 Uptime: 3d 10h 00m Memory: 15.65 GiB used: 6.39 GiB (40.8%)
Init: systemd Compilers: gcc: 9.2.0 Shell: bash v: 5.0.11 inxi: 3.0.36
[john@john-pc ~]$

The more memory you have - the base system will make use of it.

But I think you misread the statistic - I see something like it using htop but here it is virtual and the actual mem% is 0


The memory statistics can be a little confusing because you have to know how Linux actually handles memory.

How do I see how much free ram I really have?

To see how much ram your applications could use without swapping, run free -m and look at the "available" column:

$ free -m
           total     used     free    shared  buff/cache   available
Mem:        1504     1491       13         0         855      792
Swap:       2047        6     2041

This is your answer in MiB. If you just naively look at "used" and "free", you'll think your ram is 99% full when it's really just 47%!

-- https://www.linuxatemyram.com

When should I start to worry?

A healthy Linux system with more than enough memory will, after running for a while, show the following expected and harmless behavior:

  • free memory is close to 0
  • used memory is close to total
  • available memory (or "free + buffers/cache") has enough room (let's say, 20%+ of total)
  • swap used does not change

Warning signs of a genuine low memory situation that you may want to look into:

  • available memory (or "free + buffers/cache") is close to zero
  • swap used increases or fluctuates
  • dmesg | grep oom-killer shows the OutOfMemory-killer at work

-- https://www.linuxatemyram.com


[john@john-pc ~]$ free -m
free: Multiple unit options doesn't make sense.

I terminated the task at 3.2GB and my audio didn't turn off which was a result. It has slowly raised from 200mb to 605mb so far. It never drops... I think it might be a memory leak as it got updated recently in pacman.

Changing default settings in Pulseaudio is worthwhile to improve audio quality but will create bigger CPU load and use more RAM

please post pulseaudio --dump-conf to show settings in use

1 Like

That is a possibility - not a bad thought - maybe investigate which app is causing pulseaudio to increase memory usage?

1 Like

[john@john-pc ~]$ pulseaudio --dump-conf

Read from configuration file: /etc/pulse/daemon.conf

daemonize = no
fail = yes
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 5
allow-module-loading = yes
allow-exit = yes
use-pid-file = yes
system-instance = no
local-server-type = user
cpu-limit = no
enable-shm = yes
flat-volumes = no
lock-memory = no
exit-idle-time = 20
scache-idle-time = 20
dl-search-path = /usr/lib/pulse-13.0/modules
default-script-file = /etc/pulse/default.pa
load-default-script-file = yes
log-target =
log-level = notice
resample-method = auto
avoid-resampling = no
enable-remixing = yes
remixing-use-all-sink-channels = yes
enable-lfe-remixing = no
lfe-crossover-freq = 0
default-sample-format = s16le
default-sample-rate = 44100
alternate-sample-rate = 48000
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 4
default-fragment-size-msec = 25
enable-deferred-volume = yes
deferred-volume-safety-margin-usec = 8000
deferred-volume-extra-delay-usec = 0
shm-size-bytes = 0
log-meta = no
log-time = no
log-backtrace = 0
rlimit-fsize = -1
rlimit-data = -1
rlimit-stack = -1
rlimit-core = -1
rlimit-rss = -1
rlimit-as = -1
rlimit-nproc = -1
rlimit-nofile = 256
rlimit-memlock = -1
rlimit-locks = -1
rlimit-sigpending = -1
rlimit-msgqueue = -1
rlimit-nice = 31
rlimit-rtprio = 9
rlimit-rttime = 200000
[john@john-pc ~]$

My whole OS is pretty wierd.

I went from an Intel CPU to AMD cpu on the same install on a sata ssd and it worked perfectly, used little to no ram, etc.

Then I did a fresh install of the latest Manjaro XCFE to a top spec NVME SSD (Corsair MP510) and it performs slower, firefox isn't behaving as usual (not showing most visited sites in address bar - that option seems to have vanished), if I disable disk cache and use ram cache in Firefox, Google Streetview won't load any textures...was working fine on the Intel optimised Sata install but won't work well on the AMD optimised pci-3 nvme install?

Doesn't make sense.

The hope was dual boot win10/manjaro using the sata manjaro disk but when I plugged it in and booted up, Windows overwrote the grub partition (!) corrupting the entire disk. Even now, on a formatted / deleted / empty disk it has a windows label that I cannot remove "msftdata" yet it only had a LUKS encrypted Manjaro OS on it.

does not appear to be any changes to Pulseaudio configuration
considering the grub issues and LUKS encryption probably not related to Pulseaudio

1 Like

No the grub issues and LUKS were on the old sata SSD which ran perfectly, this is on an nvme drive.

Really I wish I had just cloned it.

Pulseaudio settings do not appear to have been changed from default so my previous comment has no relevance
does not appear to be a Pulseaudio problem

changed topic tags to try get you some more relevant comments
suggest you edit title of this topic to something more relevant too

1 Like

Is this even a pulseaudio problem? Looking at the image in the OP it looks like a XFCE panel plugin for pulseaudio that's taking up all the ram.

1 Like

What kind of optimizations?

Yes, it is the panel volume control plugin for Xfce. xfce4-pulseaudio-plugin 0.4.2-2.1 does not have any memory leaks on my system. This plugin was updated on 2019-08-13. So if it had a memory leak problem of this magnitude, it should have been noticed (much earlier of course).


1 Like

Was following this guide, ssd trim etc. https://easylinuxtipsproject.blogspot.com/p/1.html It's for Mint so I just use the Linux-wide optimisations. The plugin was doing it from day 1 on this fresh install though.

I left the computer on earlier as usual but with a youtube video paused. Came back and the xfce pulseaudio plugin was using 5.1gb of ram. Combined with a load of open firefox tabs...12gb/16gb used. Terminated it, and it's started up again using 45mb, but over the next few hours it will rise up and up.

Is there any way to limit the memory amount the plugin can use? Or a workaround? I just need volume control in my task bar so it doesn't need to be that specific plugin, right?

Beginning to regret buying expensive fast 2x8gb ddr4 that runs at 3733 CL14 and not buying expensive slightly slower 2x16gb ddr4 that runs at 3733 CL16...

So I uninstalled it, and downloaded a fresh version, but I can't install it.

The simplest way to compile this package is:

  1. 'cd' to the directory containing the package's source code and type
    './configure' to configure the package for your system.

    Running 'configure' might take a while. While running, it prints
    some messages telling which features it is checking for.

[john@john-pc xfce4-pulseaudio-plugin-0.4.2]$ ./configure
bash: ./configure: No such file or directory


Edit: I uninstalled it and reinstalled it via Pacman. So far so good: 49mb for half an hour.

On to my next thread...Plex library positions which is going to be dull an unexciting :confused:


Wow. That is a lot of optimizations. It seems very thorough. But I think my head would have exploded if I read that all at once when I first tried linux. :exploding_head:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by