Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[HELP] free space calculation error !!!

0 views
Skip to first unread message

KlausL

unread,
Dec 8, 2000, 7:08:45 AM12/8/00
to
Laurent,

I assume that "Go" stands for "GByte" - true?

Defragging your hard disk will never reclaim disk space.
When you defrag a disk you simply reorganise it: You gather
the disjointed pieces of each file and put them into contiguous
blocks. Your machine will run faster because there will be less
disk head movement - but you will not gain any space!

Your method for calculating disk space is inaccurate. A more
accurate method goes like this. It assumes that the drive size
is 1 GByte, that you have a FAT partition and that your cluster
size is 16 kBytes (which is the default for drives from 513 - 1023
MBytes.)

Disk space = (sum of all file sizes) + 8kBytes*(number of files) +
8kBytes*(number of folders)

This method ignores the space consumed by long file names. It
also ignores the space consumed by folders with large numbers
of files inside.

Did you include hidden files in your calculations? There could be
hundreds in "c:\winnt\profiles\Laurent\Temporary Internet Files"!

Klaus

Laurent RAVEL wrote in message <90qbko$9ma$1...@wanadoo.fr>...
>Hi all,
>
>I 've a system partition (c:\), its size is : 1 Go.
>All files and folders (hidden inclued) in c:\ represent : 560 Mo
>Virtual memory size on c:\ : 2 - 50 Mo (Min - Max)
>Register table size : 20 Mo
>free space on c:\ from Properties on c:\ : 110 Mo
>
>If I do a quickly calculation, free space size is : 1000 - 560 - 2 -20 =
>418 Mo.
>So, I ran a defragmentation and a error-checking on c:\. but free space
>size doesn't change.
>
>How do you explain this difference (308 Mo) ?
>Could anyone help me ?
>
>Thanks in advance,
>Laurent RAVEL.
>
>


Laurent RAVEL

unread,
Dec 8, 2000, 8:47:17 AM12/8/00
to
Hi KlausL,

> I assume that "Go" stands for "GByte" - true?

yes.

> It assumes that the drive size is 1 GByte, that you have a FAT
partition and that your cluster
> size is 16 kBytes (which is the default for drives from 513 - 1023
MBytes.)

yes.


>
> Disk space = (sum of all file sizes) + 8kBytes*(number of files) +
> 8kBytes*(number of folders)
>

> Did you include hidden files in your calculations?

Yes

I recalculate with your formula and disk space is

Disk space = 1 GB - (560 MB + (8Kb * 13447) + (8Kb * 784)+ 2 MB + 20 MB)
= 1024 - (560 + (10756/1024) + (6272/1024) + 22
= 1024 - 694 = 330 MB

Win Nt says 110 MB, the difference is important : 220 MB for space
consumed by long file names and folders with large numbers of files
inside.

Thanks for your advice
Laurent.

Luc Kumps

unread,
Dec 8, 2000, 8:58:20 AM12/8/00
to
Did you:
- empty the Recycle Bin
- empty the cache of your Browser?

Luc

"Laurent RAVEL" <lra...@referentiel.com> wrote in message
news:90qon6$5gj$1...@wanadoo.fr...

Laurent RAVEL

unread,
Dec 8, 2000, 9:48:00 AM12/8/00
to
Hi luc,

> Did you:
> - empty the Recycle Bin
> - empty the cache of your Browser?

yes.

Laurent.


Luc Kumps

unread,
Dec 8, 2000, 10:01:19 AM12/8/00
to
What is the actual cluster size on your disk?
(you can verify with CHKDSK)

The calculation of Klaus included a "8kBytes" constant.
Klaus assumed that your cluster size (i.e the size of the blocks allocated
to files) was 16KBytes, and that on average half a cluster would be
allocated "too much". For example, a 20Kbyte file would allocate 2 clusters,
i.e. 12 KBytes too much. A 30Kbyte file would also ate 2 clusters, i.e.
2KBytes too much.

There are two potential problems when applying his formula to your computer.
1. Your cluster size could be larger.
2. The approximation of half a cluster being "lost" in the average file only
holds for large files. If you have LOTS of small files on your disk, then
you will loose a lot of space. A file with 100 bytes will also use a full
cluster. 1000 files of 100 bytes will use 1000 clusters. For 8KB clusters
this is 8MB. For 32KB clusters this is 32MB for 100KB of actual data.

I think you would be surprised to see how much free space you have after
converting your disk to NTFS...

Luc

"Laurent RAVEL" <lra...@referentiel.com> wrote in message
news:90qon6$5gj$1...@wanadoo.fr...

Roger Hamlett

unread,
Dec 8, 2000, 11:24:22 AM12/8/00
to

"Luc Kumps" <NOkum...@pandora.be> wrote in message
news:0O5Y5.63885$lR2.1...@afrodite.telenet-ops.be...

> Did you:
> - empty the Recycle Bin
> - empty the cache of your Browser?
>
> Luc
>
> "Laurent RAVEL" <lra...@referentiel.com> wrote in message
> news:90qon6$5gj$1...@wanadoo.fr...
> > Hi KlausL,
> >
> > > I assume that "Go" stands for "GByte" - true?
> > yes.
> >
> > > It assumes that the drive size is 1 GByte, that you have a FAT
> > partition and that your cluster
> > > size is 16 kBytes (which is the default for drives from 513 - 1023
> > MBytes.)
> > yes.
> > >
> > > Disk space = (sum of all file sizes) + 8kBytes*(number of files) +
> > > 8kBytes*(number of folders)
> > >
> > > Did you include hidden files in your calculations?
> > Yes
> >
> > I recalculate with your formula and disk space is
> >
> > Disk space = 1 GB - (560 MB + (8Kb * 13447) + (8Kb * 784)+ 2 MB + 20
MB)
> > = 1024 - (560 + (10756/1024) + (6272/1024) + 22
> > = 1024 - 694 = 330 MB
This formula is only an approximation. The problem here is that if file
sizes are 'random', then the _average_ loss because of the cluster size
will be 8K, and the formula will be correct. Unfortunately, while larger
files may meet these requirements, there are a lot of small files, that
have only a few bytes in size, and the waste in these cases will tend to
be nearer to 16K, than 8K. This leads to the 'real' loss being a lot
larger than expected in some cases. A 'shortcut' for instance will have a
size of under 1.5KB, and will allways waste therefore about 14k.
Personally on a Windows system, I'd expect the 'average loss' to be nearer
3/4 the cluster size...
It is also worth remembering that if the partition is even one byte 'over'
1GB, the loss will double.

> > Win Nt says 110 MB, the difference is important : 220 MB for space
> > consumed by long file names and folders with large numbers of files
> > inside.

Cluster sizes are a problem. It is more efficient to use larger clusters,
but costs a lot in storage, especially when there are a lot of small
files. If (for instance) you converted to NTFS, the default cluster chosen
using the 'convert' tool, is only 512bytes, giving relatively tiny losses.
However for users wanting more speed, using a larger cluster size
(especially given the relatively low cost of disk storage), is better.
The difference between the 'real' size, and the size from explorer, is
available by running 'chkdsk'. This will report the allocation unit size
(which gives the important figure for 'max waste - in the formula, 16KB
was assumed, but if you have 32KB, the figures will double...), and the
actual sizes used by the files.

Best Wishes


KlausL

unread,
Dec 8, 2000, 11:57:38 PM12/8/00
to
Laurent,

Here is some lateral thinking: These days a 1 GByte hard disk
is a very small disk. 20 or 30 GByte hard disks have become
very cheap. They say that time is money. If you accept this then
your most effective strategy might be to replace your small disk
with a large one and to stop worrying about a few MBytes.

Klaus

Laurent RAVEL wrote in message <90qon6$5gj$1...@wanadoo.fr>...

Laurent RAVEL

unread,
Dec 11, 2000, 6:27:37 AM12/11/00
to
Hi luc,

> What is the actual cluster size on your disk?
> (you can verify with CHKDSK)

32 bytes

this explains certainly the lost free space.

Thanks for your advice,
Laurent.

Luc Kumps

unread,
Dec 11, 2000, 6:36:31 AM12/11/00
to
If - for whatever reason- you want to stay with FAT, you could make the
partition on the disk somewhat smaller (a few MB could be sufficient), to
force the use of a smaller cluster size.
Then reformat the drive and reinstall NT on it. You'll have a lot more free
space...

Luc

"Laurent RAVEL" <lra...@referentiel.com> wrote in message

news:912dmf$rnc$1...@wanadoo.fr...

Laurent RAVEL

unread,
Dec 11, 2000, 7:09:46 AM12/11/00
to
Hi KlausL,


KlausL <NoJunkMail&Kla...@attglobal.net> a écrit dans le message :
90se4d$2sjt$1...@arachne.labyrinth.net.au...


> Laurent,
>
> Here is some lateral thinking: These days a 1 GByte hard disk
> is a very small disk. 20 or 30 GByte hard disks have become
> very cheap. They say that time is money. If you accept this then
> your most effective strategy might be to replace your small disk
> with a large one and to stop worrying about a few MBytes.

OK, but for reasons for my own, I wanted to known the free space formula
for FAT partition to check really free space.
Morever, my FAT partition c:\ is on a disk which sizes 20 GB.

Thanks for your advice and your time,
Laurent.

0 new messages