by November 17, 2005 0 comments



Is your deployed IT optimized to deliver the best possible performance? Tuning your resources is a two-way process. Both your hardware and software should be optimized. A system that’s either eating up hundred percent of available capacity or is idle most of the time will not be at peak performance. Under-utilization is covered in detail in Mantra 6. 

Optimization starts with an evaluation of what needs to be better. For that, you need to understand what is expected of each system and determine what’s stopping what you have from achieving that performance. For long, this was a three-level discreet process, involving separately tuning the hardware, software and the network. However, to an application and the end-user that these systems serve, all three are one seamless whole. Distributed applications make this the imperative. Let’s, therefore, look at the problem from that perspective. 

Understanding what is required
Different types of systems place different loads on your resource-pool. An application or database server would demand a lot of CPU and network resources. A file server would need more I/O and network bandwidth. The goal is to understand which system is placing what kind of loads on your resources. One easy way to figure this out is to open a performance monitoring console on that system (both Linux and Windows have them), adding counters for the CPU, RAM and network components and watching the displayed graphs at various times through the day. The ones that are consistently high are the ones that need optimization on that system.

Using the Performance Monitor on Windows
Open the Performance console from Administrative Tools, first locate the red ‘x’ icon on the toolbar in the right-side panel and click on it to stop the active monitor. Delete all counters, click the ‘+’ icon on the same toolbar to bring up the ‘Add Counters’ box. In this box, there are separate counters for individual components as well as for combined objects. For instance, ‘memory’ is a total of ‘cache’ and ‘paging file’ along with physical memory. Similarly there are separate counters for the physical disk (the hardware physical unit plugged in) as well as the logical disks (partitions, RAID partitions, etc). When you’re trying to understand the broad elements that require a deeper look, go with the aggregate counters. When it is time to doing a detailed study, you need to add each sub-element as well. Once you have added the counters you need, click on the ‘x’ icon again to start monitoring. Instead of a graph, you can select to see it in numeric mode (7th icon from left on the toolbar). Use File>Save As to save these settings for later use. You can use the ‘Alerts’ item under the ‘Performance logs and alerts’ node in the tree in the left-side panel to set up actions to be taken if one or more counters hits a particular mark. For instance: when the Processor Time goes over ’80’ (percent), it could log an entry in Event Log and send you an alert over the network. Alternatively, you could run some command that fixes the problem (like a ‘taskkill’ that kills some process that could be running).

Low on RAM?
There is one small corollary to the ‘add more RAM if it’s running low’ rule. All OSs today along with some larger applications use ‘swap’ space. This allows the software to load up more data than it is actively using and perform task switching. This is what allows OSs to run more than one application at a time and applications to let you work on more than one file. Now, the theory is that it is all loaded into ‘memory’. But what is seamless memory to an application would be made up also of disk-based swap space to the OS. In this scenario, if one of them loads up too much on its own, not only will its own swap-space be filled up, it also causes the main memory and the OS’s swap to be consumed. To cut a long story short, both of them will end up making a lot more calls to the disk to fetch the needed information. The way out here is to configure the swap space better. OSs and applications let you specify where these files reside.

Your network
There are various network monitoring tools out there. The simplest of course are what’s already in your OS, like the performance monitor we just discussed, with the network counters added. This would tell you how much of your bandwidth on that system is being utilized. When you need to find out who on your network is using it up and why, you need to look to third-party tools like Ethereal and AdventNet’s ManageEngine OpManager. Even wireless networks can be monitored using these tools, since ultimately their traffic reaches your wired one.

The database application
Regardless of what database platform your business applications use, they are all files on a disk. The more intensively your business application is used, the more I/O happens at this end. Therefore, the server hosting your database must be treated as a file-server during optimization.

Optimizing them
Tuning your systems for performance involves not just adding more of something or upgrading them, but in a large part, configuring what you already have to the best of its abilities.

Swap space
In Linux, this is a separate (hidden) partition on your hard disk of type ‘Linux Swap’. Increase its size as required, provided you have enough raw disk space. In Windows, you can change swap sizes from the System Properties control panel applet. Launch it, open the Advanced tab, then click on the Settings button under ‘Performance’. Switch to the Advanced tab there; the ‘Change’ button here gives access to the settings. Windows will not use the drives with the ‘No paging file’ setting for swap. As a general rule, don’t set up drives with less than 10% free space for swap.

Performance Monitor tells that the CPU (blue line) is rapidly fluctuating on this system and may need further investigation

Application swap settings can be found under their ‘Preferences’ or ‘Options’ menu items, which themselves may lie inside any of: Tools, File or Edit menus. Some applications let you specify multiple locations to use. It will use them in order of preference according to how much drive space is available on each. Therefore, configure the primary one with the drive with the largest available free space, preferably one that does not contain a Windows swap file. That way, only one of them is accessing that drive at a time. It would also be nice if you had a separate low-capacity hard disk exclusively devoted to swapping-that way, application and normal I/O is not affected by requests for data from the swap files.

The LAN
At the system end, servers really must have Gigabit Ethernet (GE) connections to your switches. This would reduce bottlenecks of the route into the server, since there is only one entry point to it-and all situations have multiple inward requests through this one pipe. Second, use and enforce QoS (Quality of Service) policies on your network, that determine which of your users get priority on bandwidth. This is configurable on subnet, time of day and demand basis. 
Make sure that users that need the bandwidth critically get it first-this depends heavily on who the users are. Also design and enforce AUP (Acceptable Usage Policy) in your company that bars network usage for things like unauthorized downloads, gaming and unnecessary chatting.

Automatic programs
Turn off unnecessary plug-ins and services on your servers to reduce its load. Use auditing and logging diligently. If your server is spending most of its time taking notes, it is not going to perform like Alonso’s car!

What really ails your business application?
If it is being used off a Web interface, there’s a Web application server (Tomcat, IIS, etc) somewhere on that application server as well. 

Absolute musts
These services are absolutely necessary on a Windows system. Everything else can be turned off if not needed, by a specific service on that system:

  • Application Layer Gateway

Service

  • Event Log 
  • IPSEC Services 
  • Logical Disk Manager 
  • Protected Storage 
  • Remote Procedure Call (RPC)
  • System Event Notification
  • Windows Management
  • Instrumentation (WMI)

So, while tuning the application’s performance you’ll also need to tune this software the best you can. If the application uses Java or .NET or a something that’s an entire platform by itself, into the server’s memory, you should look at options to pre-load and cache these applications for better performance.

While checking for this, you could install the application and one of the various performance testing tools-some very costly, some absolutely free-to test the real-life performance you are likely to get. Armed with this you can continue for more optimization. 

Some of these are: Mercury LoadRunner and QuickTest Professional (reviewed in this issue), OpenSTA, AIM Bench, Compuware QA Center, QEngine to name a few.

No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.

<