Use Perfmon to monitor servers and find bottlenecks
What and When to Measure
Bottlenecks occur when a resource reaches its capacity, causing the performance of the entire system to slow down. Bottlenecks are typically caused by insufficient or misconfigured resources, malfunctioning components, and incorrect requests for resources by a program.
There are five major resource areas that can cause bottlenecks and affect server performance: physical disk, memory, process, CPU, and network. If any of these resources are overutilized, your server or application can become noticeably slow or can even crash. I will go through each of these five areas, giving guidance on the counters you should be using and offering suggested thresholds to measure the pulse of your servers.
Since the sampling interval has a significant impact on the size of the log file and the server load, you should set the sample interval based on the average elapsed time for the issue to occur so you can establish a baseline before the issue occurs again. This will allow you to spot any trend leading to the issue.
Fifteen minutes will provide a good window for establishing a baseline during normal operations. Set the sample interval to 15 seconds if the average elapsed time for the issue to occur is about four hours. If the time for the issue to occur is eight hours or more, set the sampling interval to no less than five minutes; otherwise, you will end up with a very large log file, making it more difficult to analyze the data.
Hard Disk Bottleneck
Since the disk system stores and handles programs and data on the server, a bottleneck affecting disk usage and speed will have a big impact on the server’s overall performance.
Please note that if the disk objects have not been enabled on your server, you need to use the command-line tool Diskperf to enable them. Also, note that % Disk Time can exceed 100 percent and, therefore, I prefer to use % Idle Time, Avg. Disk sec/Read, and Avg. Disk sec/write to give me a more accurate picture of how busy the hard disk is. You can find more on % Disk Time in the Knowledge Base article available at support.microsoft.com/kb/310067.
Following are the counters the Microsoft Service Support engineers rely on for disk monitoring.
LogicalDisk\% Free Space This measures the percentage of free space on the selected logical disk drive. Take note if this falls below 15 percent, as you risk running out of free space for the OS to store critical files. One obvious solution here is to add more disk space.
PhysicalDisk\% Idle Time This measures the percentage of time the disk was idle during the sample interval. If this counter falls below 20 percent, the disk system is saturated. You may consider replacing the current disk system with a faster disk system.
PhysicalDisk\Avg. Disk Sec/Read This measures the average time, in seconds, to read data from the disk. If the number is larger than 25 milliseconds (ms), that means the disk system is experiencing latency when reading from the disk. For mission-critical servers hosting SQL Server® and Exchange Server, the acceptable threshold is much lower, approximately 10 ms. The most logical solution here is to replace the current disk system with a faster disk system.
PhysicalDisk\Avg. Disk Sec/Write This measures the average time, in seconds, it takes to write data to the disk. If the number is larger than 25 ms, the disk system experiences latency when writing to the disk. For mission-critical servers hosting SQL Server and Exchange Server, the acceptable threshold is much lower, approximately 10 ms. The likely solution here is to replace the disk system with a faster disk system.
PhysicalDisk\Avg. Disk Queue Length This indicates how many I/O operations are waiting for the hard drive to become available. If the value here is larger than the two times the number of spindles, that means the disk itself may be the bottleneck.
Memory\Cache Bytes This indicates the amount of memory being used for the file system cache. There may be a disk bottleneck if this value is greater than 300MB.
Memory Bottleneck
A memory shortage is typically due to insufficient RAM, a memory leak, or a memory switch placed inside the boot.ini. Before I get into memory counters, I should discuss the /3GB switch.
More memory reduces disk I/O activity and, in turn, improves application performance. The /3GB switch was introduced in Windows NT® as a way to provide more memory for the user-mode programs.
Windows uses a virtual address space of 4GB (independent of how much physical RAM the system has). By default, the lower 2GB are reserved for user-mode programs and the upper 2GB are reserved for kernel-mode programs. With the /3GB switch, 3GB are given to user-mode processes. This, of course, comes at the expense of the kernel memory, which will have only 1GB of virtual address space. This can cause problems because Pool Non-Paged Bytes, Pool Paged Bytes, Free System Page Tables Entries, and desktop heap are all squeezed together within this 1GB space. Therefore, the /3GB switch should only be used after thorough testing has been done in your environment.
This is a consideration if you suspect you are experiencing a memory-related bottleneck. If the /3GB switch is not the cause of the problems, you can use these counters for diagnosing a potential memory bottleneck.
Memory\% Committed Bytes in Use This measures the ratio of Committed Bytes to the Commit Limit—in other words, the amount of virtual memory in use. This indicates insufficient memory if the number is greater than 80 percent. The obvious solution for this is to add more memory.
Memory\Available Mbytes This measures the amount of physical memory, in megabytes, available for running processes. If this value is less than 5 percent of the total physical RAM, that means there is insufficient memory, and that can increase paging activity. To resolve this problem, you should simply add more memory.
Memory\Free System Page Table Entries This indicates the number of page table entries not currently in use by the system. If the number is less than 5,000, there may well be a memory leak.
Memory\Pool Non-Paged Bytes This measures the size, in bytes, of the non-paged pool. This is an area of system memory for objects that cannot be written to disk but instead must remain in physical memory as long as they are allocated. There is a possible memory leak if the value is greater than 175MB (or 100MB with the /3GB switch). A typical Event ID 2019 is recorded in the system event log.
Memory\Pool Paged Bytes This measures the size, in bytes, of the paged pool. This is an area of system memory used for objects that can be written to disk when they are not being used. There may be a memory leak if this value is greater than 250MB (or 170MB with the /3GB switch). A typical Event ID 2020 is recorded in the system event log.
Memory\Pages per Second This measures the rate at which pages are read from or written to disk to resolve hard page faults. If the value is greater than 1,000, as a result of excessive paging, there may be a memory leak.
Processor Bottleneck
An overwhelmed processor can be due to the processor itself not offering enough power or it can be due to an inefficient application. You must double-check whether the processor spends a lot of time in paging as a result of insufficient physical memory. When investigating a potential processor bottleneck, the Microsoft Service Support engineers use the following counters.
Processor\% Processor Time This measures the percentage of elapsed time the processor spends executing a non-idle thread. If the percentage is greater than 85 percent, the processor is overwhelmed and the server may require a faster processor.
Processor\% User Time This measures the percentage of elapsed time the processor spends in user mode. If this value is high, the server is busy with the application. One possible solution here is to optimize the application that is using up the processor resources.
Processor\% Interrupt Time This measures the time the processor spends receiving and servicing hardware interruptions during specific sample intervals. This counter indicates a possible hardware issue if the value is greater than 15 percent.
System\Processor Queue Length This indicates the number of threads in the processor queue. The server doesn’t have enough processor power if the value is more than two times the number of CPUs for an extended period of time.
Network Bottleneck
A network bottleneck, of course, affects the server’s ability to send and receive data across the network. It can be an issue with the network card on the server, or perhaps the network is saturated and needs to be segmented. You can use the following counters to diagnosis potential network bottlenecks.
Network Interface\Bytes Total/Sec This measures the rate at which bytes are sent and received over each network adapter, including framing characters. The network is saturated if you discover that more than 70 percent of the interface is consumed. For a 100-Mbps NIC, the interface consumed is 8.7MB/sec (100Mbps = 100000kbps = 12.5MB/sec* 70 percent). In a situation like this, you may want to add a faster network card or segment the network.
Network Interface\Output Queue Length This measures the length of the output packet queue, in packets. There is network saturation if the value is more than 2. You can address this problem by adding a faster network card or segmenting the network.
Process Bottleneck
Server performance will be significantly affected if you have a misbehaving process or non-optimized processes. Thread and handle leaks will eventually bring down a server, and excessive processor usage will bring a server to a crawl. The following counters are indispensable when diagnosing process-related bottlenecks.
Process\Handle Count This measures the total number of handles that are currently open by a process. This counter indicates a possible handle leak if the number is greater than 10,000.
Process\Thread Count This measures the number of threads currently active in a process. There may be a thread leak if this number is more than 500 between the minimum and maximum number of threads.
Process\Private Bytes This indicates the amount of memory that this process has allocated that cannot be shared with other processes. If the value is greater than 250 between the minimum and maximum number of threads, there may be a memory leak.
Wrapping Up
Now you know what counters the Service Support engineers at Microsoft use to diagnose various bottlenecks. Of course, you will most likely come up with your own set of favorite counters tailored to suit your specific needs. You may want to save time by not having to add all your favorite counters manually each time you need to monitor your servers. Fortunately, there is an option in the Performance Monitor that allows you to save all your counters in a template for later use.
You may still be wondering whether you should run Performance Monitor locally or remotely. And exactly what will the performance hit be when running Performance Monitor locally? This all depends on your specific environment. The performance hit on the server is almost negligible if you set intervals to at least five minutes.
You may want to run Performance Monitor locally if you know there is a performance issue on the server, since Performance Monitor may not be able to capture data from a remote machine when it is running out of resources on the server. Running it remotely from a central machine is really best suited to situations when you want to monitor or baseline multiple servers.
Xnet utility – excellent tool to remove, rename, uninstall services remotely as well
If you are looking for a utility to uninstall, start, stop, terminate or even rename a service remotely, the Xnet utility is the best utility to do so.
you can see what it does and how it does it by the instructions below. also you can download this free utility that was made by the genius developer Ruud van Velsen of Microsoft Benelux, keep in mind that Microsoft in no way supports this tool. I love it and live by it.
Download Xnet Command Line utility for services
XNET
=============================================================================
Win32 character-based/commandline utility enabling you to manage local and
remote Windows NT services.
USAGE
=============================================================================
1 general usage.
—————————————————————————–
Usage : XNET <Start | Stop | Pause | Continue | List | Install |
Remove | Modify | Reboot | Shutdown | Help>
Run XNET HELP <command> for information on the individual commands.
Example : XNET HELP MODIFY
2 starting, pausing, continuing or listing a service.
—————————————————————————–
Usage : XNET <Start | Pause | Continue | List>
[[\\Server\]ServiceName] [/w:Wait]
Start – Starts specified service, or lists all running services if no
service specified.
Pause – Pauses specified service.
Continue – Resumes specified service.
List – Lists all services, or details on specific service.
ServiceName – name of service, optionally preceded by name of remote
machine (eg : \\REMOTE\MSSQLServer).
Wait – number of seconds to wait for request to complete (default : 30
seconds)
Example : XNET START \\HOUND\Spooler
XNET PAUSE MSSqlserver /w:90
XNET LIST \\HYENA
XNET LIST
XNET LIST NetLogon
3 stopping a service.
—————————————————————————–
Usage : XNET STOP [[\\Server\]ServiceName] [/w:Wait] [/y]
ServiceName – name of service, optionally preceded by name of remote
machine (eg : \\REMOTE\MSSQLServer).
Wait – number of seconds to wait for request to complete (default : 30
seconds)
/y – Don’t ask for confirmation to stop dependent services.
Example : XNET STOP \\HOUND\Spooler
XNET STOP MSSqlserver /w:90
XNET STOP Netlogon /y
4 installing a service.
—————————————————————————–
XNET INSTALL [[\\Server\]ServiceName] [/b:Binary] [/d:Dependencies]
[/l:LoadOrderGroup] [/n:DisplayName] [/u:User] [/p:Password]
[/i:Interactive] [/s:StartType]
ServiceName – name of service, optionally preceded by name of remote
machine (eg : \\REMOTE\MSSQLServer).
Binary – Name of executable.
Dependencies – Dependencies of service.
LoadOrderGroup – LoadOrderGroup of service.
DisplayName – ‘Long’ name of service (aka DisplayName).
User – name of (domain) user account to assign to service. Specify
‘LocalSystem’ to assign system account.
Password – Password for service.
Interactive – specify Yes or No to allow service to interact with desktop.
StartType – indicates when a service will be started. Possible values
are ‘AUTO’ (started at system startup), ‘DEMAND’ (started
at user request) and ‘DISABLED’.
Example : XNET INSTALL \\HOUND\MyService /b:C:\WIN32\MS.EXE /u:LocalSystem
XNET INSTALL MyService /b:C:\WIN32\MS.EXE /u:RuudV /p:password
XNET INSTALL MyService /b:C:\WIN32\MS.EXE /u:HiYa\There /p:right
5 modifying a service.
—————————————————————————–
XNET MODIFY [[\\Server\]ServiceName] [/u:User] [/p:Password] [/b:Binary]
[/d:Dependencies] [/l:LoadOrderGroup] [/n:DisplayName]
ServiceName – name of service, optionally preceded by name of remote
machine (eg : \\REMOTE\MSSQLServer).
User – name of (domain) user account to assign to service. Specify
‘LocalSystem’ to assign system account.
Password – Password for service.
Binary – Name of executable.
Dependencies – Dependencies of service.
LoadOrderGroup – LoadOrderGroup of service.
DisplayName – ‘Long’ name of service (aka DisplayName).
Interactive – specify Yes or No to allow service to interact with desktop.
StartType – indicates when a service will be started. Possible values
are ‘AUTO’ (started at system startup), ‘DEMAND’ (started
at user request) and ‘DISABLED’.
Example : XNET MODIFY \\HOUND\MyService /u:SE\User1 /p:NewPass
XNET MODIFY \\HOUND\MyService /u:LocalSystem
XNET MODIFY MyService /n:FancyName
6 removing a service.
—————————————————————————–
Usage : XNET REMOVE [[\\Server\]ServiceName]
ServiceName – name of service, optionally preceded by name of remote
machine (eg : \\REMOTE\MSSQLServer).
/y – Don’t ask for confirmation of remove.
Example : XNET REMOVE SampleService
7 rebooting/shutting down Windows NT.
—————————————————————————–
XNET <Reboot | Shutdown> [\\server] [/w:Wait] [/m:Message] [/f] [/y]
Reboot – Reboots specified server, or local machine if no server
specified.
Shutdown – Shuts down specified server, or local machine if no server
specified.
Message – Warning/message to display on specified server during countdown.
Wait – Wait xx seconds for request to complete (default : 30 seconds)
/f – Force applications closed (don’t allow ‘FileSave’ dialogs).
/y – Don’t ask for confirmation of request.
Example : XNET REBOOT \\HOUND /y
XNET SHUTDOWN /w=120
XNET SHUTDOWN /f
NOTES
=============================================================================
1 Current version = 1.04
2 XNet was developed by Ruud van Velsen of Microsoft Benelux. The program
is not officially supported by Microsoft, but any feedback is welcome.
Control your email spam and avoid getting viruses via e-mail by using a premium anti-spam service for very affordable price
Do you receive a lot of spam in you mailbox, have you tried a lot of different software and webservices to get rid of the massive spam email messages and failed, well you do not have to spend top dollars any more to get your inbox back to under control, here is a news release from OnlineRack.com a webhosting company that offers you spam control service for $10/month per domain (not per mailbox)… read below
OnlineRack Webhosting provider (division or IT-ETC) has gone public with its new state of the art email spam/virus filtering service. Ahmed Amin (Co-founder) of OnlineRack stated that OnlineRack.com currently processes 44million messages a month for all of IT-ETC clients with filtering rate of 90 to 95% of flagged spam and virus messages. this successful filtering rate has been steady for months. Ahmed Amin also stated that they have complete load balancing and fail over in place. The Spam/Virus filter service is now offered to the public, no contract required and the service fee is only $10 per domain per month. Ahmed Amin stated, this service is priced per domain because we feel it is easier budgeted that way and makes it easy for the client to afford such very much needed service. there is no reason to have to go through 50 to 80 spam messages daily and risk over looking a critical email just because it got deleted by accident. The website OnlineRack has not yet been updated with this great news, however it should be updated in the next few days as onlinerack.com launches its new trendy website, However, if you are intrested you may contact sales@onlinerack.com or contact even Ahmed@onlinerack.com for more info
Failed to access IIS metabase
This error was happening when I first tried using ASP.NET on the XP Machines we have in the office. I tried adjusting the permission using MetaAcl Tool, but that did not do it for me. After further research on “Failed to access IIS metabase” error it appeared that when .Net is installed prior to installing IIS this error will occur.
To fix the problem, just run the following command to reinstall APS.NET and reupdated the permissions:
%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
If that does not work, you can try adjusting the permissions as shown in the following Microsoft article:
http://support.microsoft.com/?kbid=267904
Error the system administrator has set policies to prevent this installation when installing or upgrading to vmware 2.0 on windows 2003
Some people have reported they ran into an issue when trying to upgrade to VMware 2.0 and the error was during the install stating: Error the system administrator has set policies to prevent this installation when installing.
The best fix or work around is this, it worked for me:
Click Start -> Control Panel
- Open Administrative Tools
- Open Local Security Settings
- Click Software Restriction Policies
- If no software restrictions are defined, right click the Software Restriction Policies node and select New Software Restriction Policy
- Double click Enforcement
- Select “All users except local administrators”
- Click OK
- Reboot the machine
- Install VMWare 2.0 and it should proceed with no issues.
Good Luck
install Windows Server 2003 management tools on a Windows Vista-based computer – Error MMC could not create the snap-in.
CAUSE
Microsoft Management Console (MMC) could not create the snap-in
This issue occurs because the Administration Tools Pack is not installed by a user who has administrative user rights. New security enhancements in Windows Vista require elevated user rights when a .dll file is registered. Therefore, Windows Vista security enhancements require that certain snap-ins are installed only by a user who has local administrative user rights.
MMC could not create the snap-in
To resolve this issue, register the Windows Server 2003 management tools on a domain user account. To do this, follow these steps:
| 1. | Log on to Windows Vista as a user who has local administrator permissions. | ||||||||
| 2. | Create the RegisterAdminPak.cmd script. To do this, follow these steps:
|
||||||||
| 3. | Run RegisterAdminPak.cmd from an elevated command prompt. To do this, follow these steps:
|
How to redirect traffic to another domain aka 301 redirect
301 Redirect
301 redirect is the most efficient and Search Engine Friendly method for webpage redirection. It’s not that hard to implement and it should preserve your search engine rankings for that particular page. If you have to change file names or move pages around, it’s the safest option. The code “301″ is interpreted as “moved permanently”.
You can Test your redirection with Search Engine Friendly Redirect Checker
Below are a Couple of methods to implement URL Redirection
IIS Redirect
- In internet services manager, right click on the file or folder you wish to redirect
- Select the radio titled “a redirection to a URL”.
- Enter the redirection page
- Check “The exact url entered above” and the “A permanent redirection for this resource”
- Click on ‘Apply’
ColdFusion Redirect
<.cfheader statuscode=”301″ statustext=”Moved permanently”>
<.cfheader name=”Location” value=”http://www.new-url.com”>
PHP Redirect
<?
Header( “HTTP/1.1 301 Moved Permanently” );
Header( “Location: http://www.new-url.com” );
?>
ASP Redirect
<%@ Language=VBScript %>
<%
Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”,”http://www.new-url.com/”
%>
ASP .NET Redirect
<script runat=”server”>
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = “301 Moved Permanently”;
Response.AddHeader(“Location”,”http://www.new-url.com”);
}
</script>
JSP (Java) Redirect
<%
response.setStatus(301);
response.setHeader( “Location”, “http://www.new-url.com/” );
response.setHeader( “Connection”, “close” );
%>
CGI PERL Redirect
$q = new CGI;
print $q->redirect(“http://www.new-url.com/”);
Ruby on Rails Redirect
def old_action
headers["Status"] = “301 Moved Permanently”
redirect_to “http://www.new-url.com/”
end
Redirect Old domain to New domain (htaccess redirect)
Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
Please REPLACE www.newdomain.com in the above code with your actual domain name.
In addition to the redirect I would suggest that you contact every backlinking site to modify their backlink to point to your new website.
Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.
Redirect to www (htaccess redirect)
Create a .htaccess file with the below code, it will ensure that all requests coming in to domain.com will get redirected to www.domain.com
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]
Please REPLACE domain.com and www.newdomain.com with your actual domain name.
Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.
How to Redirect HTML
Please refer to section titled ‘How to Redirect with htaccess’, if your site is hosted on a Linux Server and ‘IIS Redirect’, if your site is hosted on a Windows Server.
There is a good resource site that talks into similar details about domain forwarding, search engine friendly methods and so forth. check it out
IP address upgrade from IPv4 to IPv6
It’s about time for an IP address upgrade, don’t you think?! Well, before I go any further, if you’re not sure, an IP address is a unique address that is assigned to a network device by the network. Every computer that connects to a network or the Internet is assigned an IP address. It basically allows that computer to communicate with the network or the Internet.
The current IP address standard, called IPv4, uses 32-bits, which looks something like this: 192.168.0.1. This IP address standard was created in 1981 when the Internet was just a baby. The early creators of the Internet did not believe it would become as large as it is today, especially since it was originally designed only for a few universities and the United States Government. Over time, many large corporations and even the U.S. Government have come to realize that there is a large need to switch over to a new IP standard. The new version will be called IPv6 and it will use 128-bits.
The IPv6 IP address looks something like this: 2001:0db8:85a3:08d3:1319:8a2e:0370:7334.On August 2, 2005, the Federal Government of the United States issued a memorandum, stating that all Federal Government agencies will transition their network backbones to IPv6 by June 30, 2008. The IPv4 version only allows for four billion IP addresses, which greatly limits the number of devices that can be given a unique, globally routable location on the Internet. The IPv4 standard has slowed the growth of the Internet worldwide and it constricts the amount of computers and other devices that can be connected to each other via the Internet. On the other hand, the IPv6 standard allows for an almost unlimited number of IP addresses. In all actuality, the IPv6 allows for over 300,000,000,000,000,000,000,000,000,000,000,000,000 different addresses. (And no, I’m not kidding!) The movement from IPv4 to the new IPv6 will allow us users to have more technology in our lives, because we will now be able to assign more IP addresses to more devices. Soon, mobile phones, televisions and even toasters will be assigned IP addresses! Imagine this: you’re leaving work and you would like a hot cup of coffee when you arrive home. With the IPv6, you would be able to do much more.
This transition is not going to be easy or simple, it will require a lot of manpower professionals to get involved and oversee these projects.
Error code 2738 When Installing iTunes + Quicktime on Windows Vista
I just downloaded the latest iTumes version, but when I tried to install it, I got the following error:
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2738.
After research I found the following link:
http://docs.info.apple.com/article.html?artnum=304405
The solution was to re-register vbscript.dll. I also selected “Run as Administrator” option when I reran after reregistering the dll.
To register the dll, please do the following:
- On the Start menu, click Run.
- In the “Open” field, enter the following command and click OK.
regsvr32 vbscript.dll - A message should appear stating that the “DllRegisterServer in C:\WINDOWS\system32\vbscript.dll succeeded.”
- Click OK and try installing iTunes or QuickTime again.
Thanks for Apple Support for the posting…
FREE eBay Auction Sniper Service
Have you ever wondered why when you are trying to bid on an otem on ebay and you are the highest bidder then all of a sudden you right before the auction ends, someone comes in and snatches it from you whether it is in the middle of the day or middle of the night, it just happens. The chances are, the person overbidding you is not really sitting in front of the computer, all what this person did is use a sniping program or a website service like Gixen where you enter the ebay item number and the highest amount you are trying to bid and what the website service do is go out a few seconds before the auction ends and place the bid for you. This way you avoid getting into bidding war, you do not have to stick around the computer to find out make sure no one overbids you, and lastly, you bid like a pro.
We have evaluated different programs and website services that offer snipping services, truth told, the real nice one we liked was Gixen. It is a website service that is offered to the public for free and you can bid on as many items as you want. it uses SSL for encypting and securing the data transmission.
Other competitor websites and programs would charge you a fixed percentage of won items or insertion fees.
I have been using Gixen for a few months and have been very pleased with the service therefore, have decided to share the wealth about this free ebay sniping website service.
, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
If you are prompted for an administrator password or for confirmation, type your password, or click Continue.

