Jump to content

Size vs. Size on Disk


DarkSerge

Recommended Posts

I've always wondered.What's the difference between a file's size and the size on disk? Right-click on a file or folder, and it has two sizes reported. Why the difference?

Link to comment
Share on other sites

I think I get that. The file size is the actual size, but the sector usage makes it use up more disk space than needed. Something like that?So when it comes to estimating disk space, say for burning a CD or moving onto a portable device, which reported size should I estimate that by?

Edited by DarkSerge
Link to comment
Share on other sites

I think I get that. The file size is the actual size, but the sector usage makes it use up more disk space than needed. Something like that?So when it comes to estimating disk space, say for burning a CD or moving onto a portable device, which reported size should I estimate that by?
In most cases, the size on disk is was counts. The exception to that would be in the case of a moving a large number of small files. NTFS uses a minimum of 4kb per file on drives larger than 2gb and 2kb per file on 2Gb and smaller. FAT32 has a wide range of cluster sizes over the range of drive sizes. So, theoretically, a large number of small files could consume a significantly larger amount of disk space on a large drive than they would on a small one.
Link to comment
Share on other sites

nlinecomputers
Size on disk.
I disagree. The size of file is all that matters. The size used by the file on the disk includes overhead that will NOT be copied over to a CD,which uses a different file system and has it's own overhead.
Link to comment
Share on other sites

I disagree. The size of file is all that matters. The size used by the file on the disk includes overhead that will NOT be copied over to a CD,which uses a different file system and has it's own overhead.
Correct. And to clarify the previous statement about sectors, it's really the cluster size that determines the size on disk usage that's reported by windows. The cluster size is largely determined by the file system (NTFS/FAT32) and in the case of the latter, the partition size as well. The actual file size remains the same regardless of where it gets copied to. There's very little overhead on a CD (or DVD) which has its own file system. I really wouldn't care about it as long as the burning software says there's enough room on the disc to burn the files.
Link to comment
Share on other sites

Correct. And to clarify the previous statement about sectors, it's really the cluster size that determines the size on disk usage that's reported by windows. The cluster size is largely determined by the file system (NTFS/FAT32) and in the case of the latter, the partition size as well. The actual file size remains the same regardless of where it gets copied to.
That's what I meant to say....
Link to comment
Share on other sites

This is interesting, and proves the point of this thread, maybe.a 58 byte file had a size on disk of 4 KBso does that mean that defragging your hard drive could free up disk space? if that 58 byte file was split in two parts on the drive, that'd be almost 8 KB used that's mostly empty space. (I'm using small numbers to prove the point, cause with a 20 MB file, and extra 2 or 3 KB won't make a huge difference, but span that small difference over 100,000 files or more and it could add up)

Edited by DarkSerge
Link to comment
Share on other sites

This is interesting, and proves the point of this thread, maybe.a 58 byte file had a size on disk of 4 KBso does that mean that defragging your hard drive could free up disk space? if that 58 byte file was split in two parts on the drive, that'd be almost 8 KB used that's mostly empty space. (I'm using small numbers to prove the point, cause with a 20 MB file, and extra 2 or 3 KB won't make a huge difference, but span that small difference over 100,000 files or more and it could add up)
Running the defag utility will improve disk usage by only a small margin. Depending on how much fragmentation there was to begin with, Windows may not even see the additional freed up space. On today's large hard drives, the difference would be rather insignificant.In the example you gave, the 58 byte file would not be split up. It would fit on one cluster. Besides, 58 bytes isn't really realistic, there's not too many files that small. A better example would be a small text file, say, 17 KB. If the drive is formatted as NTFS, the cluster size is 4 KB, and thus Windows will report it as 20 KB (size on disk). 4x4=16. The extra 1 KB gets stored onto a separate cluster of its own. And no matter how much you defrag the HDD, that extra cluster usage would not be freed up. The only time the defrag utility would help in providing more space is if you were to use it on a heavily fragmented drive and then the empty clusters would be "freed" up because the defrag utility would help to arrange them logically ['them' meaning the clusters not in use] in a contiguous fashion on the platter so that it's recorded in the allocation table as available for use.If however, the drive is formatted as FAT32, the cluster size will depend on the size partition/hard drive size. Partition sizes 8 GB or less will have a cluster size of 4 KB. As the size of the partition goes up, so does the cluster size. This page has a fairly good breakdown of the relationship between cluster size and partition size. It gets a little confusing w/ the authors notation of KiB - meaning Kilobyte (KB) and MiB - meaning Megabyte. Edited by Tushman
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...