Skip navigation
VMware
3,028 Views 11 Replies Last post: Aug 5, 2008 11:05 AM by TheRealJBerga… RSS
kaychan Hot Shot 373 posts since
Apr 9, 2005
Currently Being Moderated

Sep 30, 2006 9:30 PM

Size of the swap file

Hi

 

Does anyone know:

1) How much memory we should allocated to the Service Console? Should we use the old definition of 192 mb for 8 vms; 272 for 16 vms; 384 for 24 vms and 512 for >32 vms?? I saw recommendation for 800 MB to SC on an ESX server with 32 GB of memory.

2) How much we should allocate to the swap file?? Some recommends to double size of the memory allocated to Service Console. So if the SC is allocated 800 MB, it was recommended to make the swap file 1638 MB.

joepje Expert 487 posts since
Jun 21, 2005
Currently Being Moderated
1. Oct 1, 2006 2:57 AM in response to: kaychan
Re: Size of the swap file

Just use the default for COS (272 MB). In case of using agents or stuff calculate extra memory > you should test this how much overhead is created.

 

Swap file I use 1024 MB. (So max I will use 512 MB for my COS)

kharbin Master 1,346 posts since
Nov 7, 2003
Currently Being Moderated
2. Oct 1, 2006 6:45 AM in response to: kaychan
Re: Size of the swap file

It depends on how responsive you need to console to be. With its default of 272MB it is memory starved and horribly slow.  So we always use 512MB minimum. Otherwise you are almost immediately using the swap.

 

As for swap file size, I always use 2x the maximum RAM that can be assigned to the console, so 800MB x 2 or 1.6GB swap. that way if you bump up the RAM the swap is the correct size. Of if you scale SC RAM back, you have plenty of swap and you will need it.

 

my 2 cents

joepje Expert 487 posts since
Jun 21, 2005
Currently Being Moderated
3. Oct 1, 2006 7:33 AM in response to: kharbin
Re: Size of the swap file

Will performance in Virtual Center 2.0 be better if you use e.g. 512 MB ?

boydd Champion 5,708 posts since
Jun 15, 2004
Currently Being Moderated
4. Oct 1, 2006 8:26 AM in response to: joepje
Re: Size of the swap file

From what I understand - 2048MB is the maximum that will be used anyways.  I make the swap partition accordingly.  I allocate 800MB to the COS - backup agents etc.....

 

DB

DB
schnj65 Novice 32 posts since
Nov 10, 2004
Currently Being Moderated
6. Jan 16, 2007 7:46 AM in response to: kaychan
Re: Size of the swap file

I also use 800 MB for the Service Console for Backup Agents, Dell Open Manage Agents, 16 - 20 VM's, HA agent, Virtual Center Agent

nocha Lurker 2 posts since
Jun 30, 2007
Currently Being Moderated
7. Jun 30, 2007 7:50 PM in response to: schnj65
Re: Size of the swap file

I used the default 512MB memory size during installation of my VMware Server 1.0.3. Now when I want to increase the memory/swap file size to 1GB, I get an error message that says I have no permission to do so.

Can someone please teach this newbie how to increase my swap file?

Thanks!

Texiwill Guru User Moderators vExpert 11,345 posts since
Jan 13, 2004
Currently Being Moderated
8. Jul 2, 2007 5:09 AM in response to: nocha
Re: Size of the swap file

Hello,

 

The SC swapfile is a partition on the disk. If you have free space after installation, which most people do not, you could create another swap partition and have 2 swap partitions. If you however do not have the space on the drive to make a new partition. You can also use a file for a swap location similar to pagefile.sys if you are a Windows person. However, this is strongly discouraged . If you do have to swap you will end up hammering the filesystem upon which it resides.

 

Now a bit of trivia. Swap partitions can be any size, however anything over 2GB per swap partition are ignored. YOu can have up to 32 swap partitions/files.

 

You would use the following

 

Create a swap partition:

      fdisk /dev/sd?

 

Make the swap file:

      mkswap /dev/sd?

 

Edit /etc/fstab

      Copy the swap definition in there already and change the /dev/sd? to be the appropriate device

 

Run

     swapon -a

 

That is how you add a secondary swap partition.

 

To add a file...

 

First create a 65MB swap file:

      dd if=/dev/zero of=/pathToSwap/swapFileName  bs=1024 count=65536

 

pathToSwap could be anything but I would put it in /var or even /tmp, depends on where you have separate filesystems. Do NOT use NFS (it does not work) and I would avoid any VMFS as well. Unless absolutely necessary avoid remote storage altogether.

 

swapFileName can be anything as well.

 

This one however requires you to edit /etc/rc.d/rc.local to add

      swapon /pathToSwap/swapFileName

 

However, even with this discussion on adding more swap. The recommendation is if you do not have the disk space to reinstall with the proper sized swap partition which is generally 2x memory. However, remember that you may need more than one swap partition for > 1GB of memory.

 

For more information from the SC issue:

man mkswap

man swapon

 

Best regards,

Edward

nocha Lurker 2 posts since
Jun 30, 2007
Currently Being Moderated
9. Jul 2, 2007 6:03 AM in response to: Texiwill
Re: Size of the swap file

Texiwill, WOW! I'm overwhelmed by your response...my deepest appreciation for your help. I'll try that and let you know the result.

 

While I'm attempting to try your solution, I wonder whether there is any way that I can get my permission changed to allow me to edit the VM settings to increase the swap file? I installed the VMware Server so I assume I have fuill administrative permission, bit it does not allow me to change the VM settings.

 

Thanks again, Texiwill!

Texiwill Guru User Moderators vExpert 11,345 posts since
Jan 13, 2004
Currently Being Moderated
10. Jul 2, 2007 7:21 AM in response to: nocha
Re: Size of the swap file

Hello,

 

Are you talking about ESX or VMware Server?

 

VMs use there own swap file. The information I gave is for the Service Console only and you can not change the swap file using the VI Client directly it all has to happen from the Service Console. You however can set the Service Console Memory within the VI Client and that would require a reboot of the host.

 

Best regards,

Edward

 

If the answers were helpful or correct please use the Correct/Helpful buttons to award points.

TheRealJBerga… Lurker 1 posts since
Apr 15, 2008
Currently Being Moderated
11. Aug 5, 2008 11:05 AM in response to: kharbin
Re: Size of the swap file

this is the best answer.

Bookmarked By (0)

Share This Page

Communities