Operating System-Specific Disk Suggestions

 < Day Day Up > 

Operating System Specific Disk Suggestions

After configuring your MySQL instance, you have one more step on your quest toward the fastest disk setup possible. This section closes the chapter by looking at the interplay between MySQL and the two most popular operating systems (Linux/Unix and Microsoft Windows), particularly as related to disk responsiveness.

Linux/Unix Suggestions

As you will see in a moment, there are a collection of steps that Linux/Unix administrators can take to boost performance. However, a word of warning: If used improperly, these suggestions can hurt responsiveness or, even worse, data integrity.

Using hdparm

Used to check and set a variety of disk access parameters, the hdparm command can be of use for those installations running Linux with ATA or (E)IDE drives. Administrators can customize any of the following performance-affecting capabilities:

  • Read-ahead

  • Noise control

  • Power management

  • Defect detection and management

  • Sector modes

  • Read-only

  • Benchmarking

As is the case with any advanced, low-level alteration, this command has the potential to do damage (to both system response and data) as well as good, so be sure to save a complete copy of your data before embarking on any amendments, and only make one change at a time.

File System Options

The mount command offers a number of options that you can use to coax some additional performance from your disks:

  • Asynchronous capability Asynchronous access is usually faster, and can be enabled via the o async option.

  • Disabled time stamping Use the o noatime setting to eliminate the work involved in updating the file access time stamps.

  • Integrity checking You can control startup integrity checking for the ext2 file system type via the check option.

  • Journaling The ext3 file system has a number of mount commands that affect journaling behavior.

Windows Suggestions

For graphically minded administrators, Windows servers offer a number of helpful utilities to clean, tune, and otherwise speed up your disk drives.

Disk Cleanup

During the course of normal system activity, it's likely that your disk drives will become cluttered with unneeded files. These files can be by-products of software installation, operating system upgrades, or any number of other temporary activities. Although these files don't directly affect performance, it's a good idea to periodically remove them from your system.

The Disk Cleanup utility can be of great help in finding and then deleting these extraneous files. This application can be found under the System Tools menu within the Accessories submenu. Before removing any files, it conducts a complete analysis of your system and then presents you with a report listing candidates for deletion (see Figure 13.2).

Figure 13.2. The Windows Disk Cleanup utility.


Defragmentation

Over time, information stored on your Windows-based server will become fragmented. This fragmentation adds an ever-increasing performance penalty to all applications that use data from the disk drive. Naturally, this includes MySQL. Most flavors of Windows now ship with a collection of helpful utilities and tools, including software to help restore order to your disk drives by reducing fragmentation.

To defragment your disks, choose the Disk Defragmenter option from within the Computer Management application. One useful feature of this utility is that it first analyzes your data and makes a recommendation before launching the potentially time-consuming task of defragmentation, as shown in Figures 13.3 and 13.4.

Figure 13.3. The Windows Disk Defragmenter.


Figure 13.4. The Windows Disk Defragmenter analysis and recommendation.


Based on the combination of this analysis/recommendation and your own availability, you can make an informed decision about whether this is the right time to start the defragmentation process.

Finally, it's a good idea to include regular invocation of this application in your administrative tasks. Its frequency is very dependent on the levels of system and database activity that your site experiences.

     < Day Day Up > 


    MySQL Database Design and Tuning
    MySQL Database Design and Tuning
    ISBN: 0672327651
    EAN: 2147483647
    Year: 2005
    Pages: 131

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net