Open cryptosven76 opened 3 months ago
PID COMMAND %CPU TIME #TH #WQ #PORT MEM PURG CMPRS PGRP PPID STATE BOOSTS %CPU_ME %CPU_OTHRS UID FAULTS COW MSGSENT MSGRECV SYSBSD SYSMACH CSW PAGEINS IDLEW POWE INSTRS CYCLES JETP USER #MRE RPRV VPRV VSIZ KPRV KSHR 789 multipassd 0.4 27:31.49 22 1 81 24G+ 0B 23G 789 1 sleeping *0[1] 0.00000 0.00000 0 3328701+ 253 5156 1787 19511677+ 60661 4758750+ 795 21577 0.4 7419645 5633897 40 root N/A N/A N/A N/A N/A N/A
you can see it consumed 24G at this time, since the boot of this OS i never started any VM, its in idle state for a week. i see the same behavior on 2 completely independent systems
Hi @cryptosven76,
Thank you for reporting, it looks like we have a memory leak.
@cryptosven76, for the time being, you can try to restart the daemon from time to time. Something like this should do, when your instances are stopped:
sudo launchctl kickstart /Library/LaunchDaemons/com.canonical.multipassd.plist
As a data point, this does not appear to manifest in a snap over a period of ~2h.
i restarted it yesterday and today i have again 3 GB without using it at all. i wonder if this gets triggered by suspend or sleeps states as the growth seems to be much larger on my macbook than on my mac pro workstation.
Hi @cryptosven76, how are you measuring memory? If you are referring to Virtual Memory, it is normal for multipassd
to use 3GB right after being launched. But that is very different from actual RAM being used. Virtual Memory includes a lot of stuff that is not actually loaded, like all the libraries, many of which will be shared by other processes.
I also see multipassd
using 3GB of Virtual Memory right after being launched, but the actual Resident Set Size (memory in RAM) is 88MB, and some of that is shared. For comparison, I see a browser with a dozen tabs using 21GB of Virtual Memory, with RSS being 600 MB.
Of course, if the 3GB you see are RSS, that is a problem, especially if you observe it growing over time.
How many VMs do you have when you see this? Do you usually have them running?
I have similar issue on my Mac. It can grow to sizes that it kills OS (> 24GB) and it happens when there is no VMs running.
Hi @kacperk, sorry you are experiencing this. A few questions to help us understand the issue to better reproduce/debug:
multipassd
been running? Observation from today:
Screen recording - https://letsbuild.d.pr/i/ueIpt0/2VUO5IPqzF This time machine wasn't suspended, no VMs running - just idle.
Great, thank you @kacperk. That should give us enough to track it down.
Describe the bug Describe what your problem is. i noticed that since earlier this year multipassd consumes GB's of memory over time even its not used at all
To Reproduce How, and what happened?
Expected behavior What did you expect to happen? Not growing in consumption if not used.
Logs Please provide logs from the daemon, see accessing logs on where to find them on your platform.
Additional info
multipass info --all Warning: the
--all
flag for theinfo
command is deprecated. Please useinfo
with no positional arguments for the same effect. Name: rex101 State: Stopped Snapshots: 0 IPv4: -- Release: -- Image hash: f885a8e8f62a (Ubuntu 22.04 LTS) CPU(s): -- Load: -- Disk usage: -- Memory usage: -- Mounts: --multipass get local.driver
multipass get local.driver qemuAdditional context multipassd.log
Add any other context about the problem here.