Is a swap partition useful with a VM in VMWare Player?

If none of the more specific forums is the right place to ask

Is a swap partition useful with a VM in VMWare Player?

Postby MagicPoulp » 2018-11-07 11:03

I am running debian using a virtual machine inside VMWare Player with a Windows 10 host.

--> Is it useful to have a partition for the swap with such a setting?

I am not talking about the case for which I would reach the 100% memory use and the swap will allow to use more memory. I am talking about the fact that the swap is used as an automated cache buffer. If you never reach the 100% memory use, the swap is still used to store things you don't use often. This is why the swap is always recommended to have.

However, in a VMWare VM, the disk is special. It is located in file in FAT32 format on the WIndows disk. Therefore. the swap would not work fast.
MagicPoulp
 
Posts: 22
Joined: 2018-11-05 21:30

Re: Is a swap partition useful with a VM in VMWare Player?

Postby CwF » 2018-11-07 14:08

I'll chime in with some generalities since I'm opposite your case.

I run VM's under a Debian KVM host. For windows guest I have one with swap and one without. For Debian and frankendebian guest all are on a common base image which is a single partition. I have never needed to enable a swap file. Firefox and Liferea and perhaps handbrake seem unstable with minimum memory. I'm sure your exact use case will determine the need, but setting swappiness and using a swap file should give you an indication. Generally I think you don't really need one, but I've tested with swappiness=10 and a swap file, and it does get trickles of use. Those trickles don't seem to slow anything noticeably in the case of plentiful memory. In the end I don't use any swap anymore.

Your point is true though that swap file use with and without ample memory are two different scenarios.
CwF
 
Posts: 147
Joined: 2018-06-20 15:16

Re: Is a swap partition useful with a VM in VMWare Player?

Postby p.H » 2018-11-07 21:06

MagicPoulp wrote:Is it useful to have a partition for the swap with such a setting?

As useful as on real hardware.

MagicPoulp wrote:However, in a VMWare VM, the disk is special. It is located in file in FAT32 format on the WIndows disk. Therefore. the swap would not work fast.

As fast as the rest of the virtual disk. No swap means less free memory for filesystem cache means more disk access.
p.H
 
Posts: 631
Joined: 2017-09-17 07:12

Re: Is a swap partition useful with a VM in VMWare Player?

Postby MagicPoulp » 2018-11-09 10:43

I tried it without swap. And I am very satisfied with the performance for what I have to do: coding, compiling, building, running a server, opening a web browser.

Not having a swap made me save disk space. I am already short in space on my computer.
MagicPoulp
 
Posts: 22
Joined: 2018-11-05 21:30


Return to General Questions

Who is online

Users browsing this forum: zerubbabel and 7 guests

fashionable