Sunday, December 9, 2007

Monitoring and Optimization

Disk Monitoring and Optimization

Windows 2000 includes several tools that you can use to diagnose disk problems, improve performance, and compress data, such as Check Disk, the Disk Defragmenter snap-in, data compression, and disk quotas. This lesson discusses each of these tools and shows how the tools are used. Lesson 2 explores disk monitoring in the context of system performance monitoring.

Check Disk

The Check Disk tool, also referred to as the Error-checking tool, allows you to check for file system errors and bad sectors on your hard disk. To use Check Disk, open the Properties dialog box for the specific disk you want to check. You can open the Properties dialog box from Windows Explorer or from My Computer. On the Tools tab, click Check Now to open the Check Disk dialog box and select the appropriate options

Disk Defragmenter Snap-In

Windows 2000 saves files and folders in the first available space on a hard disk and not necessarily in an area of contiguous space. This leads to file and folder fragmentation. When your hard disk contains a lot of fragmented files and folders, your computer takes longer to gain access to them because it requires several additional reads to collect the various pieces. Creating new files and folders also takes longer because the available free space on the hard disk is scattered. Your computer must save a new file or folder in various locations on the hard disk.

Defragmenting Disks

The process of finding and consolidating fragmented files and folders is called defragmenting. The Disk Defragmenter snap-in is used to locate fragmented files and folders and then defragment them. It does this by moving the pieces of each file or folder to one location so that each file or folder occupies a single area of contiguous space on the hard disk. Consequently, your system can gain access to and save files and folders more efficiently. By consolidating files and folders, the Disk Defragmenter snap-in also consolidates free space, making it less likely that new files will be fragmented. Disk Defragmenter defragments FAT16, FAT32, and NTFS volumes.

The upper portion of the window lists the volumes you can analyze and defragment. The middle portion is a graphic representation of how fragmented the selected volume is. The lower portion is a dynamic representation of the volume that is continuously updated during defragmentation. The display colors indicate the condition of the volume.

  • Red indicates fragmented files.
  • Dark blue indicates contiguous (nonfragmented) files.
  • White indicates free space on the volume.
  • Green indicates system files, which Disk Defragmenter cannot move.

By comparing the Analysis display band to the Defragmentation display band during defragmentation and at its conclusion, you can quickly see the improvement in the volume.

To analyze or defragment a volume, you can choose one of the options described in the following table.

Option Description
Analyze Click this button to analyze the disk for fragmentation. After the analysis, the Analysis display band provides a graphical representation of how fragmented the volume is.
Defragment Click this button to defragment the disk. After defragmentation, the Defragmentation display band provides a graphical representation of the defragmented volume.

Using Disk Defragmenter Effectively

The following list provides guidelines for using the Disk Defragmenter snap-in.

  • Run Disk Defragmenter when the computer will receive the least usage. During defragmentation, data is moved around on the hard disk. The defragmentation process is CPU intensive and will adversely affect access time to other disk-based resources.
  • Recommend users defragment their local hard disks at least once a month to prevent accumulation of fragmented files.
  • Analyze the target volume before you install large applications, and then defragment the volume if necessary. Installations are completed more quickly when the target medium has adequate contiguous free space. Additionally, gaining access to the application after it is installed is faster.
  • When you delete a large number of files or folders, your hard disk might become excessively fragmented, so be sure to analyze it afterwards. Generally, you should defragment hard disks on busy file servers more often than those on single-user client computers.
  • Consider using a disk defragmentation utility that allows you to perform a regularly scheduled network-wide defragmentation from a central location. Executive Software created the manual Disk Defragmenter included with Windows 2000 and manufactures an automated, more feature-rich version of this utility as a separate product called Diskeeper.

Data Compression

Data compression enables you to compress files and folders on NTFS volumes. Compressed files and folders occupy less space on an NTFS-formatted volume, which enables you to store more data. The compression state for each file and folder on an NTFS volume is set to either compressed or uncompressed.

Using Compressed Files and Folders

Compressed files can be read by and written to any Windows-based or MS-DOS-based application without first being uncompressed by another program. When an application, such as Microsoft Word for Windows, or an operating system command, such as copy, requests access to a compressed file, NTFS automatically uncompresses the file before making it available. When you close or explicitly save a file, NTFS compresses it again.

NTFS allocates disk space based on the uncompressed file size. If you copy a compressed file to an NTFS volume with enough space for the compressed file, but not enough space for the uncompressed file, you will get an error message stating there is not enough disk space for the file. The file will not be copied to the volume.

Compressing Files and Folders

You can set the compression state of folders and files in Windows Explorer or by using the compact command-line utility. For information on compact utility syntax, go to a command prompt and type compact /?.

To compress a file or folder, open the Properties dialog box for the specific file or folder. On the General tab, click Advanced. In the Advanced Attributes dialog box, select the Compress Contents To Save Disk Space check box, as shown in Figure 13.3. Note that NTFS encryption and compression are mutually exclusive. If you choose the Encrypt Contents To Secure Data check box, you cannot compress that folder or file.

Copying and Moving Compressed Files and Folders

There are rules that determine whether the compression state of files and folders is retained when you copy or move them within and between NTFS and FAT volumes. The following sections describe how Windows 2000 treats the compression state of a file or folder when you copy or move a compressed file or folder within or between NTFS volumes or between NTFS and FAT volumes.

Copying a File Within an NTFS Volume

When you copy a file within an NTFS volume, the file inherits the compression state of the target folder. For example, if you copy a compressed file to an uncompressed folder, the file is automatically uncompressed.

Moving a File or Folder Within an NTFS Volume

When you move a file or folder within an NTFS volume, the file or folder retains its original compression state. For example, if you move a compressed file to an uncompressed folder, the file remains compressed.

Copying a File or Folder Between NTFS Volumes

When you copy a file or folder between NTFS volumes, the file or folder inherits the compression state of the target folder.

Moving a File or Folder Between NTFS Volumes

When you move a file or folder between NTFS volumes, the file or folder inherits the compression state of the target folder. Because Windows 2000 treats a move as a copy and then a delete, the files inherit the compression state of the target folder.

Moving or Copying a File or Folder to a FAT Volume

Windows 2000 supports compression for NTFS files only. Because of this, when you move or copy a compressed NTFS file or folder to a FAT volume, Windows 2000 automatically uncompresses the file or folder.

Moving or Copying a Compressed File or Folder to a Floppy Disk

When you move or copy a compressed NTFS file or folder to a floppy disk, Windows 2000 automatically uncompresses the file or folder.

Simple Network Management Protocol Service

To meet the challenges of designing an effective network management platform for heterogeneous TCP/IP-based networks, the Simple Network Management Protocol (SNMP) was defined in 1988 and approved as an Internet standard in 1990 by the Internet Activities Board (IAB). SNMP allows you to monitor and communicate status information from SNMP agents to a network management station (NMS). This lesson provides the background and conceptual material necessary to understand and implement SNMP within the context of Windows 2000.

Overview of SNMP

SNMP is a network management standard widely used with TCP/IP networks and, more recently, with Internetwork Packet Exchange (IPX) networks. SNMP provides a method of managing network nodes (servers, workstations, routers, bridges, and hubs) from a centrally located NMS.

Performance Console

Windows 2000 provides two utilities for monitoring resource usage on your computer: the System Monitor snap-in and the Performance Logs And Alerts snap-in, both of which are pre-installed on the Performance console. The System Monitor snap-in allows you to track resource use and network throughput. The Performance Logs And Alerts snap-in allows you to collect performance data from local or remote computers.

System Monitor Snap-In

In Windows 2000, Performance Monitor has been replaced by System Monitor. With System Monitor, you can measure the performance of your own computer or other computers on a network. System Monitor allows you to perform the following tasks:

  • Collect and view real-time performance data on a local computer or from remote computers
  • View data collected either currently or previously in a counter log
  • Present data in a printable graph, histogram, or report view
  • Incorporate System Monitor functionality into Microsoft Word or other applications in the Microsoft Office suite by means of Automation
  • Create HTML pages from performance views
  • Create reusable monitoring configurations that can be installed on other computers that use MMC

With System Monitor, you can collect and view extensive data about the usage of hardware resources and the activity of system services on computers you administer. You can define the data you want the graph to collect in the following ways:

  • Type of data To select the data to be collected, you can specify one or more counter instances of performance monitor objects. Some objects (such as the memory object) provide system resource counters; others provide counters on the operation of applications (for example, system services or Microsoft BackOffice applications).
  • Source of data System Monitor can collect data from your local computer or from other computers on the network where you have permission. (By default, administrative permission is required.) In addition, you can include real-time data or data collected previously and saved in counter logs.
  • Sampling parameters System Monitor supports manual, on-demand sampling or automatic sampling based on the time interval you specify. When viewing logged data, you can also choose starting and stopping times so that you can view data spanning a specific time range.

No comments: