Archive for the ‘windows’ Category

The Strange Case of Missing Hard Drive Space

Monday, December 14th, 2009

Few days ago, a user brought us a machine with some irrelevant software related issue. It was a relatively easy fix and we got the machine back to usable state in no time, only to discover something strange. The machine had a 30GB drive and only few MB of free space. This was causing all kinds of issues, as Windows didn’t have enough space for it’s page file, and kept complaining it can’t save System Recovery snapshots. Obviously we were not going to give it back like that to the user.

When someone shown this to me, I jokingly suggested that they locate and delete the guys hidden pr0n folder. It’s not like he will complain or anything, considering this is a company issued laptop. This is where having a nice disk usage visualization built into the UI would really come in handy. Instead we had to either do this manually (by looking at the size of each folder), or use a third party tool such as Windirstat.

The results of the search were inconsclusive. The Documents and Settings folder was merely 4GB. The Program Files was around 3GB. Where was the space going? Into the Windows folder!

Yep, the Windows folder was over 20GB on a 30GB drive. How the hell does that happen? Windows is known for crufting and growing, but not by that much. There is no way in hell the folder holding the system files should be this big. Unless of course the guy hid his pr0n folder in there. He didn’t though. The reason for missing space was even more bizarre.

The missing 20-something gigabytes was all contained in a single hidden system folder:

C:\WINDOWS\Installer

Inside there was over 3 thousand files, most of which had randomly generated names and nondescript extensions. Furthermore click glance at the size column revealed that almost all these files were identical in size.

What is the Installer folder used for? Apparently this is where Windows stores and unpacks MSI files it downloads via Microsoft Update service. Sometimes the temporary files are not cleared out when the installation fails for some reason.

In this case, Windows was trying to install .NET Framework 1.1 Service Pack 1 roughly twice or three times a day for about a year. Each time the installation would silently fail, and leave a randomly named temporary installation file in the aforementioned directory. No one ever noticed. Slowly but steadily this ate away 20 GB of free space, in neat few MB increments.

Our solution was to delete all the dupes from the Installer folder, and then remove all versions of .NET from the machine, install the newest Microsoft Installer version, re-instal both .NET 1.1 and 3.5, then run Windows Update to make sure all service packs get applied properly.

Apparently this is not an isolated issue though, and the problem can be caused by more than just .NET updates. So if your computer is low on disk space, and you don’t know where it all went, check the Installer folder. It is a system directory, so by default it will be hidden. You have to fiddle with folder settings in order to view it.

Vista Disk Usage Bars

Thursday, December 3rd, 2009

There is one feature I actually really do like in Vista, and I wish other environments implemented it as well. Guess what it is? Oh, right… The title of the post sort of gave it away, didn’t it?

Yes, I really like these things:

Vista Disk Usage Stats

Vista Disk Usage Stats

I especially like how the bar turns red as it approaches the right edge. Visuals – graphs and charts really do help us to see the big picture. Normally seeing 40+ GB of free space I’d assume I have plenty of space left. I kept running into this issue all the time in the past – I wouldn’t start worrying until the quantity of my free GB ended up being a single digit number. Not that I didn’t know I’m running low – I just didn’t care.

Seeing you are slowly running out of drive space however is very different from knowing. When I see that red bar under my C: drive I feel a strong compulsion to delete stuff I don’t need, and un-install software (mostly games) that I no longer use. Bare numbers do not evoke that feeling in me. Colorful bar graphs do.

This makes me wonder why don’t we use visualization for more file system related stuff. For example, can we have a window manager that overlays a tiny pie chart in the corner of each file and folder? It would show relatively how much of total drive space is taken by that particular item. That would be extremely useful!

In fact “How do I find out what is taking up so much space on my HD?” is the third most popular question I get asked by non-technical folk. Number one of course being “why is my computer slow” and number two: “why do I get that error message I didn’t bother writing down, because I assume you can read my mind”. There is of course no easy answer to any of these. Most desktop environments do a pretty good job communicating disk usage info broken down by file/directory to the user. That’s why there are hundreds of little disk analysis tools out there that attempt to help you with this. Simplest and most popular probably being xdiskusage on Linux. It gives you a very simple visual breakdown of what takes the most space on your drive:

xdiskusage breaks it down for you

xdiskusage breaks it down for you

Still, this tool will actually take several minutes to collect this info and calculate the percentages because most file systems do not keep information about combined size of files in a directory. After all, directories are purely virtual constructs that are there only for our convenience. So drawing nice pie charts or graphs on folders would require us to do traverse the folder tree down, calculate combined file sizes and then cache it for future reference. That usually means performance hit, every time the system needs to update the cache. Someone already did this for Windows but didn’t go as far as adding visualization.

With journaling file systems you could just use a background service. It wouldn’t have to monitor all drive activity – only look check whether the journaled changes affect folder sizes that have been cached already and recalculate as needed.

Looking into the future, the relational file systems (if they ever catch on) could do even better than this – making the calculation just a matter of a single optimized query.

This is something that actually can be done – we can implement this. There is nothing we could do about machines slowing down due to user loader malware. There is not much we can do to prevent stupidity driven error messages. But we could make it easy for regular users to visualize their disk usage, and identify problem areas.

The Windows 7 FAQ: Stop Asking This Crap

Thursday, October 29th, 2009

Why do people keep asking me about Windows 7. I don’t care about it. I really don’t! And yet, somehow everyone I meed somehow assumes that the term software developer means no more and no less than guy who knows stuff about Windows 7. I have no clue how people come at this conclusion especially since I usually code in Java, PHP, Perl and Python. How do you get Windows out of that equation is a mystery to me.

Not only that, but I am clearly not an early adopter. I am a late adopter if there is such a thing. I’m the guy who was still running Wordpress 2.0.5 in April 2009. Remember that? Yes, that’s how bad I am.

In fact, I would still be running Windows XP on my main gaming box if the hardware did not become so obsolete that it spontaneously fossilized under my desk. My current gaming box has Vista on it, but only because I came with the hardware and I was to lazy to do anything about it.

You want to ask me about upgrading anything? You’ve got a wrong guy.

Unfortunately most people don’t get this. In fact, most people who ask me about Windows 7 can’t possibly comprehend that spiel above because they simply don’t understand terms such as early adopter, wordpress or fossilization. I figured I might as well use this entry to answer the most frequently asked questions I get in my inbox and IRL.

Maybe this will answer some of your burning Windows 7 questions. Or maybe you can emails this to some of your clueless friends/relatives who keep bothering you with these questions every day.

When is Windows 7 coming out?

Do I look like I care? Do you know how to google? Let me google that for you. How hard was that? For your information, it came out last week. You missed it! You know why you missed it? Because it is not something note worthy. Now piss off.

Is Windows 7 Better than Vista?

Probably. I mean, Windows XP is better than Vista. Hell, Windows 2000 is better than Vista. Sitting on an angry porcupine while being hit in the face with a putrid piece of shit spiked with sharpened nails that was shot out of a cannon and is flying at Mach 3 is better than Vista. I can’t imagine Microsoft actually being able to top Vista when it comes to how badly it sucks. Then again, I have been wrong about them in the past. In fact, every time I gave them the benefit of the doubt and assumed that they will do something right, they went ahead and did the exact opposite.

Here is the deal – the crazy people who actually got this OS this early seem to think it is an improvement over Vista. Then again these people are likely Microsoft fanboys (why else would they get the new OS so close to the release date) so their opinions should be taken with a grain barrel of salt.

Should I upgrade?

No you should not. Wait till Microsoft releases Service Pack 1, then buy a new computer. Windows 7 will be included. If you don’t like this answer go ask someone else. I don’t care how good this new OS is. It can be printing hundred dollar bills for all I care. My position still stands. Don’t. There will be bugs, there will be driver issues, and there will be upgrade hiccups to worry about. The fact you are asking me about this tells me you are not a computer whiz, so if something goes wrong, you will be fucked cause I sure as hell am not helping you out.

Not reason enough for you? How about this – it’s a waste of money. You see, Microsoft is an evil bastard company that forces computer manufacturers to install their OS on every single piece of hardware they sell. This means that a year or two from now, when you are buying a new computer you will have to buy Windows 7 again.

No, I’m not shitting you. Remember that time I was ranting about the “Windows Tax” and you thought I’m just being a retarded open source loon? Yeah, that’s what Windows tax is. It means that Dell (for example) won’t give a flying fuck that you already have a copy of Windows 7 at home. Windows is part of their bundle, and they won’t take it out. Unless of course you can find the tiny hidden link to their Linux based model – but that narrows down your choices quite a bit.

Also, if you buy an OEM version bundled with the computer you will be paying much, much less. Microsoft basically discounts their OS down to fraction of the retail price to make sure that it ends up on every single piece of fucking hardware sold in the world. Don’t waste your money.

But I hate Vista! Should I Upgrade?

No. You should suck it up, and listen to me next time you are buying a computer. What did I tell you about Vista last time around? It’s a piece of shit. What did you do? You went and bought it. This is your punishment for not listening to me.

Actually, I don’t care. Go ahead and upgrade. Just make sure you back up all your data befo… Oh, what? You don’t want to upgrade anymore? You are scared now? All I said was to backup your data. If you want to upgrade your OS, you should be prepared to have your system hosed. I’m not saying it will get hosed – I’m saying shit happens.

And don’t come running to me when you fuck shit up. You know what I’m going to do if you come to me crying that Window 7 ate your hard drive? I’m going to hire Verne Troyer to Shoryuken you straight in the dick. And no, I’m not joking.

Will Windows 7 run on my computer?

It won’t even if it will. Let me put it this way – if you are asking me about this, it means you are to dumb to look up your system specs, google up Windows 7 requirements and do a quick comparison. If you can’t perform a simple task like that, you should not even be considering an upgrade. You should go and buy a computer with Windows 7 already installed whenever it’s time for you to get a new machine.

If you can check this information, then why the fuck are you bothering me with this shit?

Ok, here is the real answer: if you are running Windows XP right now, then no, it won’t run. If you are running Vista and it is sluggish as hell, then Windows 7 will also be sluggish as hell. The new OS is allegedly faster but it still has Vista guts under the hood so it won’t make your machine into a speed daemon.

If your current box is an evil beast from hell that can actually run Vista reasonably fast hen yes, Windows 7 will run on your system and you will probably see some performance gains (assuming the reports about the speed are true). Still, you will be wasting a lot of money due to the Windows tax.

Will you install Windows 7 on my computer?

Absolutely, categorically no. Hell no, fuck no, no to the tenth power. No infinity. Fuck you! Fuck your dog! Fuck the horse you rode in on. No. I have better shit to do than this.

Unless… Unless you are a girl and when you use the voice when asking me. I will then invariably assume that you are somehow inexplicably into me, and that upgrading your OS is my ticket into your good graces. Now you know my weakness so don’t abuse it.

Keep this in mind though: if you give your computer to your girlfriend, and attempt to have her sex me into installing Windows 7 for you and I figure you out then its Verne Troyer + Shoryuken + your testicles – when you least expect it.

That’s all I have for today. If you want to add to this FAQ please post your questions and answers in the comments. If you are a Microsoft fanboy who found this whole post incredibly offensive, and who is planning to call me a fag in the comments, please note hat a) I moderate this shit, b) you should look into obtaining a sense of humor and c) your post will have your IP attached to it. You know what that means right? I can use that IP to find out where you live. And then… Verne Troyer, Shoryuken, etc.. So keep it civil.