Search code examples
virtual-machinevirtualboxvmwarevmware-workstationubuntu

Same guest OS, different memory usage in Virtualbox and VMWare Workstation


I have Virutalbox 4.3 on a Ubuntu 14.04 machine and VMWare Workstation 11 on a Windows 10 machine. I use the same Lubuntu iso to install a guest OS in both VMs, but after installation, I find they have different memory usage. When idle, the Lubuntu in VMWare takes around 250 MB of memory but the one in Virtualbox only takes around 180 MB. When I do ps aux --sort -rss in them, I found they are not running the same processes. Also, ps aux --sort -rss in VMWare outputs far more items than in Virtualbox. Both have roughly 70 items with non-zero VSZ and RSS, but in VMWare there are 350 items with 0 VSZ and RSS, while in Virtualbox there are only around 50 such items. I don't understand why there is such a difference. They were installed using the same iso, shouldn't they be exactly the same? The following is the output of ps aux --sort -rss in both, with the 0 VSZ and RSS ones removed (otherwise it exceeds the maximum number of chars in question).

The memory usage of Lubuntu in Virtualbox

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
foo       1475  0.3  3.7 723448 38432 ?        Sl   10:00   0:00 pcmanfm --desktop --profile lubuntu
root      1164  1.0  3.3 206040 34344 tty7     Ss+  10:00   0:01 /usr/bin/X -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
foo       1480  0.0  2.8 737016 28616 ?        Sl   10:00   0:00 nm-applet
foo       1468  0.5  2.6 644208 27092 ?        Sl   10:00   0:00 lxpanel --profile Lubuntu
foo       1420  0.1  2.5 474308 25604 ?        Sl   10:00   0:00 /usr/lib/ibus/ibus-ui-gtk3
foo       1478  0.0  2.3 634000 24416 ?        Sl   10:00   0:00 update-notifier
foo       1486  0.0  1.8 405604 19332 ?        Ssl  10:00   0:00 xfce4-power-manager
foo       1465  0.0  1.8 294124 18512 ?        Sl   10:00   0:00 openbox --config-file /home/foo/.config/openbox/lubuntu-rc.xml
foo       1402  0.1  1.6 384904 16752 ?        Ssl  10:00   0:00 /usr/bin/lxsession -s Lubuntu -e LXDE
foo       1482  0.0  1.3 223628 13584 ?        Sl   10:00   0:00 light-locker
foo       1424  0.0  1.3 304468 13560 ?        Sl   10:00   0:00 /usr/lib/ibus/ibus-x11 --kill-daemon
root       782  0.0  1.0 357640 11148 ?        Ssl  10:00   0:00 NetworkManager
foo       2668  0.0  1.0 110124 11036 ?        S    10:01   0:00 xterm -class UXTerm -title uxterm -u8
foo       1381  0.1  0.9 377428 10096 ?        Ssl  10:00   0:00 /usr/bin/ibus-daemon --daemonize --xim
root      1167  0.0  0.9 302224  9944 ?        Sl   10:00   0:00 /usr/lib/accountsservice/accounts-daemon
foo       2504  0.0  0.9 596432  9944 ?        Sl   10:00   0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.7 /org/gtk/gvfs/exec_spaw/0
foo       1489  0.0  0.9 144120  9880 ?        S    10:00   0:00 /usr/lib/x86_64-linux-gnu/xfce4/notifyd/xfce4-notifyd
foo       1426  0.0  0.9 367496  9696 ?        Sl   10:00   0:00 /usr/lib/at-spi2-core/at-spi-bus-launcher
foo       1519  0.0  0.9 312500  9204 ?        Sl   10:00   0:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
whoopsie  1107  0.0  0.8 364960  8988 ?        Ssl  10:00   0:00 whoopsie
root      1836  0.0  0.8 386260  8888 ?        Sl   10:00   0:00 /usr/lib/udisks2/udisksd --no-debug
root       790  0.0  0.8 296008  8676 ?        Sl   10:00   0:00 /usr/lib/policykit-1/polkitd --no-debug
foo       1377  0.0  0.8 249856  8344 ?        Sl   10:00   0:00 gnome-keyring-daemon --start --components gpg
foo       1413  0.0  0.7 296828  7708 ?        Sl   10:00   0:00 /usr/lib/ibus/ibus-dconf
foo       1448  0.0  0.7 220980  7516 ?        Sl   10:00   0:00 /usr/lib/ibus/ibus-engine-simple
root       550  0.0  0.7 330244  7444 ?        Ssl  09:59   0:00 /usr/sbin/ModemManager
root      2374  0.0  0.7 239356  7388 ?        Sl   10:00   0:00 /usr/lib/upower/upowerd
root      1152  0.0  0.7 366536  7284 ?        SLsl 10:00   0:00 lightdm
foo       2201  0.0  0.7 218792  7140 ?        Ssl  10:00   0:00 /usr/lib/x86_64-linux-gnu/menu-cache/menu-cached
foo       1410  0.0  0.6 360436  6972 ?        Sl   10:00   0:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
root      1248  0.0  0.6 168440  6352 ?        Sl   10:00   0:00 lightdm --session-child 12 19
foo       2382  0.0  0.6 287024  6296 ?        Sl   10:00   0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
foo       2393  0.0  0.5 213504  5764 ?        Sl   10:00   0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
root       710  0.0  0.5  74728  5700 ?        Ss   10:00   0:00 /usr/sbin/cupsd -f
foo       1406  0.0  0.5 197704  5392 ?        Sl   10:00   0:00 /usr/lib/gvfs/gvfsd
foo       2444  0.0  0.5 201340  5212 ?        Sl   10:00   0:00 /usr/lib/gvfs/gvfs-mtp-volume-monitor
root       799  0.0  0.5  10240  5208 ?        S    10:00   0:00 /sbin/dhclient -d -sf /usr/lib/NetworkManager/nm-dhcp-client.action -pf /run/sendsigs.omit.d/network-manager.dhclient-eth0.pid -lf /var/lib/NetworkManager/dhclient-2411e21c-8661-47bf-8e5f-4063d3eb28f1-eth0.lease -cf /var/lib/NetworkManager/dhclient-eth0.conf eth0
foo       2672  0.0  0.5  27628  5136 pts/0    Ss   10:01   0:00 bash
foo       2433  0.0  0.4  58164  5032 ?        S    10:00   0:00 /usr/lib/x86_64-linux-gnu/gconf/gconfd-2
foo       1433  0.0  0.4 124920  4828 ?        Sl   10:00   0:00 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
foo       1447  0.0  0.4 178212  4724 ?        Sl   10:00   0:00 /usr/lib/dconf/dconf-service
foo       1662  0.0  0.4  39332  4268 ?        S    10:00   0:00 /usr/lib/x86_64-linux-gnu/xfce4/xfconf/xfconfd
ntp       1018  0.0  0.4  31452  4264 ?        Ss   10:00   0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 105:110
root         1  0.5  0.4  33656  4216 ?        Ss   09:59   0:00 /sbin/init
foo       1270  0.0  0.3  40992  3856 ?        Ss   10:00   0:00 init --user
root       262  0.1  0.3  51816  3740 ?        Ss   09:59   0:00 /lib/systemd/systemd-udevd --daemon
root       654  0.0  0.3  43460  3336 ?        Ss   10:00   0:00 /lib/systemd/systemd-logind
message+   517  0.0  0.3  39900  3328 ?        Ss   09:59   0:00 dbus-daemon --system --fork
foo       1430  0.0  0.3  39124  3296 ?        S    10:00   0:00 /bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork --print-address 3
nobody     802  0.0  0.3  36288  3188 ?        S    10:00   0:00 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/run/sendsigs.omit.d/network-manager.dnsmasq.pid --listen-address=127.0.1.1 --conf-file=/var/run/NetworkManager/dnsmasq.conf --cache-size=0 --proxy-dnssec --enable-dbus=org.freedesktop.NetworkManager.dnsmasq --conf-dir=/etc/NetworkManager/dnsmasq.d
syslog     422  0.0  0.2 255852  2936 ?        Ssl  09:59   0:00 rsyslogd
foo       2690  0.0  0.2  23868  2660 pts/0    R+   10:02   0:00 ps aux --sort -rss
foo       1344  0.0  0.2  39508  2656 ?        Ss   10:00   0:00 dbus-daemon --fork --session --address=unix:abstract=/tmp/dbus-0adC4IjPhu
root       682  0.0  0.2  19304  2476 ?        Ss   10:00   0:00 /usr/sbin/bluetoothd
root       995  0.0  0.2  23664  2344 ?        Ss   10:00   0:00 cron
foo       1353  0.0  0.2  23364  2268 ?        Ss   10:00   0:00 upstart-event-bridge
root       950  0.0  0.2  21080  2200 tty5     Ss+  10:00   0:00 /sbin/getty -8 38400 tty5
root      1102  0.0  0.2  21080  2132 tty1     Ss+  10:00   0:00 /sbin/getty -8 38400 tty1
root       958  0.0  0.2  21080  2128 tty6     Ss+  10:00   0:00 /sbin/getty -8 38400 tty6
root       954  0.0  0.2  21080  2116 tty2     Ss+  10:00   0:00 /sbin/getty -8 38400 tty2
root       955  0.0  0.2  21080  2112 tty3     Ss+  10:00   0:00 /sbin/getty -8 38400 tty3
root       946  0.0  0.2  21080  2084 tty4     Ss+  10:00   0:00 /sbin/getty -8 38400 tty4
root       254  0.0  0.1  19616  1956 ?        S    09:59   0:00 upstart-udev-bridge --daemon
root       984  0.0  0.1   4360  1572 ?        Ss   10:00   0:00 anacron -s
foo       1620  0.0  0.0  10624   316 ?        Ss   10:00   0:00 /usr/bin/ssh-agent -s
foo       1371  0.0  0.0  31848   264 ?        S    10:00   0:00 upstart-file-bridge --daemon --user
root       459  0.0  0.0  15268   200 ?        S    09:59   0:00 upstart-socket-bridge --daemon
foo       1373  0.0  0.0  23372   196 ?        S    10:00   0:00 upstart-dbus-bridge --daemon --session --user --bus-name session
root       366  0.0  0.0  15284   192 ?        S    09:59   0:00 upstart-file-bridge --daemon
foo       1375  0.0  0.0  23372   192 ?        S    10:00   0:00 upstart-dbus-bridge --daemon --system --user --bus-name system

The memory usage of Lubuntu in VMWare

USER        PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root       1404  0.1  3.7 236340 37748 tty7     Ss+  09:34   0:02 /usr/bin/X -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
foo        1828  0.0  3.4 710572 35084 ?        Sl   09:34   0:00 pcmanfm --desktop --profile lubuntu
foo        1844  0.0  2.8 671480 28820 ?        Sl   09:34   0:00 nm-applet
foo        1818  0.0  2.6 644096 26940 ?        Sl   09:34   0:00 lxpanel --profile Lubuntu
foo        1839  0.0  2.6 634068 26640 ?        Sl   09:34   0:00 update-notifier
foo        1781  0.0  2.3 474336 23560 ?        Sl   09:34   0:00 /usr/lib/ibus/ibus-ui-gtk3
foo        3110  0.5  2.3 388696 23168 ?        Sl   09:47   0:05 lxtask
foo        1814  0.0  1.9 294836 19228 ?        Sl   09:34   0:00 openbox --config-file /home/foo/.config/openbox/lubuntu-rc.xml
foo        1846  0.0  1.8 249408 18996 ?        Sl   09:34   0:00 light-locker
foo        1769  0.0  1.6 384892 16624 ?        Ssl  09:34   0:00 /usr/bin/lxsession -s Lubuntu -e LXDE
foo        1791  0.0  1.3 304580 13956 ?        Sl   09:34   0:00 /usr/lib/ibus/ibus-x11 --kill-daemon
root        969  0.0  1.3 357644 13324 ?        Ssl  09:34   0:00 NetworkManager
foo        1757  0.0  1.0 377436 10184 ?        Ssl  09:34   0:00 /usr/bin/ibus-daemon --daemonize --xim
foo        1796  0.0  0.9 367496  9568 ?        Sl   09:34   0:00 /usr/lib/at-spi2-core/at-spi-bus-launcher
foo        2810  0.0  0.9 108592  9536 ?        S    09:34   0:00 xterm
whoopsie   1291  0.0  0.9 365040  9312 ?        Ssl  09:34   0:00 whoopsie
foo        1857  0.0  0.9 312496  9128 ?        Sl   09:34   0:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
root       1861  0.0  0.8 386164  8832 ?        Sl   09:34   0:00 /usr/lib/udisks2/udisksd --no-debug
root       1011  0.0  0.8 296004  8788 ?        Sl   09:34   0:00 /usr/lib/policykit-1/polkitd --no-debug
foo        1735  0.0  0.8 249868  8372 ?        Sl   09:34   0:00 gnome-keyring-daemon --start --components pkcs11,secrets
root       1407  0.0  0.7 302240  7988 ?        Sl   09:34   0:00 /usr/lib/accountsservice/accounts-daemon
foo        2160  0.0  0.7 596432  7856 ?        Sl   09:34   0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.7 /org/gtk/gvfs/exec_spaw/0
foo        1780  0.0  0.7 296824  7784 ?        Sl   09:34   0:00 /usr/lib/ibus/ibus-dconf
foo        1830  0.0  0.7 220980  7632 ?        Sl   09:34   0:00 /usr/lib/ibus/ibus-engine-simple
root        931  0.0  0.7 330244  7444 ?        Ssl  09:34   0:00 /usr/sbin/ModemManager
root       2827  0.0  0.7 239388  7392 ?        Sl   09:34   0:00 /usr/lib/upower/upowerd
root       1385  0.0  0.7 300992  7328 ?        SLsl 09:34   0:00 lightdm
foo        1777  0.0  0.7 360436  7148 ?        Sl   09:34   0:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
foo        1889  0.0  0.7 201340  7140 ?        Sl   09:34   0:00 /usr/lib/gvfs/gvfs-mtp-volume-monitor
foo        1853  0.0  0.7 218792  7092 ?        Ssl  09:34   0:00 /usr/lib/x86_64-linux-gnu/menu-cache/menu-cached
root       1574  0.0  0.6 168440  6372 ?        Sl   09:34   0:00 lightdm --session-child 12 19
root        785  0.0  0.6  74728  6188 ?        Ss   09:34   0:00 /usr/sbin/cupsd -f
foo        1884  0.0  0.6 287024  6120 ?        Sl   09:34   0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
root       3177  0.0  0.6 586916  6056 ?        Sl   09:58   0:00 /usr/sbin/console-kit-daemon --no-daemon
foo        1879  0.0  0.5 213504  5988 ?        Sl   09:34   0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
foo        1773  0.0  0.5 197704  5712 ?        Sl   09:34   0:00 /usr/lib/gvfs/gvfsd
root       1062  0.0  0.5  10240  5156 ?        S    09:34   0:00 /sbin/dhclient -d -sf /usr/lib/NetworkManager/nm-dhcp-client.action -pf /run/sendsigs.omit.d/network-manager.dhclient-eth0.pid -lf /var/lib/NetworkManager/dhclient-85ef23cb-0de2-4eef-9ad0-efb6fa40a7af-eth0.lease -cf /var/lib/NetworkManager/dhclient-eth0.conf eth0
foo        2813  0.0  0.5  27628  5140 pts/6    Ss   09:34   0:00 bash
foo        1899  0.0  0.5  58164  5092 ?        S    09:34   0:00 /usr/lib/x86_64-linux-gnu/gconf/gconfd-2
foo        1826  0.0  0.4 178212  4912 ?        Sl   09:34   0:00 /usr/lib/dconf/dconf-service
foo        1804  0.0  0.4 124920  4764 ?        Sl   09:34   0:00 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
root        625  0.0  0.4  52584  4480 ?        Ss   09:34   0:00 /lib/systemd/systemd-udevd --daemon
ntp        1614  0.0  0.4  31452  4208 ?        Ss   09:34   0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 105:110
root          1  0.0  0.4  33744  4160 ?        Ss   09:34   0:01 /sbin/init
foo        1635  0.0  0.3  40996  3860 ?        Ss   09:34   0:00 init --user
root        740  0.0  0.3  19304  3684 ?        Ss   09:34   0:00 /usr/sbin/bluetoothd
message+    711  0.0  0.3  39932  3364 ?        Ss   09:34   0:00 dbus-daemon --system --fork
foo        1800  0.0  0.3  39124  3364 ?        S    09:34   0:00 /bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork --print-address 3
root        746  0.0  0.3  43540  3344 ?        Ss   09:34   0:00 /lib/systemd/systemd-logind
nobody     1397  0.0  0.3  36288  3308 ?        S    09:34   0:00 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/run/sendsigs.omit.d/network-manager.dnsmasq.pid --listen-address=127.0.1.1 --conf-file=/var/run/NetworkManager/dnsmasq.conf --cache-size=0 --proxy-dnssec --enable-dbus=org.freedesktop.NetworkManager.dnsmasq --conf-dir=/etc/NetworkManager/dnsmasq.d
foo        3452  0.0  0.3  24124  3040 pts/6    R+   10:03   0:00 ps aux --sort -rss
foo        1711  0.0  0.2  39484  2728 ?        Ss   09:34   0:00 dbus-daemon --fork --session --address=unix:abstract=/tmp/dbus-gx0X3plGCs
syslog      779  0.0  0.2 255852  2628 ?        Ssl  09:34   0:00 rsyslogd
root       1268  0.0  0.2  23664  2336 ?        Ss   09:34   0:00 cron
root       1220  0.0  0.2  21080  2144 tty3     Ss+  09:34   0:00 /sbin/getty -8 38400 tty3
foo        1720  0.0  0.2  23364  2108 ?        Ss   09:34   0:00 upstart-event-bridge
root       1215  0.0  0.2  21080  2100 tty5     Ss+  09:34   0:00 /sbin/getty -8 38400 tty5
root       1219  0.0  0.2  21080  2092 tty2     Ss+  09:34   0:00 /sbin/getty -8 38400 tty2
root       1211  0.0  0.2  21080  2080 tty4     Ss+  09:34   0:00 /sbin/getty -8 38400 tty4
root       1370  0.0  0.2  21080  2052 tty1     Ss+  09:34   0:00 /sbin/getty -8 38400 tty1
root        621  0.0  0.2  19484  2032 ?        S    09:34   0:00 upstart-udev-bridge --daemon
root       1223  0.0  0.2  21080  2032 tty6     Ss+  09:34   0:00 /sbin/getty -8 38400 tty6
root       1072  0.0  0.1  15664  1772 ?        S    09:34   0:00 upstart-socket-bridge --daemon
root        789  0.0  0.1  15548  1660 ?        S    09:34   0:00 upstart-file-bridge --daemon
foo        1837  0.0  0.0  10624   316 ?        Ss   09:34   0:00 /usr/bin/ssh-agent -s
foo        1747  0.0  0.0  31848   268 ?        S    09:34   0:00 upstart-file-bridge --daemon --user
foo        1742  0.0  0.0  23372   196 ?        S    09:34   0:00 upstart-dbus-bridge --daemon --session --user --bus-name session
foo        1745  0.0  0.0  23372   196 ?        S    09:34   0:00 upstart-dbus-bridge --daemon --system --user --bus-name system

Solution

  • The programs use another way to create the Virtual Machines out of the Iso, so you have a more stable Version in VMware and an other less stable version in Virtualbox, but the Virtualbox Virtual machine isn't taking as much space as the VMware machine.

    It's your decision which one you want to take. My experience is that you should prefer VMware, but that's only because I had some crashes and memory loss with Virtualbox.