homework help request: "size of all files" vs "size of all files on disk"?

spanky

Lifer
Jun 19, 2001
25,716
4
81
ok, i posted a question about this like last week, and i thought i was all set. but now... i just reinstalled win2000 w/ntfs and i have to answer these questions again. now here is the wierd thing. usually, the "size of all files" is less then "size of all files on disk". but now, after a pretty fresh install of win2000 (and some updates), when i go to look at the "size of all files" and "size of all files on disk"... the first value is greater then that of the second. WHAT?! that does not make any sense to me. is that right? anyone else here using ntfs? wtf is going on? is that normal, or is my win2000 instal just F'ed up? this is supposed to be an easy assignment, but it's just a pain in the balls at this point. :disgust:
 

gentobu

Golden Member
Jul 6, 2001
1,546
0
0
I think its because the sectors on a hard disk are a certain size (512 bytes I think), and if data is put into a sector and does not fill it up, then the extra space is wasted.
 

Spike

Diamond Member
Aug 27, 2001
6,770
1
81
as far as I know, the difference is this... depending on what format your drives are (FAT16, FAT32, or NTFS) your harddirve stores all the files in little "chuncks" I am not sure the size of the chuncks, but the NTFS has the smallest ones. If a file is 10 bytes and the chunks are 7 bytes a piece, then the ten bytes will take up 2 chuncks, or 14 bytes. This means that the size of the file is 10 bytes but the size of files on the disk is 14 bytes. Sorry if my arbitrary "chunck" name confuses you but at the moment I cannot remember how big the chuncks are for each format.

This is also why groups of many small files will have a larger difference between the actual size and size on disk as opposed to one large file

make any sense?

-spike
 

Spike

Diamond Member
Aug 27, 2001
6,770
1
81
Originally posted by: gentobu
I think its because the sectors on a hard disk are a certain size (512 bytes I think), and if data is put into a sector and does not fill it up, then the extra space is wasted.

lol, you said in one sentence clearly what I tried to say in a paragraph and I still made mine confusing ;)
 

diskop

Golden Member
Jul 14, 2001
1,262
0
0
Originally posted by: Spike
Originally posted by: gentobu
I think its because the sectors on a hard disk are a certain size (512 bytes I think), and if data is put into a sector and does not fill it up, then the extra space is wasted.

lol, you said in one sentence clearly what I tried to say in a paragraph and I still made mine confusing ;)

That was the answer to his question last week, but right now it's reversed. The size of the files is larger than the size of the files on disk.
 

spanky

Lifer
Jun 19, 2001
25,716
4
81
Originally posted by: Spike

If a file is 10 bytes and the chunks are 7 bytes a piece, then the ten bytes will take up 2 chuncks, or 14 bytes. This means that the size of the file is 10 bytes but the size of files on the disk is 14 bytes. Sorry if my arbitrary "chunck" name confuses you but at the moment I cannot remember how big the chuncks are for each format.

thanx spike :) i think the term u r looking for is "cluster". anyway, i agree with what u said. there is always wasted space on the hd becuz of how windows stores data in chucks, so "size of files on disk" is usually greater then "size of files". what is confusing me is that right now... the "size of files on disk" is actually smaller then "size of files". what gives? :eek:

 

ViRGE

Elite Member, Moderator Emeritus
Oct 9, 1999
31,516
167
106
It has to be compression, there's no other logical explaination I can think of.
 

gentobu

Golden Member
Jul 6, 2001
1,546
0
0
I guess your files might be compressed. Thats the only way I could get a file's size on disk to be lower than its actual size. example: size 39.5KB size on disk 40KB size on disk w/compression 20KB.
 

spanky

Lifer
Jun 19, 2001
25,716
4
81
Originally posted by: gentobu
I guess your files might be compressed. Thats the only way I could get a file's size on disk to be lower than its actual size. example: size 39.5KB size on disk 40KB size on disk w/compression 20KB.

right now, here is what i am looking at:

size: 971MB
size on disk: 948MB

does that sound outrageously out of the ordinary? also, how can i know for sure if i am using compression? when i was running thru setup, i do not recall setup mentioning anything about it. :eek:
 

Spike

Diamond Member
Aug 27, 2001
6,770
1
81
Originally posted by: spankyOO7
Originally posted by: Spike

If a file is 10 bytes and the chunks are 7 bytes a piece, then the ten bytes will take up 2 chuncks, or 14 bytes. This means that the size of the file is 10 bytes but the size of files on the disk is 14 bytes. Sorry if my arbitrary "chunck" name confuses you but at the moment I cannot remember how big the chuncks are for each format.

thanx spike :) i think the term u r looking for is "cluster". anyway, i agree with what u said. there is always wasted space on the hd becuz of how windows stores data in chucks, so "size of files on disk" is usually greater then "size of files". what is confusing me is that right now... the "size of files on disk" is actually smaller then "size of files". what gives? :eek:

whoa, I have never heard of the values being reversed, the actual size being smaller than the size on disk. I would agree with everyone else and say that sounds like compression but I honestly don't know.

I am not normally so bad with tech words, "cluster" was just escaping my mind for the moment... too much playing serious sam 2 :)
 

gentobu

Golden Member
Jul 6, 2001
1,546
0
0
how can i know for sure if i am using compression

right click on the file and goto properties, click advanced and you should see an option for compressing the file, if it is checked, then the file is compressed. You can also compress the entire contents of a disk/partiton by right clicking the disk/partition you want to compress and goto properties, and check the box that says compress drive to save disk space.
 

spanky

Lifer
Jun 19, 2001
25,716
4
81
Originally posted by: gentobu
<EM>how can i know for sure if i am using compression

</EM>right click on the file and goto properties, click advanced and you should see an option for compressing the file, if it is checked, then the file is compressed. You can also compress the entire contents of a disk/partiton by right clicking the disk/partition you want to compress and goto properties, and check the box that says compress drive to save disk space.

nope... not compressed. i posted in the OS forums and AndyHui mentioned:

"It will start off that way because of the MFT, which takes space but is not really a file."

anyone know what that means?