0

I have set up a kvm/qemu virtual machine on my home server (Ubuntu Server 12.04). My host system is installed on a small SSD but the image for the vm (virtual disk file) is saved on a classic HDD. Since I run that vm the HDD doesn't seem to stop spinning and I can also hear the heads jumping every few seconds. Is there a way to reduce this access? My guest system is also an Ubuntu Server 12.04 with swap disabled. It has 1536 MB current allocation and 2048 maximum allocation. Host has 4GB RAM.

Here is the /etc/fstab of the guest system (without the default comment block):

proc            /proc           proc    nodev,noexec,nosuid 0       0
/dev/mapper/integration-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=1cea0a98-2d6b-4338-b33c-f3aa76819c35 /boot           ext2    defaults        0       2
9
  • 1
    Which system has swap disabled? How much memory is available to the host and the guest? Is the guest run directly from a block device or a virtual disk file? How are partitions mounted in the guest? Could you check if there are files changing in the guest file system with something like find / -cmin -60?
    – Eroen
    Sep 25, 2012 at 11:45
  • @Eroen edited my question according to your questions. find / -cmin -60 returns a lot of files. Not sure but it may be all of the files there are. Sep 25, 2012 at 12:03
  • @Eroen forgot to ask: What does find / -cmin -60 do exactly? I haven't worked with find a lot. Sep 25, 2012 at 12:20
  • It finds files that were modified less than 60 minutes ago. You could try sudo find / -xdev -cmin -5 or so at least 5 minutes after booting? -xdev makes it not descend into /proc and /sys &c.
    – Eroen
    Sep 25, 2012 at 12:34
  • OK, I will do it again when I am sure that nothing was used intendedly. Sep 25, 2012 at 12:42

1 Answer 1

1

The VM will map disk access to disk access and RAM access to RAM access. That means that Ubuntu swapping to disk causes real disk access, which you can avoid by giving Ubuntu more VM memory.

3
  • Does Ubuntu swap if swap is disabled? Sep 25, 2012 at 11:49
  • 2
    It still pages out code. That's backed by executables after all, not swap. Since it can't page out old data pages, it may choose be forced to page out newer code pages. I.e. you might be inducing Ubuntu to make worse choices by running without swap.
    – MSalters
    Sep 25, 2012 at 11:54
  • OK, I checked RAM usage with top and it was a little to close to the limit. For testing purposes I gave the vm more RAM and the disk accesses seem to be a little less than before but its still to often. I will upgrade my host memory anyway (to be able to give the guest more permanently) because this seems to be at least part of the problem. Thanks! :-) Sep 25, 2012 at 12:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .