Boosting server performance: hard drive maintenance

Server image
Watch out for degradation of performance

After the initial installation of a MySQL database, IT managers may detect that the I/O performance of their servers has begun to degrade.

One of the most common reasons for this is hard drive fragmentation. If your particular installation uses a high number of random calls, this will often lead to fragmentation across all the installed memory.

Having a defrag regime in place is essential to avoid this performance issue.

One of the key areas to look for fragmentation is in the SQL tables. This can often happen with random deletion and insertions increasingly fragmenting a table until there is a drop in performance in the host server.

In addition, if you are seeing increases in disk space usage that can't be explained by other actions you have taken, it's likely that a fragmented table is to blame, as they tend to take up more of the available disk space.

First step

The most common tables to experience fragmentation will be InnoDB and MyISAM. For system administrators tasked with understanding why their database performance has eroded, focusing on the former type of table first will always be a good first step.

This is because as the InnoDB table marks any written data as deleted that block remains empty and is not overwritten with new data. Of course, over time this artificially inflates the table with a corresponding issue with performance.

Generally, running the 'Optimise Table' routine will rebuild the table and its index. Note that the table will be locked while this command is carried out.

Also, sysadmins should be aware that secondary tables could still have high levels of fragmentation even after the routine is complete.

However, many sysadmins are being more intelligent with their defragmentation regimes, as they realise that some tables will have more traffic than others. Performing a hard defragmentation via the Optimise Table routine can be inefficient.

One consequence of doing this regularly is that each instance generates a transaction log, which can take increasing amounts of time to back up. Also, checking the actual level of fragmentation on each index before you start can often be highly revealing.

Setting a minimum level of index fragmentation before defragging is performed will ensure you are not performing unnecessary defrags on your servers.

Low fill factor

Sysadmins should also think about how they have their database set up. In some cases this will include a low fill factor, which speeds up writes to the database but conversely slows reads.

They can also can see performance advantages if they can cache their databases.

If this isn't possible look at how the database is spread over the installed hard drives. If you have shared storage across a Dell PowerEdge installation for instance, think about how you could simplify this to reduce the amount of random accesses your database has to perform over a given number of hard drives.

In addition to focusing on the database tables themselves, IT managers should also think about their maintenance of the physical hard drives that their servers are using. An OS defragmentation at regular intervals should offer better life expectancy for the hardware and also allow installed applications to see performance boosts.

Latest in Pro
Epson EcoTank ET-4850 next to a TechRadar badge that reads Big Savings
I searched for the best printer deal you won't find in the Amazon Spring Sale
Microsoft Copiot Studio deep reasoning and agent flows
Microsoft reveals OpenAI-powered Copilot AI agents to bosot your work research and data analysis
Group of people meeting
Inflexible work policies are pushing tech workers to quit
Data leak
Top home hardware firm data leak could see millions of customers affected
Representational image depecting cybersecurity protection
Third-party security issues could be the biggest threat facing your business
An image of network security icons for a network encircling a digital blue earth.
Why multi-CDNs are going to shake up 2025
Latest in News
An image of Pro-Ject's Flatten it closed and opened
Pro-Ject’s new vinyl flattener will fix any warped LPs you inadvertently buy on Record Store Day
EA Sports F1 25 promotional image featuring drivers Oscar Piastri, Carlos Sainz and Oliver Bearman.
F1 25 has been officially announced, with this year's entry marking a return for Braking Point and a 'significant overhaul' for My Team mode
Garmin clippd integration
Garmin's golf watches just got a big software integration upgrade to help you improve your game
Robert Downey Jr reveals himself as Doctor Doom to a delighted crowd at San Diego Comic-Con 2024
Marvel is currently making a major announcement about Avengers: Doomsday's cast on YouTube, and I think it's going to be a long-winded reveal
Samsung QN90F on yellow background
Samsung announces US prices for its 2025 mini-LED TV lineup, and it’s good and bad news
Nintendo Switch Lite
Forget the Nintendo Switch 2, the original Switch is getting one last hurrah in a surprise Nintendo Direct tomorrow