Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
share|improve this question
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 '12 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. – André Stannek Sep 25 '12 at 12:03
@Eroen forgot to ask: What does find / -cmin -60 do exactly? I haven't worked with find a lot. – André Stannek Sep 25 '12 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 '12 at 12:34
OK, I will do it again when I am sure that nothing was used intendedly. – André Stannek Sep 25 '12 at 12:42

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.

share|improve this answer
Does Ubuntu swap if swap is disabled? – André Stannek Sep 25 '12 at 11:49
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 '12 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! :-) – André Stannek Sep 25 '12 at 12:08

You must log in to answer this question.

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