Hard drive space not adding up. Help?

I recently purchased a 17" C2D MacBook Pro with 2GB RAM and the 160GB HD. I noticed that I did not have as much free space as I thought I did so I went investigating. This lead me to downloading WhatSize and running it. It, as well as OSX tells me that I am using about 97 GB, but when I add up the size of the folders and files on my HD in WhatSize, I find that I am only using about 53 GB, if that. Why might this be? Seems curious to me.

I recently purchased a 17" C2D MacBook Pro with 2GB RAM and the 160GB HD. I noticed that I did not have as much free space as I thought I did so I went investigating. This lead me to downloading WhatSize and running it. It, as well as OSX tells me that I am using about 97 GB, but when I add up the size of the folders and files on my HD in WhatSize, I find that I am only using about 53 GB, if that. Why might this be? Seems curious to me.

Click to expand...

Evidently you have a LOT of invisible files. When was the last time you emptied your trash? Does your Spotlight icon pulse a lot? Have you ever run the CRON scripts?

It, as well as OSX tells me that I am using about 97 GB, but when I add up the size of the folders and files on my HD in WhatSize, I find that I am only using about 53 GB, if that. Why might this be? Seems curious to me.

Click to expand...

How much swap space is being used when you are running that check? I bet that's a big chunk.

Staff Member

OK, I don't get it all that much, but w/e. I'll just agree with psychofreak.

Click to expand...

It comes from the fact that a gigabyte should be equal to a 1000 megabytes. This is how hard drive manufacturers advertise their products, and this is how they should do it.

But computers prefer to think in powers of two, so they say that a gigabyte is 1024 megabytes. Technically, this is incorrect, and a whole other system of nomenclature in which the term "gibibyte" is the near-equivalent of "gigabyte" should be used. But the insistence of computers on using the incorrect "gigabyte" term causes a discrepancy of 2.4% between the two systems of measurement. Unfortunately, this discrepancy is compounded for each 1000-fold increase in number (bytes --> kilobytes --> megabytes --> gigabytes). Now that gigabytes are standard capacities for hard drives, the discrepancy has reached about 7%, which makes it seem like your hard drive has a lot of missing space.

But I'm not sure which is more confusing to consumers...having to explain this difference or having to explain to them what a gibibyte is.

It comes from the fact that a gigabyte should be equal to a 1000 megabytes. This is how hard drive manufacturers advertise their products, and this is how they should do it.

But computers prefer to think in powers of two, so they say that a gigabyte is 1024 megabytes. Technically, this is incorrect, and a whole other system of nomenclature in which the term "gibibyte" is the near-equivalent of "gigabyte" should be used. But the insistence of computers on using the incorrect "gigabyte" term causes a discrepancy of 2.4% between the two systems of measurement. Unfortunately, this discrepancy is compounded for each 1000-fold increase in number (bytes --> kilobytes --> megabytes --> gigabytes). Now that gigabytes are standard capacities for hard drives, the discrepancy has reached about 7%, which makes it seem like your hard drive has a lot of missing space.

But I'm not sure which is more confusing to consumers...having to explain this difference or having to explain to them what a gibibyte is.

EDIT: haha, scratch that. Just click on the System Memory option in Activity Monitor. It tells you the VM size.

Click to expand...

VM size will not tell you how much disk space is actually used for swap. VM size simply tells you how much memory all the various programs have told OS X to reserve for them, just in case they need it. In general, much of this is never used.

To find the actual disk space used by swap, you need to look in /var/vm. You may need administrator or superuser privileges to do so. To do it from Terminal, run this command:

Code:

sudo du -hs /var/vm

From the Finder, you can use Cmd-Shift-G and type in /var/vm to get there.

To illustrate this, here are the VM sizes and actual swap space used (in /var/vm) on some of my machines:

VM size 12.9G, swap 2.2G

VM size 8.8G, swap 1.0G

VM size 4.9G, swap 0.5G

As for the original question, WhatSize is not an effective tool for measuring total disk space usage. It does not appear to tell you when it encounters directories that your user does not have permission to go into. Instead, it silently skips them.

On a system with multiple user accounts, the bulk of the discrepancy will likely be in areas of other accounts that your user does not have permission to view (it doesn't matter if you're an administrator - that's not the same level as superuser). Do a little experiment in the Terminal. First run this command:

Code:

du -hsx /Users

The number you get should agree with what you got from WhatSize, within some roundoff differences. Notice any messages about "permission denied". Then, do this command, which runs the same thing as superuser (it will ask you for your own password - you must be at least an administrator user at this point):

Code:

sudo du -hsx /Users

You'll probably get a higher number.

In fact, you can do the same thing that WhatSize does, only better, from the Terminal. To get true sizes of all folders in the root directory, simply do this:

Code:

sudo du -hsx /* /.??*

Another major strike against WhatFile is that it appears to invent file space usage out of thin air. My Developer folder has subfolders with sizes 734M, 186M, 72M, 62M, 1.2M, 1.6M, 1.1M, 1.8M, 0.5M, 0.4M, and 0.16M. WhatSize tells me that adds up to 1.36G. You do the math. I wouldn't trust this app for anything.

MacRumors attracts a broad audience
of both consumers and professionals interested in
the latest technologies and products. We also boast an active community focused on
purchasing decisions and technical aspects of the iPhone, iPod, iPad, and Mac platforms.