Runtime Revolution
Articles Other News

Quick Apps with Rev: HDrive Awake


by Mark Talluto

My drives are driving me crazy

Profile:

Mark Talluto is the founder of CANELA Software. He is a former Basic, Fortran, Pascal, HyperCard, SuperCard, and MetaCard user. Mark has chosen Revolution to be his company's main development tool for all his commercial software development. He strongly believes there is no better return on investment than Revolution.

Visit his company's site CANELA Software. He lives in southern California.

HDrive Awake was born out of pure frustration with my external hard drives. I have three external drives connected to my main development computer at all times. Two drives work full time on backing up my data every 30 minutes. The third drive holds all my media and Parallels files.

Give 'em a break

All hard drives are designed to go to sleep after a few minutes of inactivity. This sounds like a good thing for energy savings and wear and tear at first glance. In practice though, this really can slow you down. It takes on average 15-30 seconds for a drive to spin up. My media drive is actually composed of two drives in a raid setup. This means that my media drive takes twice as long as the others to spin up. I used to use the spin up time to stand up and stretch and give my wrists a quick break. This got old very quickly.

I spent some time on the Internet looking for existing solutions to this problem. I found some terminal solutions but could not find a simple to use app with a GUI. My search did bring up some very interesting articles on the topic though. I read many forum conversations about users that wanted to control the sleeping of their hard drives as well. It turns out I was not alone in my quest to solve this problem.

Revolution to the rescue

Revolution is truly a RAD (Rapid Application Development) tool. I was able to make my version .1 in about 10 minutes. I was pretty happy with version .1 because it kept all my drives awake. It had one button that engaged the software and it worked on all mounted drives. Version .1 was missing a few features that would make it even more useful.

The code above is the main engine that runs HDrive Awake. If you'd like to examine it in more detail, you can download the stack and look at the scripts, here. Thanks to the speed of development in Revolution, adding a few niceties was no trouble at all. I decided to invest a little more time and give the software the ability to control which drives were kept awake and which ones are allowed to sleep. I also added a button to refresh the drive list in the event you mounted new drives during the day. Last but not least the software needed an about and help screen and a custom icon.

Easy to use

This is the main interface. You can click on any of the drives you wish to stay awake. Then click on the start button. Hide the application and the selected drives will stay awake until you either click on the Stop button or quit the application.

I thought sleeping was good thing...

There are two different schools of thought on the validity of drives going to sleep and their benefits. Energy Star has some important thoughts on allowing your drives to sleep and making your electricity bill more gentle every month.

Google on the other hand has done some research on the topic and has concluded that hard drive heat and constant use had a negligible affect on the life of a hard drive. In fact, they found that drives that lasted 3-4 years in age would actually have a better chance of making it to their 5th year when they were not allowed to spin down.

Next steps

I posted this little utility on versiontracker.com and received some useful feedback. In its first couple of days it was download a few hundred times. Everyone that wrote me had very nice things to say. Some even had a couple feature requests in common. Everyone would like the software to be more automated. They would like the software to automatically run when the computer boots up. HDrive Awake should remember the drives you have set to stay awake and look for them periodically in the event they are mounted at different times of the day. This should make this utility more useful and transparent to the user once set up.

Looks like I need to get back to work and put these useful ideas into HDrive Awake.

Sanity is important

I live in Temecula, CA where it can reach in the upper 90s during the day. This means that my air conditioning is running for most of the day during the summer months. I figured a few hard drives were not going to really impact my electric bill much. In fact, having them stay up and running will probably add to my personal longevity and even improve my productivity. I have been using this little app now for over 3 months and have concluded that I could not live without it. Make your drives wait for you and not the other way around. Download HDrive Awake and give it a try.

©2005 Runtime Revolution Ltd, 15-19 York Place, Edinburgh, Scotland, UK, EH1 3EB.
Questions? Email info@runrev.com for answers.