Next Generation Emulation banner

Size:, then size-on-disk: what does thatamean?

1192 Views 9 Replies 7 Participants Last post by  Demigod
When I right click and hit properties on a file, I get size then size on disk. I don't get what thats supposed to mean, is it like the amount of space from the harddrive it takes is size on disk and the actual file is that big?

If thats it then its ridiculous cos I have a bunch of smillies on my compter and they average about 2kb in size but the size on disk is 16kb! Can it be fixed in this case?
1 - 10 of 10 Posts
Ok, I guess this is the reason for this difference between "size" and "size on disk":
Your hd is composed of a lot of sectors. Each sector has 512bytes, and it's the smallest unity of the disk. But OSs never organize the files on the sectors directly. They use something called "cluster". Depending on the file system (NTFS, FAT32, or other) and the size of your hard disk, the file system determine a fixed size for the clusters in your disk. And there is a rule: you can only store one file (or part of it) inside a cluster. You can never have 2 or more files on the same cluster. So, here's an example: on a FAT16 system (Win95), a hard drive with more than 2GB have clusters of 32kB (each cluster takes 64 sectors at once). In this case, a 35kB file would take 2 clusters, meaning that 64kB would be used on disk for this file, and 29kB would be unused (and no other file can use this space).
So, here's the final point: the smaller the cluster size, the better your disk will be utilized. In FAT16 and FAT32 systems, the clusters are fixed size, but NTFS (Win2k and XP) lets you choose the cluster size. I chose 512bytes in my computer, it's the smallest option possible (same size as a sector). This way I will have the files taking the minimum space possible in the disk. But this comes with penaltys, of course. As you decrease the size of the cluster, the number of clusters in your hd will increase. And managing a higher number of clusters can be a tough work for the file system. So you may even notice a small performance loss. Anyway, it's your choice.
See less See more
Actually theres a far more simple explanation for the functionality of the 2 options. When you go into properties you could also be selecting a single file, or a collection of them, but not always the whole disc. In that case it will tell you the size of the selection and the size of the disc its on. It just so happens Windows applies this template to everything so when you view the properties of one of the harddrives the size and the size-on-disc turn out the same because in this case they ARE the same :).

Zephon's reasoning was correct about the difference, but not the functional difference.
What? What you are saying wither makes no sense, or perfect sense and is completely wrong, Vanit....
Oh, there is also the point when you are using NTFS compression, the 'size' tells you the uncompressed size of a file and 'size on disc' tells you how much space it is consuming while compressed.
Opps nevermind, I was completely wrong...

/slaps self
I always kinda figured thats what it was. btw: does compression work and does it really make the file much smaller? and what is performance loss.
Compression works. Of course it should make files smaller:D

Performance loss probably refers to the penalty your system has to incur in order to use the files (since you need to decompress them before use)

That is... assuming the performance loss you raised is related to compression to begin with. Really... anything can mean anything nowadays without proper context. :)
then what if you upload lets say a 2kb file onto a server which lets say for examples sake can only take 10kb. If the 2kb is on the disk 16kb does that mean it won't upload onto the server?
Yes, it will upload to the server. When you send the file you send its data, not the cluster. The cluster is just how it's stored on your computer and when the file is sent it will be stored on the server according to its cluster layout.

Coolsvilleman said:
I always kinda figured thats what it was. btw: does compression work and does it really make the file much smaller? and what is performance loss.
Yes, compression works and it does make file size smaller. It also has a performance hit but a very minor one. However, like all compression algorithms it works best on uncompressed data. It works great for text files, program files, and uncompressed images, but is practically useless for MP3s, movies (with compressed video), and compressed files.
1 - 10 of 10 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top