WinXP NTFS: Hard drive size misrepresentation

Uconn411

Member
Jul 15, 2000
152
0
0
I was just trying to figure out why WinXP (Home Edition) is misrepresenting the size of a HD. It is a 40Gb hard drive, only 1 partition, running NTFS. It says that it is nearly full, with only 1.67 GB free. But, when I select everything on the hard drive, and do properties, total size comes out to be 12GB. I have all files being shown, including hidden ones. Updated Norton antiv, no viruses. Scandisked, nothing wrong. Emptied recycling bin, no help. Any suggestions would be appreciated.
 

Uconn411

Member
Jul 15, 2000
152
0
0
I emptied the recycling bin, there was hardly anything in there to begin with. But it didn't help the problem.
 

Jman13

Senior member
Apr 9, 2001
811
0
76
Go to a DOS prompt and run "chkdsk" to see what the size representations and breakdown is. (if Chkdsk works in XP...I'm at work, which runs 2k, so I can't test it now).
 

dullard

Elite Member
May 21, 2001
26,066
4,712
126
I'm not a HD expert, but I think I understand the problem (if I'm wrong will someone straighten me out).

A hard drive would be extremely slow if a file was allowed to start anywhere on the disk. If the disk had to handle all 40 billion locations on your 40 GB drive - things will slow to a crawl. So instead the drive is broken up to a manageable number of clusters - with each cluster holding one file (or a piece of one file if the file size is larger than one cluster). A cluster cannot have more than one file or more than one file piece. So instead of having 40 billion possible starting file locations, it might be something like 100,000 possible file starting locations. This dramatically increases the disk speed.

A good analagy is a 5 subject notebook you might have used in school. If there were no dividers, it might take a half an hour to find your English notes. Instead, there are four thick tan colored dividers making 5 separate sections. One section might have social studies, another section will have english, the third might have math, etc. Now with these dividers finding your English notes is quick and simple.

Unfortunately there is a problem. Suppose your 5 subject notebook had 500 total pages (100 for each subject). What if you only had 10 pages of English notes? Well you end up wasting a huge chunk of your notebook since that section can only handle English notes. Those 90 extra pages sit unused forever.

The hard drive suffers the same problem. A file that is 1 byte long might have 16 kB reserved. In this extreme example, 99.9939% of that space is wasted and the other 0.0061% contains your single byte of data. Now suppose you have a directory of 100 of these 1 byte files. When you highlight them and do properties, it will show 100 bytes of data. Unfortunately this data might occupy 160 kB of disk space. So you are looking at the same "size" using two different tools. One tool lists the space reserved, and the other tool lists the space actually filled with data.

Note: 16 kB is just an example of a cluster size - it varies dramatically with HD size and format type (FAT16, FAT32, HPFS, NTFS, etc.)

By the way, I really dislike it when I install a new program and I see hundreds or thousands of little files being copied. First it is much faster to read all the data if it was in one file and second these little files waste a huge amount of reserved space. Compression software (commonly ZIP or the better LHA) get a large portion of their compression just because they move all these small files into one large file and eliminate most of the wasted reserve space.
 

lamga

Member
Feb 20, 2002
119
0
0
Jman13, you've hit the nail right on the head. It is the phenomenon known as "slack space", that, due to fixed cluster size, diskspace gets "rounded up" numerically. This is not new, it was there in DOS too. The bigger the drive, the more noticeable this effect is. (One of the reasons to go from FAT16 to FAT32 was to reduce slackspace, by lowering cluster size). It's a balance though, if cluster size is too big, you waste space. If it's too small, your harddrive thrashes and seeks become slower.

If you rightclick a directory, you will see a listing of "Size" and "Size on disk". "Size on disk" takes slack space into account. You will notice the differences between the two sizes are larger when viewing a directory of, say, small 10k-100K HTML and GIF files, as oppose to a directory full of large MP3s.

Now, that doesn't fully account for a difference between 12GB and 38.3GB. I think Windows Explorer uses the 1000MB = 1GB rule, when in fact 1024MB = 1GB. So you lose some accuracy there. Check the properties of say, c:\pagfile.sys. The size in properties and the size you see in Explorer is way off by 6MB already.
 

Uconn411

Member
Jul 15, 2000
152
0
0
With the NTFS file system, is it possible to do fdisk /mbr, or does that only work with Fat32 systems?
 

Adul

Elite Member
Oct 9, 1999
32,999
44
91
danny.tangtam.com
i would suggest you compress the cache folder for IE to begin with. Second I would run a defrag on the drive.(it nmight help)
3rd see if uo have all the latest updates from MS.
4th check out MS knowledge base.
 

Uconn411

Member
Jul 15, 2000
152
0
0
I have cleared I.E.'s cache, defraged, and ran windows update to see if there was any updates to fix the situation. None solved the problem.
 

ObiDon

Diamond Member
May 8, 2000
3,435
0
0
It is a 40Gb hard drive, only 1 partition, running NTFS. It says that it is nearly full, with only 1.67 GB free. But, when I select everything on the hard drive, and do properties, total size comes out to be 12GB.
Slack space is a decent theory, but there's no *realisitic* way it's going to eat up 26GB+ of hard drive space.

Uconn411, check your system restore settings if you haven't already. It's the ultimate HD space-eater app. Though I don't think it would account for ALL 26GB either. ;)
 

Derango

Diamond Member
Jan 1, 2002
3,113
1
0
Dullard, yea you have explained the concept of cluseters...but that still wouldn't explain why his system is saying his 40Gb hard drive is 12GB, unless he formated with clusters that were 5-6MB large :) You don't loose that much space to clusters, espicaly in NTFS. It was really only an issue with FAT16, and more recently FAT32

 

Colt45

Lifer
Apr 18, 2001
19,720
1
0
are you sure you made a 40GB partition?

whats windows showing in disk manager?
 

dullard

Elite Member
May 21, 2001
26,066
4,712
126
Originally posted by: Derango
Dullard, yea you have explained the concept of cluseters...but that still wouldn't explain why his system is saying his 40Gb hard drive is 12GB, unless he formated with clusters that were 5-6MB large :) You don't loose that much space to clusters, espicaly in NTFS. It was really only an issue with FAT16, and more recently FAT32

NTFS is better with the slack space. However, I just gave one of the biggest reasons for the discrepancy. There are other possible reasons including:
1) A 40 GB hard drive has 40 billion bytes. However a computer does not go by true mathematical billions, they instead go by multiples of 1024. Thus in computer terms 40 billion bytes is 40,000,000,000/1024/1024/1024 = 37.25 GB.
2) The formatting itself occupies some room, but on 40 GB, this is a small fraction.
3) There could be some bad spots on his drive - reducing the total useable region.
4) Uconn411 could have missed some hidden or system files (the pagefile is often easy to miss).
5) Improper partitioning.
6) Incorrect BIOS recoginition.
7) etc...

Lets just look at #1 for the moment, since we have no good data about #2-#7. He has 12 GB of data and his computer says (37.25-1.67)=35.58 GB are occupied. That means the slack space is roughly 2/3rds of his hard drive. This isn't too difficult to achieve. If his average file is only 1/3rd of the cluster size, then everything is explained by the slack space. I don't know what the cluster size is on his drive. The default NTFS cluster size is 64kB on older WinNT machines and 4kB on the rest. I'll assume it wasn't formatted on a machine running an old version of WinNT, and I'll assume the default wasn't changed. Thus if Uconn411's AVERAGE file size is 1381 bytes (4*1024byte*35.58GB/12GB), then everything is explained by slack. I've seen quite a few games that have thousands of files under 1381 bytes (text files, icons, help files, item data files, etc). If Uconn411 has those games installed, then that will easilly bring the average file size down near that level.

However you are right, options #2-#7 could also be playing a role in his missing space.
 

lamga

Member
Feb 20, 2002
119
0
0
Heh, Windows Explorer is not famous for its accuracy. That said, I just did the same diskspace experiment as Uconn411, and my 10GB drive (it's a laptop partition, so no laughing) running Windows 2000 says 1.67GB used up, when Disk space free is like 2 GB. So, unless we both have this magical virus or whatnot, I would say nothing is wrong with Uconn411's PC and Windows Explorer is inaccurate and leave it at that.