I am running Ubuntu14 on VMWare 12, on boot up the VM gives the hint 10.6GB of swap space recommended but 0 bytes of system swap space is available.

Within my VM I have partitioned 10.6gb of swap space through gparted on the partition /dev/sda3 which is swap space.

Then in my /etc/fstab I have declared this UUID as swap space. e.g

UUID none swap sw 0 0

and I have turned swapon for this partition.

However every time I reboot the same message appears.

I am building the AOSP on my VM and using CCACHE to allow the build to be quicker so that the build only builds any elements which are changed even after a clean.

After my ccache has filled up this build should only take 20-30 mins tops. however it is still taking 1.5-2hrs.

The swap space being the issue I believe.

Does anyone have any suggestions how I can stop this swapspace issue?

  • 3
    How did you create the swap space, through an installer or separately? In other words, has mkswap been run on the partition in any way? – Fox Aug 17 '17 at 20:55
  • i originally had an extended partition on an ext4 partition that was the standard. i then on gparted created a new partition of partition kind swap with the required memory. then i removed the old swap space and replaced it with the new one in the next partition swapped it on on the gparted gui. i then added it to the fstab. I have done mkswapon for the partition too. – Jonny Smyth Aug 17 '17 at 21:02
  • 1
    There is mkswap and swapon, one of which formats the swap space (like mkfs), the other activates it. Did swapon produce any errors? Does the system show swap space in use after the command? – Fox Aug 17 '17 at 21:30
  • 2
    is that your actual /etc/fstab entry? if so, that's not going to work. you need UUID=<actual UUID of swap partition>, not just UUID. e.g. on one of my systems, I have UUID=db8bda5f-4f18-4abb-a151-08494e398047 none swap sw,discard,pri=10 0 0 – cas Aug 18 '17 at 3:18
  • 1
    @cas The solution to a "busy" message (or if you think someone is confused and telling you the wrong message) is never "let's just reformat the partition" !! Please don't rely on mkswap checking for partitions that are already in use, unless you mention this explicitly, how to tell the exact version of mkswap that would be safe, how you know there are no circumstances where it gets it wrong, etc !! – sourcejedi Aug 19 '17 at 10:12

Web search indicates this message does not come from Ubuntu, but from VMWare on the host computer. So you need to add the swap partition (or a swap file) on the host, not inside the VM.


I have no idea whether this would affect CCache performance, because I'm not familiar with VMWare, its use of swap, and this message. On a Linux host I would allow maybe 1GB of swap, but apart from that the trick is not to over-commit compared to how much physical RAM you have! Particularly with the default caching mode of Linux VMs created with virt-manager: the host provides extra read/write-back cache anyway, regardless of how much RAM the VM is allocated, so you can err towards the small side there without missing out on much. It's like having a hard drive with gigabytes of (shared) cache, instead of megabytes :-D.

  • So, if I get it right, the simple answer to the question "how I can stop this swap-space issue?" would be to add 10GB of swap space in the host, not in the VM. That makes sense. – xhienne Aug 19 '17 at 9:43
  • @xhienne edited to match your preferred wording. Don't forget the .6 as well :-P. – sourcejedi Aug 19 '17 at 10:08
  • Thanks. No offense intended of course, you already had my vote. :) – xhienne Aug 19 '17 at 12:19
  • I'm having a similar problem on a solid state drive (SSD) that I am running VMWare on. Host is Linux. Previous installs on spinning media I'd assign 8gb as swap space when partitioning the drive. On the SSD I only assigned 2gb. My VMWare workstation (v12.5) now runs very slow and I get a warning message similar to that described by the original poster. Any options other than increasing space on the SSD and thereby wearing the drive down? – portsample Oct 28 '17 at 5:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.