Page 1 of 2
VirtualBox using all hosts physical RAM
Posted: 21. Nov 2017, 18:11
by Virtualizateron
Hi there,
Whenever I leave the guest running, VIrtualbox in the host consumes more and more RAM (as measured by top) until over around 12 hours, the hosts physical RAM (8 gig) runs out and the swap file grows gigabytes large and the whole host system slows to a crawl.
Meanwhile, the ram usage reported by the guest OS remains relatively low (around 1 gig)
The guest OS is only running Nginx / PHP to manage an install of Nextcloud, however it's only used by one user (me). It's usually running KDE, but no apps X apps.
Shutting down and restarting the guest resets the memory usage and everything runs fine again for a while until the ram usage creeps up again.
Is there any info I can provide to help track down the issue?
Tech specs:
VirtualBox version:
5.1.30_Ubuntu r118389
Host:
Kubuntu 17.10 64 bit 8gig ram
RAM: 8gig;
Guest:
Debian 8.9 - 64 bit
Kernel: x86_64 3.16.0-4-amd64
Ram: 4988mb
CPU: AMD FX-8120 Eight-core @ 3.11Ghz
No guest extensions installed
Re: VirtualBox using all hosts physical RAM
Posted: 21. Nov 2017, 18:23
by Perryg
I have not seen a memory leak like this for a long time. But you are not using the official version of VirtualBox. Yours is the distros version. So the choices for you is to ask them or remove theirs and install the one from virtualbox.org.
Re: VirtualBox using all hosts physical RAM
Posted: 21. Nov 2017, 18:49
by Virtualizateron
Ok, thanks for the response. I've actually been having this issue since I started with VB about 2 years ago. I'm fine with installing the version from virtualbox dot org, but the latest package for Ubuntu on the download page is for 16.04 while I'm on 16.10. Should that package still work OK?
Re: VirtualBox using all hosts physical RAM
Posted: 21. Nov 2017, 18:55
by Perryg
https://www.virtualbox.org/wiki/Linux_Downloads
It has exactly what you want.
Code: Select all
Ubuntu 17.04 ("Zesty") i386 | AMD64
Ubuntu 16.10 ("Yakkety") i386 | AMD64
Ubuntu 16.04 ("Xenial") i386 | AMD64
Ubuntu 14.04 ("Trusty") / 14.10 ("Utopic") / 15.04 ("Vivid") i386 | AMD64
Re: VirtualBox using all hosts physical RAM
Posted: 21. Nov 2017, 19:33
by Virtualizateron
So, you're saying the 17.04 "Zesty" release will still work fine with Ubuntu 17.10 Artful Aardvaark?
Re: VirtualBox using all hosts physical RAM
Posted: 21. Nov 2017, 19:37
by Perryg
Hummm,
Your previous post:
Ubuntu on the download page is for 16.04 while I'm on 16.10 must have been a typo, but yes the 17.04 should work with 17.10.
Re: VirtualBox using all hosts physical RAM
Posted: 21. Nov 2017, 21:38
by Virtualizateron
Ok, thanks. Sorry for any confusion caused by that typo!
Re: VirtualBox using all hosts physical RAM
Posted: 24. Nov 2017, 06:33
by Virtualizateron
So I installed the version from the download page, but now on trying to run the VM and just getting the message:
The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. Executing
'/sbin/vboxconfig'
may correct this. Make sure that you do not mix the OSE version and the PUEL version of VirtualBox.
where: supR3HardenedMainInitRuntime what: 4 VERR_VM_DRIVER_VERSION_MISMATCH (-1912) - The installed support driver doesn't match the version of the user.
I ran the command with sudo, but I still get the message. I gather that this is because I installed the VM on the OSE version, and now I have the PUEL version installed. If one can't run VM's made in the other, then what was the point of installing the PUEL version? Am I missing something?
Re: VirtualBox using all hosts physical RAM
Posted: 24. Nov 2017, 06:37
by socratis
The thing is that you got to make sure that the OSE is completely removed before you install the PUEL. You can't mix the two of them or their components.
Re: VirtualBox using all hosts physical RAM
Posted: 28. Dec 2017, 16:55
by Virtualizateron
So, I got the PUEL version up and running, but... I still get the same problem of the memory usage creeping up and up in the host while the guest memory usage stays low.
Time to file a bug report?
Re: VirtualBox using all hosts physical RAM
Posted: 28. Dec 2017, 18:35
by Perryg
We need a new guest log file ( as an attachment ) and some indication of what exactly is using the memory in this fashion on the host.
Re: VirtualBox using all hosts physical RAM
Posted: 31. Jul 2018, 18:55
by Virtualizateron
OK, here's the guest log in a .tar.gz. I'm not exactly sure what you mean by "some indication of what exactly is using the memory". It's the process titled "VirtualBox" at /usr/lib/virtualbox/VirtualBox and the large amount of ram it's using is listed under the "shared memory" section. Is there further information I could provide that would help?
Re: VirtualBox using all hosts physical RAM
Posted: 2. Aug 2018, 05:37
by Virtualizateron
OK, so I found the "detailed memory information" option in the system monitor app. Here's what it gave me, when VirtualBox was using 4.2GiB:
Code: Select all
4220960 KB /dev/zero (deleted)
151488 KB [heap]
356 KB /usr/lib/virtualbox/VBoxVMM.so
264 KB /usr/lib/virtualbox/VBoxDD.so
136 KB /usr/lib/virtualbox/components/VBoxC.so
136 KB /usr/lib/virtualbox/VBoxRT.so
56 KB /usr/lib/virtualbox/VBoxDDU.so
44 KB /memfd:pulseaudio (deleted)
40 KB /usr/lib/virtualbox/VBoxXPCOM.so
40 KB /usr/lib/virtualbox/VirtualBox.so
32 KB /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.9.5
28 KB /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5.9.5
24 KB /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.9.5
20 KB /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.9.5
12 KB /usr/lib/virtualbox/components/VBoxXPCOMIPCC.so
12 KB /usr/lib/x86_64-linux-gnu/qt5/plugins/styles/breeze.so
12 KB /usr/lib/x86_64-linux-gnu/libKF5XmlGui.so.5.44.0
12 KB /lib/x86_64-linux-gnu/libc-2.27.so
8 KB /usr/lib/virtualbox/VBoxGuestControlSvc.so
8 KB /usr/lib/virtualbox/VBoxDragAndDropSvc.so
8 KB /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-11.1.so
8 KB /usr/lib/x86_64-linux-gnu/libpulse.so.0.20.2
8 KB /usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so
8 KB /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1
8 KB /lib/x86_64-linux-gnu/libpthread-2.27.so
8 KB /lib/x86_64-linux-gnu/ld-2.27.so
8 KB [stack]
4 KB /[aio] (deleted)
4 KB /usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/KDEPlasmaPlatformTheme.so
4 KB /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
4 KB /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
4 KB /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25
You can see the impact on my ram usage and CPU usage when I shut the VM down in the image attached (even though it was essentially idling without doing anything at the time):
So... Any ideas?
Re: VirtualBox using all hosts physical RAM
Posted: 2. Aug 2018, 11:33
by mpack
In case it wasn't already clear above: if you want support for the Ubuntu fork of VirtualBox (which is what you are using), then please go to the Ubuntu forums.
This site only supports VirtualBox, not the tribute band versions.
Re: VirtualBox using all hosts physical RAM
Posted: 7. Aug 2018, 08:16
by Virtualizateron
mpack wrote:This site only supports VirtualBox, not the tribute band versions.
I *am* trying to use the Oracle version, not the Ubuntu version:
Virtualizateron wrote:So, I got the PUEL version up and running, but... I still get the same problem of the memory usage creeping up and up in the host while the guest memory usage stays low.
Just to be certain though, I once again ran sudo apt remove virtualbox* and then downloaded and installed the deb from
https://www.virtualbox.org/wiki/Linux_Downloads. I've attached a screenshot of the Help > About screen. As I mentioned before, despite doing this, I'm still seeing the shared usage of Virtualbox creep up over time.
Is there something else I need to do, to be using the Oracle version?
If not, here's the memory breakdown, once again with /dev/zero appearing to be the source/symptom of the problem:
Private
hide
5302172 KB /dev/zero (deleted)
25368 KB [heap]
564 KB /usr/lib/virtualbox/VBoxVMM.so
244 KB /usr/lib/virtualbox/VBoxDD.so
176 KB /usr/lib/virtualbox/VBoxRT.so
132 KB /usr/lib/virtualbox/components/VBoxC.so
60 KB /usr/lib/virtualbox/VBoxDDU.so
44 KB /usr/lib/virtualbox/VirtualBox.so
40 KB /usr/lib/virtualbox/VBoxXPCOM.so
32 KB /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.9.5
28 KB /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5.9.5
24 KB /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.9.5
20 KB /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.9.5
12 KB /usr/lib/virtualbox/components/VBoxXPCOMIPCC.so
12 KB /usr/lib/x86_64-linux-gnu/qt5/plugins/styles/breeze.so
12 KB /usr/lib/x86_64-linux-gnu/libKF5XmlGui.so.5.44.0
12 KB /lib/x86_64-linux-gnu/libc-2.27.so
8 KB /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-11.1.so
8 KB /usr/lib/x86_64-linux-gnu/libpulse.so.0.20.2
8 KB /usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so
8 KB /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1
8 KB /lib/x86_64-linux-gnu/libpthread-2.27.so
8 KB /lib/x86_64-linux-gnu/ld-2.27.so
8 KB [stack]
4 KB /usr/lib/virtualbox/VBoxREM.so
4 KB /[aio] (deleted)
4 KB /usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/KDEPlasmaPlatformTheme.so
4 KB /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
4 KB /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
4 KB /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25