Wednesday, September 20, 2006

Frag This!

Okay, this one is firmly in the technical part of my knowledge. So it's 10:42 pm and I'm still at work. I probably will be at work for a while longer. Why you ask? Because sometimes you just have to learn the hard way that not every utility works the way you'd like it to.

Let's see...where best to begin? I think I'll start with about 3:30 pm when I was gathering information on my servers to document my network (yes, Grey, you've gotten to me. I need a network diagram). So there I am, writing down the volume sizes and how much free space is left on them, and low and behold one of my servers has an "interesting" situation. It seems that out of a 70 Gig hard drive (it's actually a series of hard drives in a RAID configuration) there's only 1 Gig available free space. This doesn't seem right to me, so I go through all the network shares and check their sizes, and then I check all the regular directories and their sizes, and it all adds up to only about 35 or 40 Gig. Where in Hades did my other 35 Gig wander off to. The next logical step is to check the fragmentation level of this particular server. This is where it gets interesting. Apparently, this machine is more than 50% fragmented. "No problem!" you say? "Just run the defragmentation utility!" you say? Yeah, I tried that, but unfortunantly, the utility requires at least 15% of total drive space to run efficiently. With only 1 Gig left, I don't have the kind of space. To make matters worse, this server is the storage location for all of the users' profiles and document storage directories. This means that I can't start moving things around until after hours.

So now it's after hours. I move out enough of the directories to clear out the required 15% of the hard drive space, and I run defrag. Much to my surprise, instead of gaining disk space back, I wind up loosing disk space with every run. Every time I hope that it's just a matter of cleaning up some of the fragmented files. So every time, I clear some more files out and try running defrag again (and again, and again).

Finally, I view one of the defrag reports a little more carefully. As it turns out, there are two files that simply won't be defragmented. Those two files are \System Volume Information\36{38008..... basically they are paging files. My lovely, little, harmless 2 Gig paging files have grown to the size of 35 Gig based solely on fragmentation levels. The file itself is only 2 Gig in size, but due to fragmentation, this little gem takes up 35 Gigs of hard drive space. It seems that the built in defragmentation utility isn't capable of defragmenting an active page file. Every time I run defrag it uses memory (so the paging file grows) and because it's the active paging file, it doesn't get defragmented so I loose space instead of gaining it.

How do you get out of this fine mess I've gotten myself into? I'm so glad you asked. You need to delete the paging file by going into virtual memory and setting it to "None". By the way, Windows doesn't like this idea, and it will warn you that this is a "Very Bad Thing (tm)". Once you remove the file, you'll need to reboot. Then, after the reboot, you need to recreate your paging file with a more reasonable size (say 2 Gig). Now you'll need to reboot again. Suddenly, the drive that was was reporting 1 Gig free, now says it has over 55 Gigs free! It's amazing.

So here I sit at 11:00 pm. Putting files back where I found them, and trying to recreate the file structure exactly as it was. I'm sure there are going to be problems tomorrow morning with files missing for someone. They won't know I was here until after midnight, and frankly, they wouldn't care if they did. It just has to work for them. I've learned a valuable lesson out of all this. It's one that I knew before, but it never hurts to be reminded. Always keep an eye on your fragmentation levels. Run defrag regularly, and for Heaven's sake make sure that the source of your fragmentation problems aren't in your paging files (otherwise the built in defragmentation simply won't work). Now you know! And knowing is half the battle!

I'm going to go home tonight (actually early tomorrow morning) and kiss my wife and brand new baby daughter (oh yeah! did I forget to mention that? I'll have to blog it another time).

1 Comments:

At 2:06 PM, Blogger Unknown said...

yay!!! and when do we get to see photos of my neice???

 

Post a Comment

<< Home