Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1994
  • Last Modified:

Esx Host cache and vm swapfile location

Please clarify difference between esxi 5 host cache and vm swapfile location, I have both on added sd hd in esx. Note: would like to run vm also on this ssd but don t see it under storage ....
0
janhoedt
Asked:
janhoedt
  • 2
  • 2
1 Solution
 
AnuroopsunddCommented:
Swap to Host Cache: If memory compression doesn’t keep the virtual machine’s memory usage low enough, ESXi will next forcibly reclaim memory using host-level swapping to a host cache (if one has been configured). Swap to host cache is a new feature in ESXi 5.0 that allows users to configure a special swap cache on SSD storage. In most cases this host cache (being on SSD) will be much faster than the regular swap files (typically on hard disk storage), significantly reducing access latency. Thus, although some of the pages ESXi swaps out might be active, swap to host cache has a far lower performance impact than regular host-level swapping.

While the VMM and virtual device memory needs are fully reserved at the time the virtual machine is powered on, a new feature in ESXi 5.0, called VMX swap, can reduce the VMX memory reservation from about 50MB or more per virtual machine to about 10MB per virtual machine, allowing the remainder to be swapped out when host memory is overcommitted. This represents a significant reduction in the overhead memory reserved for each virtual machine.
The creation of a VMX swap file for each virtual machine (and thus the reduction in host memory reservation for that virtual machine) is automatic. By default, this file is created in the virtual machine’s working directory (either the directory specified by workingDir in the virtual machine’s .vmx file, or, if this variable is not set, in the directory where the .vmx file is located) but a different location can be set with sched.swap.vmxSwapDir.
The amount of disk space required varies, but even for a large virtual machine is typically less than 100MB
See page 25 and 26 in below link...
http://www.vmware.com/pdf/Perf_Best_Practices_vSphere5.0.pdf
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
see this Article by Duncan Epping

http://www.yellow-bricks.com/2011/08/18/swap-to-host-cache-aka-swap-to-ssd/

Using both Host cache and changing the swap file location onto SSD, defeats the purpose really of Host Cache.

You configure and change the location for the .vswp file. But that means the full swap file will be located on the SSD.

If you had many VMs, e.g. 100 VMs with 4GB per host than you need 400GB SSD which our costly,  When using this Host Cache feature you could use a 100 / 128 GB SSD.

Host Cache is a feature that requires little space.

also checkout these

http://tinkertry.com/vsphere5hostcacheconfiguration
http://tinkertry.com/ssdscompared4srt
http://tinkertry.com/vzilla

as for your datastore question, you would need to add a datastore (VMFS) and format the SSD.
0
 
janhoedtAuthor Commented:
Can I use the ssd both as host cache AND datastore?
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Yes, as the partition is VMFS, you should be able to store VMs, and allocate a custom size for host cache, you will see a UUID number, and in that folder a folder called hostcache.

and the standard VMs created in the normal folders in the root.
0
 
janhoedtAuthor Commented:
Ok, now I'm looking at best possible option.
I have 8 GB servers, about 20 VM's on 3 ESX-es. Assigned 16GB to host cache. Not sure what I should do now. I could run some vm's on local storage (SATA), on SSD, run swapfile on SSD ... Fact is that my ISCSI RAID5 NAS is slow when vm's are running and I should be able to assign more disk I/O to some vm's like VCenter.
I'll probably split RAID5 in RAID5 for 3 disks and RAID0 or 1 for 2 disks then set vcenter on 1 ESX on local SSD to optimize performance.

J.
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now