The Electric Wand

Weekly tips from the "Tip o' the Week" email distribution inside of Microsoft.

Tip o' the Week #99 - Is your hard disk just "on"?

Tip o' the Week #99 - Is your hard disk just "on"?

  • Comments 3
  • Likes

clip_image001One frustrating aspect of a modern PC is when it seems to slow down inexplicably, even when it's not obviously busy. Sometimes that could be evidenced by the hard disk light flickering a lot of the time, or in extreme cases, solidly lit up. There are a number of reasons why this could be the case - here are some tips on finding out why and maybe what to do about it.

Your PC is just not good enough

A common reason why your disk is really busy (sometimes known as thrashing) is simply that the machine doesn't have enough oomph to do what it's being told to. It could be you just don't have enough of some critical resources, such as memory. If there isn't enough physical memory (RAM) in the machine, then when an application wants to hold information in memory, something else which is currently in memory needs to be "paged out" - written to disk, temporarily.

clip_image002That's all very well, until the application that was using the data that's just been paged out needs it back -then, something else is paged out, and the previous data is read back in. If you get to the point where you're really short of RAM, the PC will be thrashing to the point of exclusion to practically everything else. The whole process is a lot like the juggling you might need to do when you're trying to work with more than two things but are limited to having only two hands.

The only solution to not having enough RAM is to add some more (not always straightforward), or make the machine do less. Look in Resource Monitor (press Windowskey-R then enter "resmon") under the memory tab, and you'll see how much of your physical memory is being used. You can also look and see which applications are using up all the memory and maybe think about shutting them down, or making room for them by closing other clip_image003applications.

Modern day whack-a-mole

Curing performance problems can be like pushing a blockage from one place to another, or like the whack-a-mole fairground game where you hit one issue and another one just pops up elsewhere. If your PC isn't running out of memory, maybe the processor (CPU) is the bottleneck, or perhaps it's the disk itself.

If the CPU is slow, then everything else will feel pretty slow - the whole machine will just feel like it's overworked. If the disk is slow, then the machine will bog down every time it needs to do something disk-intensive. Combine a possibly slow disk with running out of memory, and you've got the perfect storm - a PC that is constantly shuttling stuff to-and-fro between memory and disk, and burdening the CPU with all the additional overhead to do so.

There are some things you can do to mitigate the "disk light on" issue, however.

It's probably Outlook

ToW #96 covered an issue where Outlook might use up a large amount of disk space, and maintaining that kind of volume will put something of a strain on the PC. Outlook is probably the heaviest desktop application most of us use, and if it isn't hammering your memory or processor, then it will probably be nailing your hard disk.

Defragment

It's still worth making sure your hard disk isn't badly fragmented, a situation where files end up scattered across the surface of the disk in lots of pieces or fragments. If you have a nice clean disk that's largely empty, then Windows would write a new file out in one big splurge of "contiguous" fragments or clusters.

When files are deleted, all that happens is those clusters that are currently used, get marked as free so they can be over-written in future. If the disk gets increasingly full up, though, it may be that the only free space exists in small chunks all over the place - meaning Windows has to do more work to read and write files.

clip_image004You can run Disk Defragmentation by going to Start and typing in Disk Defrag, then you'll be able to run the Defrag process interactively, or schedule it to happen in the background - ensuring that you pick a time that you won't be really busy on your PC, otherwise it will be the Disk Defrag that's making the light glow.

To allow fragmentation a better shot of cleaning up the disk, it may be a good idea to close applications that are likely to be using big files (like Outlook, whose OST file is probably the biggest file on your hard disk), and if you have a high degree of fragmentation, then it would be worth getting rid of the hidden Hibernate File on your hard disk - that's where Windows writes the contents of memory if the battery on your laptop runs out, so it's gigabytes in size.

clip_image005To delete your Hibernate File, you need to fire up a command prompt in Administrator mode - go to Start menu and start typing command then right-click and choose Run as administrator.

A quick alternative is to go to Start, then type cmd and press CTRL-SHIFT-ENTER, which tells Windows to run whatever you've typed in as an administrator. Try it: you too can run notepad as an admin.

Once you have your admin Command Prompt (denoted by the window title of Administrator C:\Windows\etc), then type powercfg -h off to switch the Hibernate functionality off, and in so doing, ditch the hiberfil.sys file. Once you've finished defragmenting, you can switch hibernate back on by repeating with powercfg -h on.

clip_image006

Is your disk just too slow? How would you know?

Finally for this week, there's a possibility that your disk is just basically slow and there's not a lot you can do about that short of replacing it. If you look in Device Manager (Start -> then type Device Manager), and expand out the Disk Drives section, you will see what kind of hard disk you have - try Binging the cryptic model number and you might find the specifications of the disk - does it spin at 5,400rpm or 7,200rpm, or is I solid state? Does it have any cache? Maybe reviewers on Amazon et al will pan that model's performance, or even suggest that a simple firmware upgrade of the disk itself will solve performance issues. [Here Be Dragons - be very careful if you go down this route].

You can see if your disk is the bottleneck to PC performance by looking at the Disk tab in Resource Monitor, clip_image007expanding out the Storage section. You'll see Disk Queue Length as one of the columns on there - that's a measure of how much stuff Windows is waiting for to be read from or written to the disk. If the machine is busy and doing a lot of disk work, this might be legitimately quite high (maybe double figures) but if it's sustained then it could be illustrating that the disk is struggling to keep up with the requests the PC is making of it.

That could be a symptom that it's just not quick enough, but it could be a forebear of the disk being faulty - maybe the reason it's taking ages is because it's physically about to fail. Best get it checked out.

And don't forget ReadyBoost

After sending this original tip above within Microsoft, a reader (Rob Orwin) responded to remind me about ReadyBoost - so I added the following in a subsequent tip. In Rob's own words.

clip_image001[1]Whenever my computer is being a bit sluggish, I stuff two memory sticks, which I always carry around in my laptop bag, in the USB ports and as if by magic everything starts running as if it's on steroids. It's instantaneous as you only need to dedicate a device to ReadyBoost once, and then every time you put it in the USB drive it gets automatically used as pseudo-RAM. Another option is to get a ReadyBoost compatible SD card and stick it in the laptop's SD card slot - which pretty much no one ever uses. [and 4Gb SD cards can be picked up for a few £s]

Yes, it's not quite as fast as actually adding RAM but it's a lot easier and a great deal faster than having to use the HDD for virtual memory. I learnt this from a friend who's a graphic designer. She uses ReadyBoost whenever she needs to do huge batch operations in PhotoShop. The ReadyBoost feature was apparently the main reason why she got her company to buy her a PC instead of a Mac. When a Mac is out of RAM, it's out of RAM.

I even use ReadyBoost at home to run Windows 7 on a laptop that is 12 years old and has 256Mb RAM.

Comments
  • The ReadyBoost section highlighted something I wasn't aware of. I was under the impression that Win 7 needed to have at least 1 GB RAM initially and ReadyBoost would supplement it.  So if I'm reading this correctly I can have less and ReadyBoost can be used to bring it up to speed? If this is the case I may have to finally rid my PC of XP :)

  • That's right, Gordon - the flash device you're adding needs to have at least 1Gb free, but there isn't a requirement to have 1Gb of RAM - though it is worth pointing out that the system requirements for Windows 7 - windows.microsoft.com/.../system-requirements - say 1Gb minimum should be present. It may work with less, but it won't be ideal...

  • Awesome. A friends just given me an old laptop so may just try it.

    I teach Windows 7 and always thought you had to have the 1GB minimum. That said if I told my students "you may not need 1GB physical RAM" it'd confuse them more and they'd start failing the certifications :)

    Thanks

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment