Reading: Optimise, enhance and monitor system performance

Monitor system performance

Inside this reading:

Test and enhance system performance

Evaluate system effectiveness

Third-party tools

Operating system tools

Monitor system data levels

Troubleshoot and resolve problems

Operating system techniques to optimise performance

Performance monitor

Disk optimisation (de-fragmentation)

Shared folders

Device manager

Third-party tools

Documentation

System specification sheet

Items to be documented

Summary

Test and enhance system performance

Evaluate system effectiveness

There are recognised industry standards against which a system (including hardware and software) should perform when installed. Organisations document the standards they expect. For example:

  • If a printer’s specifications state that it can print 20 pages a minute, then that is the standard for that item.
  • If the standard for opening a 2 MB image in a graphics editor is seven seconds, then that is the standard for that package.
  • If clicking on a shared resource across a network system should be instantaneous then that is the standard for network access.

Standards are considered when selecting the hardware, operating system and software packages for an organisation’s computer systems. If standards are not met, IT personnel need to know why.

The users of a system are generally the best source for quick and immediate advice as to whether a system is working. User feedback can be in help desk requests or grumbling by the water cooler; from formal or anecdotal feedback, any actual or potential problems should always be evaluated.

Third-party tools

Benchmarking software

A benchmark is an objective test to measure the performance of a computer system. Most people think of benchmarking as a way of testing the hardware resources of a system, however, it can also apply to network utilisation. Benchmarking programs are a great way to see the relative performance increase that your tweaks and changes have achieved. Running a benchmark test before and after a change to a system will give you a good idea of where you stand: if it doesn’t meet an expected benchmark, you need to know why and fix it, to prevent any later problems.

Several companies produce ‘whole system benchmarks’ designed to stress test every area of performance and give you a result which you can use as a benchmark for improving your system’s speed. These applications can also provide valuable information about your PC and its configuration. You’ll find serval links to benchmarking software in the Resources section of this Learning Pack.

Software for testing network functionality

Benchmarking software will give you information mostly about your hardware and software items and settings, but perform limited testing of your network. You’ll also find a rage of third-party software in the Resources section for testing a network, including programs that can test your network functionality and have the ability to test the speed of your network, potential bottlenecks and problem workstations.

Once the network has been tested and benchmarked, the results should be compared against the original evaluation documents to identify those areas that need maintenance.

Operating system tools

There are also tools to identify possible network problems within the various operating systems. These can be fairly simple tools, which can be configured to get the most useful information.

Using tools in Windows 2000 and 2003

The Computer Management console in Windows can provide many clues to performance problems on a system.
It allows you to view performance logs, set alerts if system events occur and checks the status of the available disk drives and partitions.
1Select Administrative Tools then Computer Management from the Start menu.
Figure 1: Computer Management console /
2Click the various Event Viewer logs. Various items that happen on the server are recorded in these logs. Some happen automatically while others need to be set up to record the event, for example ‘Auditing’. When clicking on the logs, the right side of the screen will show events that have occurred. Some are information, some warnings and others are critical. Items shown as warnings or errors should be investigated. /
Figure 2: Event Viewer logs
3Double-clicking on the events will show information about the problem that has occurred. Note the Event ID, which can be used to search the Microsoft Knowledge Base to help with fixing the problem.
Select the Disk Management tab to identify any problems with the existing disks or partitions.
‘Healthy’ beside a disk shows the disk is performing well. Any other entry should be investigated. / Figure 3: The Event ID can be viewed under Event Properties (double-click on the event)
Setting alerts
You can also set alerts for when various system events occur. These are recorded in the system logs.
1Right-click on the Alerts tab to create a new alert. (You may need to expand the ‘Performance Logs and Alerts’ section.) / Figure 4: Creating a new alert
2In this area you can select the event to alert and name the alert.
Figure 5: Naming the new alert /
/ 3You then add an event to be monitored. Click the Add button on the next screen to do this.
4The Add Counters option (below) displays various items that can trigger an alert. If you expand the ‘Performance Object’ box you will notice entries for processors, memory, cache, Pop3, etc.
Figure 6: Adding an alert
Note that you can also monitor the local computer or other computers on your network. For an exercise, select the same objects as shown in Figure (Processor, % Processor Time). This entry will create an alert when the processor reaches a certain percentage.
5Click Add and Close to save the new alert.
Figure 7: Add Counters gives you options for triggering alerts /
6The alerts selected in the previous step will now be displayed. You will still need to configure the alert. In this case, because we want to know when the CPU reaches a certain percentage, we need to add a value to the Limit option. For this exercise we have set a very low level of 20 (to ensure some type of response). Enter ‘20’ into the Limit option.
7You can also set a sample interval. This means that the system will run the alert and check the boundaries of the alert to the option that you’ve set. /
Figure 8: Adding a limit
Now that the alert has been configured, you need to perform an action when the alert is triggered.
8Click the Action tab. Note that logging an entry in the application is selected automatically.
You could also send an alert to the administrator (note that you will need to configure the messaging service for this to occur).
9Click the Apply button. /
Figure 9: Setting actions when the alert is triggered
10Now check your new alert:
On the server, perform some actions that would cause the CPU to exceed 20%. (Opening the Windows Task Manager should cause a spike above 20 %.) Check the Application log for entries where the source is the SysmonLog. Figure 10 shows the entry in the log when the processor time was over 20%. /
Figure 10: SysmonLog

This can be used to troubleshoot a system. If this were to happen on a regular basis it may indicate a problem, including virus and spyware issues.

Monitor system data levels

Further standards for a live system include those in relation to:

  • Response times—which include the time to log on to the system and the time to open a program or a file or both. Slowness could indicate network problems, disk damage or poor performance. Response times can also include peripheral devices. For example, for a document copying company, a single page scanner would likely be inadequate, or a 20 page-per-minute (ppm) scanner only scanning 2 ppm may be an issue of concern.
  • CPU usage—an expectation that the CPU can handle peak periods, such as office hours, or for a web server, times when new data is added, would have been identified in planning and influenced the purchase of the CPUs and motherboards.
  • Caching files—which need to be large enough to handle those items that the system moves constantly in and out of physical memory.
  • Access to shared resources—which ensures that the users can access resources needed to work satisfactorily, including shared folders and printers.
  • Memory capacity—which would have been identified in systems specifications;slow screen refresh times or loss of data could indicate a physical memory leak or excessive disk use (meaning limited space available for the users).

Tools to help troubleshoot these items are listed in the Resources section of this Learning Pack.

Troubleshoot and resolve problems

Once actual or possiblesystem problems are found, most operating systems provide tools to either fix it or analyse the problem in more depth. You can also source third-party tools to help troubleshoot the system.

Operating system techniques to optimise performance

Techniques operating systems use to optimise system performance include:

  • Virtual memory
  • Performance monitor
  • Disk optimisation (de-fragmentation)
  • Shared folders
  • Device manager.

Virtual memory

Operating systems need more random access memory (RAM) to run multiple applications at the same time—they use virtual memory to overcome this. When RAM is full, the operating system moves data onto the hard disk in files known as paging files or swap files. If you are using a Linux operating system, a swap partition was created during the installation.

When the operating system has enough memory, the swap file usually isn’t used. But if it runs out of memory, the operating system will page out the least recently-used information in memory to the swap file. This frees up memory for the most recent application’s use. The operating system will continuously do this as data is loaded into RAM.

However, when any data stored in the swap file is needed, it is swapped with the least recently-used data in the memory. This allows the swap file to behave like RAM, although programs cannot run directly off it. Note that becausethe operating system cannot directly run programs off the swap file, some programs may not even run with a large swap file if you have too little RAM.

Depending on your operating system, it is usually recommended that the swap file is from 1.5 to 2 times the amount of physical RAM of your system. So if your system has 256 MB of RAM, your swap file would be sized between 384 MB and 512 MB.

Adjusting virtual memory in Windows Server 2003
To configure the size of the paging in Windows Server 2003, go to Control Panel/System/Advanced/PerformanceSettings/Advanced. In this section, click the Change button in Virtual Memory and the screen in Figure 11 appears.
To improve system performance by adjusting virtual memory settings, you can increase the size of the paging file, or you can move, or spread out, the paging to other physical hard disks.
To increase the size of the paging file:
1Enter a larger number in the Initial Size box.
2Double the figure (in the Initial Size box) and enter it into the Maximum Size text box.
3Click the Set button to enable the new paging file. /
Figure 11: Paging file properties

The best performance increase will come from moving the paging file from the C: drive to another hard disk. Of course, this requires more than one hard disk in the system. Keep in mind that you won’t boost performance by placing the paging file on another drive partition on the same hard disk.

The performance boost from moving the paging file to another hard disk is because while one hard disk is handling operating system functions, the other hard disk can simultaneously handle paging file requests.

To move the paging file:

1Select the C: drive in the drive list.

2Select the No Paging File option and click Set.

3Select the other hard disk in the drive list. Then, select Custom Size, type the appropriate values in the Initial and Maximum size text boxes.

4Click Set. Then click OK and you’ll be prompted to restart your system.

Performance monitor

Most of the Windows Server systems have a tool that allows monitoring of the system. You’ve seen in the previous section how to set alerts in the server system.
The performance monitor is the Management Console that incorporates this tool (among others). /
Figure 12: Performance monitor

From the Administrative Tools menu there should be a ‘Performance’ shortcut. Click this to run the performance monitor. If the item isn’t available from the menu, type ‘perform’ from the ‘run’ command.

Depending on what activities have been completed previously, there may be a range of graphs displayed. Note from Figure 12 above that the processor alert exercise configured from the previous section is displaying.You can add other ‘counters’ to the monitor. /
Figure 13:Prompt
A counter is simply a name for monitoring and graphing the resources of the system. Right-click on the graph area and the option to add a counter will be available.
From here, you set the counter that you want to monitor and it will be graphed on the performance monitor page. Right-clicking in the graph area also allows you to change the properties of the graph. /
Figure 14: Add counters

Disk optimisation (de-fragmentation)

The fragmentation of a file system is caused by normal use. As files of different sizes are created, modified, moved and deleted, the storage locations on a disk are left with various-sized holes, and files are not stored continuously on the disk. This is known as fragmentation. Normal functions, such as browsing the Internet or working on word processing documents, cause this. Fragmentation has a detrimental effect on the performance of an operating system and can in fact cause a hard drive to ‘crash’.

While the standard FAT file system, FAT16 from DOS or FAT32 from Windows 95/98 benefit from occasional de-fragmentation, the new technology file system (NTFS) that should be used in Windows servers benefits from much more frequent use of a de-fragmentation tool. Microsoft suggests weekly or even daily use, depending on certain factors. You may even decide to schedule the de-fragmentation tool to run automatically to reduce administrative workload and keep the operating system optimised.

In the storage node of the Computer Management Console there is a snap-in (leaf or link) called Disk Defragmenter. This tool is used to report on the level of fragmentation and rearrange the files on the disk to remove this fragmentation.
De-fragmenting the file system will result in faster file and directory access and so increase the system speed for the users. /
Figure 15: Disk defragmenter

Disk optimisation in this way overcomes these fragmentation problems by doing two things:

1It de-fragments files—this is the process of moving files around so that all of the data from a file is located together.

2It removes gaps of unused disk space—maximising usage of the disk.

Because the files and directories are now located together and also at the beginning of the disk, disk access time is reduced (the read/write heads do not have to travel as far to retrieve data) and the system will be more responsive.

Figure 16 shows the defrag tool at work. Note the two coloured displays. They are the ‘before’ and ‘after’ snapshots.
Basically, fragmented files are in red so you want to end up with a file system which is mostly blue (for contiguous files) and white (for free space). System files are indicated by green areas and they will not be moved. /
Figure 16: Disk defragmenter at work

Some red areas figure 16 will not be moved, probably due to their being files currently in use, or files being stored specifically in a cluster on the hard drive that will never be moved, such as the system swap file. For this reason, to achieve best results defrag should be scheduled for times when the system is not being used. This is also important since the defrag process takes up considerable system resources and may take a long time.Microsoft also recommends that about 30% of any NTFS-formatted disk be kept as free space to ensure sufficient room for effective de-fragmentation.

Shared folders

Shared folders allow you to share resources on your computer with other network users. This area of Computer Management shows the folders, printers, etc that are shared on your computer and also the current connections to that share, as in Figure 17.