Tried googling this and could not find anything specifically about this issue. Also I was lazy for this install and had Ubuntu set up my files and it gave me 8gb of swap, I normally only put about a gig lol.
So I'm currently running Ubuntu 15.10 and had an issue when I created a Windows virtual machine. The computer got really sluggish, mouse would stop and go, and Internet came to a crawl. Anyway opened system monitor and saw that swap was being used, but I have 8gb, the vm had 2gb to use, and system monitor was only showing 4gb being used.
Is that normal for swap to be used even when there is enough ram to go around? Thanks!
I usually put like 1024mb for a swap. Enough to be safe, but not too much as to be inconvenient.
I've always had issues with Virtualbox being slightly sluggish in contrast to a local operating system.
In the bios there may be a intel virtualization option, which will definitely enhance the speed of your VM. Also look through the options some more and enable the 3d features and multiple cpu cores.
From my limited experience though, it's always going to run a little sluggish.
Windows in virtual box works great. When I created Linux ones especially Ubuntu it lags until I put some kind of command in the terminal (something about 2d or 3d support). Anyway when I loaded a machine image after I restored my comp, that image when I booted it took a dump on my whole system, so deleted that created a new one and now works fine.
Now unfortunately I don't think you answered my question of is it normal for swap to be used when you have plenty of ram? Unless I read your question wrong lol.
The answer to the question is yes it is common, but only with ubuntu.
There is something called swappiness value. (stupid name I know).
The value corresponds to the tendency for the OS to utilize swap space. The higher the value, the more prone the OS is to use swap space. I recommend you watch the whole video, but the answer to your problem starts at 1:57.
I had this issue too. I made a teeny script that unloaded swap and reloaded it. When I would boot I would just have it on the desktop and when I got to the desktop I would just hit it and go on with my business.
In linux RAM could be in 5 different states: - free: unused memory - used: memory that is being used by some applications - shared: memory that is shared between programs - buffers: represent how much portion of RAM is dedicated to cache disk block - cached: it caches pages from file reading.
Both "buffers" and "Cached" represent the size of system cache. They dynamically grow or shrink as requested by internal Linux kernel mechanism. But they do not fall under the "used" category, they are considered "free" and available RAM. So what happend is that your buffers and cached memory was so high that caused your swap to be used, but because they're considered available RAM you don't see it, unless you use the top command or free -m.
@Tjj226_Angel yeah I read about that why looking for this answer, but no one that I read said that it is normal for Ubuntu to do that. I haven't had any slow downs with my Os since opening an old virtual box vdi. Never seen it do that before and saw it is swap... Os still uses swap but haven't noticed any slow downs.
@spidernet is there anyway to fix that or is it just ok?