Audio delay when VM is running

Hi guys. First of all sorry for my english, it is really bad.
I have an issue with the audio. When my computer is using more than 6gb of RAM, the audio output is delayed like 2 seconds.
It only happens under this condition and only with the audio (the system runs completely smooth and fine) , the rest of the time the audio works perfectly.
I have 16gb of RAM, so I think that I have enough.

For example, now I am using a virtual machine and a browser, and my system is using 7,5gb of ram. When I try to play a video on YouTube, or any kind of audio, it sounds delayed.

Hope you can help me.
Thank you!

System: Manjaro KDE kernel 5.12

This issue is most likely not caused by the amount of RAM you have in use ─ as the matter of fact, I don’t see how that could technically have any effect on the sound ─ but rather by the load on your CPUs, and specifically, that part of the load which is made up of high-priority processes, such as I/O.

Running a virtual machine may be part of this, but a lot also depends on what is running inside of that virtual machine.

Actually is the same. If I just have the VM turned on without any program opened, it happens.
That’s why I thought that the problem was the RAM.

Maybe it could be problem of the CPU, I will check.

Thanks for your answer!

What could be happening is that your system is swapping a lot. That’s I/O, and I/O is uninterruptible. That would certainly affect the snappiness of your system.

I’ve adjusted the confusing topic title accordingly.

1 Like