Specifications

VMware, Inc. 339
Chapter 12 VMware ESX Server Resource Management
cpu.htsharing = <mode>
Setting!the!htSharing!option!configures!the!HyperThreading!operation!mode!for!the!
virtual!machine!identified!by!<id>.!Valid!modes!are:
! any!!Each!CPU!of!the!virtual!machine!can!share!the!servers!logical!CPUs!with!all!
other!virtual!machines.!Default!value! for!htSharing.
! none!!Each!CPU!of!the!virtual!machine!requires!an!entire!physical!CPU!(two!
logical!CPUs)! of!the!server!to!operate.!This!prevents!the!virtual!machine!from!
operating!with!the!shared!system!resources!provided!by!HyperThreading!and!
can!reduce!performance.
! internal!!Each!CPU!of!the!virtual!machine!can!share!logical!CPUs!with!the!
second!CPU!in!the!same!virtual!machine,!but!not!with!CPUs!from!other!virtual!
machines.!This!mode!switches!to!none!for!virtual!machines!with!one!CPU.
Using procfs
You!can!also!use!procfs!to!manage!CPU!resources.!Use!the!following!command:
echo <new_value> > <proc_filename>
in!the!service!console,!where!<new_value>!is!the! value!you!want!to!set!and!
<proc_filename>!is!the!full!path!name!of!the!configuration!option’s!proc!entry.!See!
“Examples”!on!page 342!for!more!information.
/proc/vmware/vm/<id>/cpu/min
Reading!from!this!file!reports!
the!minimum!CPU!percentage!allocated!to!the!virtual!
machine!identified!by!<id>.
Specifying!a!percentage!<minPercent>!to!this!file!changes!the!minimum!percentage!
allocated!to!the!virtual!machine!identified!by!<id>!to!<minPercent>.!The!valid!range!
of!values!for!<minPercent>!is!0!to!100!multiplied!by!the!number!of!virtual!
CPUs;!that!
is,!100!percent!for!uniprocessor!virtual!machines!and!200!percent!for!dualvirtual!CPU!
virtual!machines.!
N
OTE For!SMP!virtual!machines,!the!affinity!set!applies!to!all!virtual!CPUs!on!the!virtual!
machine.
NOTE Only!SMP!virtual!machines!can!use!multiple!virtual!CPUs.
NOTE For!SMP!virtual!machines,!use!the!<id>!of!any!of!the!virtual!CPUs!to!view!or!change!
configuration!options!for!that!virtual!machine.