Monday, December 09, 2013

Tips for storage performance on ESXi

There are a few tips for optmizing storage performance on ESXi 5.x. If you're using fibre-channel, one of the tips is to configure the LUN's as round-robin. You should also make sure that if multiple LUN's are presented from a storage array that they are all configured with the same path policy. Mixing round-robin and MRU or Fixed will create performance problems.

See the following article about setting path policy on ESXi hosts:

Path Policy in ESXi 4 and 5

The best way to do this on system which already has storage configured is to use a PowerCLI script to change the setting on all of the LUN's. Note, however that some storage devices should be set to fixed (i.e. non-ALUA Clariion devices and RDM's being used by MSCS).

Using PowerCLI to set path policy

Also, if you want any new LUN's to inherit the round-robin path policy by default you can modify the default setting for your specific storage vendor. The script at the end of the posting below is a good example. You will need to identify which type SATP your device is (e.g. VMW_SATP_ALUA).

Change Default Path Policy

I'm working on a couple scripts myself to do this and I will post them when they are polished up.

Tuesday, November 27, 2007

Two Perfmon tips

Here are two tips for using Perfmon in Windows

Perfmon Tip #1 (Basic): Identify a counter associated with a specific line in a busy graph.

When a perfmon graph is opened with many counters added, it can be quite difficult to match up the counters with the lines on the graph. There are two methods to deal with this, outside of reducing the number of counters displayed - the obvious one, which is to use the highlight button (CTRL+H) to highlight a counter in the list, then scroll up and down and select the counter by name. The other option is to double-click (carefully) on the lines in the graph, and it will highlight that line and jump to the associated counter. This comes in handy when one of the lines stands out and you want to investigate it, like the red line in the image below.

Perfmon Tip #2 (Advanced): Pulling summary data (Ave, Min, Max) from perfmon log files for an initial review.

Once you have a captured Perfmon log file, the next question is how to analyze it. This can be a cumbersome and time consuming process, especially if there are a large number of counters in the log and if it is very large. One way to start the analysis at a high level is to review the min, max and average values of all of the counters stored in the log. To do this, open the log in Perfmon (in the System Monitor view), view as a Report, and then right click on the graph or report on the right, select Properties, click the General tab and under Report and Histogram data choose Minimum, Average or Maximum and click OK. The report view will now show, for example, the maximum of all counters. Now, right click the report and Save As.. and choose type Report (*.tsv). Repeat this for the other Average and Minimum. I usually save the reports as something like this:


Now, these TSV files can simply be opened and pasted into Excel, where they will import fairly well into rows of counters and columns of instances. I usually create three tabs in an Excel spreadsheet for each set, Min, Ave and Max. You can do a multi-page select and then adjust the column sizes and formatting for all of the sheets at once. This is a very convenient method to sort out counters that need further investigation. For example, if % Idle Time on disk C: has an average of 10%, then that would need investigation. Likewise, if Disk Queue length on D: has a maximum of 10, this needs a closer look too. This is good for a quick overall review of the performance logs.

If you're interested in a more advanced automated tool, check out the Performance Analysis of Logs (PAL) Tool here:

Monday, November 19, 2007

Active Directory: Piping data between DSGET and DSQUERY

There are some interesting ways to combine output from some of the active directory command line tools such on Windows 2003 servers such as dsquery and dsget. These commands lend themselves well to piping output from one to another. For example, a list of users from DSQUERY can be piped to DSGET to display the username, group membership, or any number of user attributes. You can even combine more than one pipe. For example, suppose you wanted to find the display name and home directory for all of the members of a set of groups, Marketing Managers, Marketing Users, Marketing HR, Marketing Executives, and any other groups that start with the word "Marketing."

dsquery group -name "Marketing *" dsget group -members dsget user -display -hmdir

This command will take the output from the first dsquery command which will be something like this: "CN=Marketing Managers, OU=Marketing,DC=Contoso,DC=com"
"CN=Marketing Users, OU=Marketing,DC=Contoso,DC=com"

This output is piped as input to the next query, which will execute as:

dsget group -members "CN=Marketing Managers, OU=Marketing,DC=Contoso,DC=com
dsget group -members "CN=Marketing Users, OU=Marketing,DC=Contoso,DC=com"

Finally, the list of usernames will be piped to the dsget query as something like this:

dsget user "CN=mjones,OU=Marketing,DC=Contoso,DC=com" -display -hmdir

There are lots of different ways this type of piping between Active Directory commands can be used in creative ways. Sometimes a script is a better choice depending on what type of query is needed, but if you want to grab some information from active directory quickly, just using these commands and piping between them can be a good alternative. For more information on the DSQUERY, DSGET and other active directory command line tools, check out Technet:

Directory service command-line tools

Monday, September 24, 2007

Microsoft Webcasts - A great resource for Windows admins

If you're a Windows administrator, or support Microsoft products, you should check out the free webcasts provided by Microsoft. They are generally well done, and some are excellent, and often include tips that you won't easily find anywhere else. If you miss the live broadcast, you can watch it on demand and download it for replay on your machine. Good stuff!


Microsoft Webcast Calendar

Podcasts: Audio portions of webcasts in MP3 and WMA