Skip to main content
an eclectic collection of interesting information about health, work, money and life style.

Managing Disk Space

Few things are less exciting than managing the disk space that always seems to be in too short a supply. But few things are more important to the health and well being of your site.  

The most obvious aspect of managing disk space is the need to have enough. If you have only a few dozen web pages, that's not an issue. But as the amount of information (web pages, database content and more) grows, the quantity of free space goes down.

That's important for two reasons.

All permanent information on a computer is stored on hard drives. Temporary information is often stored in memory only. The two components are completely separate, though they are sometimes confused with one another. As the amount of free space on the hard drive decreases several effects occur.

Here's one way to picture them...

Imagine you had a table with a certain area and you lay out playing cards on the table. At first, you lay them out in order, the 2 at the side of the 3, then 4, and so on. But then you pick up one or two cards from the middle and discard them. Then you add some more cards. Pretty soon things look pretty random.

Now cover the cards with a big opaque sheet of paper.

You want the cards to appear in order when displayed to someone. A special robot could be designed to always pick up the cards from underneath the sheet in order. Or, it could slide a hole in the sheet over the cards to display them in the correct order (2, 3, 4, ...), no matter what order they are really in. That's similar to how the operating system always shows you information in a sensible way, even though it's actually stored randomly.

Why should you care?

Real files are stored in pieces scattered around the drive wherever there is space for them. The more free space there is, the quicker the operating system can find a place to store a new piece. That means, if you delete the junk you no longer need (and free up more space) the system actually runs quicker. It helps create space you might need, and allows the operating system to store files for you faster.

But there's a second effect.

As you delete old files or change them, the pieces get more and more scattered. It takes the 'robot' longer and longer to fetch or display the 'cards' in order. Existing files are fetched and put together 'on the fly' (say, when you request a graphical page or a list of names). But, it takes longer to put together the web page when there are more scattered pieces.

So, the other aspect of managing disk space is to keep the pieces of the files more or less in order. A utility that does that is called a 'de-fragger' or de-fragmentation program. You can request that a system administrator run it, or if you have the authority, you can run it yourself. That keeps the 'cards' in order and allows for quicker access to them.

So, managing disk space involves chiefly three things: (1) keeping enough space to store what you need to store, and also (2) keeping enough free space to make new file storage quick and (3) making old file retrieval fast by keeping things orderly.

When only a few files are involved the benefit isn't worth the effort. But as the number and size of the files grow, to thousands of files or several gigabytes of data, the effect becomes more noticeable. Keeping things organized then makes a significant difference in performance.

Much of this can be automated using utilities. Some will delete files in a certain folder older than a certain date. A program to de-fragment the disk can be set to run automatically during times of light usage, or quietly in the background at all times. Discuss the options with your system administrator and help him or her do the job better by keeping your house in order. You'll benefit by having a better performing web site.