Entries Tagged as 'VMware'

Disk alignment

Disk alignment is very important in every Operating system environment. But when you are using a SAN and also using VMware you should take disk alignement in account.

Above you see that the Guest OS (for example Windows) is not aligned with the VMFS and the VMFS is not aligned with the Array Blocks. Meaning that 1 I/O can result into 3 I/O’s on the storage device.

Now the VMFS has been aligned, but the Guest OS is still not. Now an I/O can result into 2 I/O’s on the storage device. Beter, but performance can still be improved.

Now all File Systems are aligned. On I/O results into 1 I/O, because all beginning of the blocks are at the same position.

Only Windows Vista, Windows 2008 and Windows XP has a trick to avoid this:

UseLunReset and UseDeviceReset VMware


If you are using a SAN attached ESX environment, make  sure:
Disk.UseLunReset is set to 1 (default = 1)
Disk.UseDeviceReset is set to 0 (default = 1).

The reason to disable the Disk.UseDeviceReset param is because it does a complete SCSI bus reset. All SCSI reservations will be cleared, not for a a specific LUN but for the complete device (being the whole SAN controller).

This could disrupt your SAN fabric. I would suggest setting the ESX host in maintenance mode and reboot it afterwards.

Alternatively, you can also set this via the Service Console by issuing the following commands:

esxcfg-advcfg -s 1 /Disk/UseLunReset
esxcfg-advcfg -s 0 /Disk/UseDeviceReset
service mgmt-vmware restart

Tuning ESX(i) for better storage performance


Many applications are designed to issue large I/O requests for higher bandwidth. ESX/ESXi 3.5 and ESX/ESXi 4.x support increased limits for the maximum I/O request size passed to storage devices. These versions of ESX pass I/O requests as large as 32MB directly to the storage device. I/O requests larger than this are split into several, smaller-sized I/O requests.

Some storage devices, like the EVA, have been found to exhibit reduced performance when passed large I/O requests (above 128KB). As a fix for this, you must lower the maximum I/O size ESX allows before splitting I/O requests.

To reduce the size of I/O requests passed to the storage device using the VMware Infrastructure/ vSphere Client:

  1. Go to Host > Configuration.
  2. Click Advanced Settings.
  3. Go to Disk.
  4. Select Disk.DiskMaxIOSize.
  5. Change value to 128.

Advanced Settings for VMware HA


There are some Advanced Settings that you can change from within your VMware HA Cluster.

das.AllowNetwork
By default the Service Console portgroup is used for failure detection. By entering in das.AllowNetwork you can specify an additional portgroup to use.

das.isolationAddress
By default VMware HA nodes check heartbeats of other nodes . When this heartbeat is lost the suspected Isolated nodes then pings its Service Console gateway by default to check that it is truly isolated. By using the das.isolationAddress command, you can add additional IP addresses for the server to check. These IPs must be on the Service Console portgroup, or in the portgroup you’ve added for das.AllowNetwork

das.failureDetectionTime
This is the time required before VMware HA considers a host to be Isolated.Default setting is 14 seconds, this can be changed to a setting that will better fit your needs.

das.failureDetectionInterval
This is the rate of monitoring between VMware HA nodes, think of this as a heartbeat check.
Default setting is 1 second, if you feel that this is just too often you can change it.

 

Dangerous default “bug” on ESX 4, regarding Ctrl-Alt-Del.

Be alerted on a default setting on ESX 4, which is potentially dangerous these days.

If you hit Ctrl-Alt-Del on an ESX 4 console, it will reboot the server even if there are running VMs and it doesn’t care if the server is not in Maintenance Mode. Even if your not logged on it will capture the Ctrl-Alt-Del and reboot.

This is an old throwback which most modern Linux distribution disable these days.

To disable this yourself, open up /etc/inittab in your favourite editor and comment out the “ca::ctrlaltdel:/sbin/shutdown -t3 -r now” line with a # symbol so it looks like this:

# Trap CTRL-ALT-DELETE
# ca::ctrlaltdel:/sbin/shutdown -t3 -r now

Save and exit the file. For this to take effect without a reboot, then run: init q This certainly disabled by default on ESX 3.5 hosts, so I assume that this was an oversight on VMware’s part on the new release.