• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

"size" vs. "size on disk"

rh71

No Lifer
I downloaded my webhost files onto my local drive and when I do a properties on the folder, it shows:

Size: 266MB (279,782,720 bytes)
Size on disk: 485MB (509,018,112 bytes)

I do have a 500MB limit so I'd like to know what gives here... (and why the big discrepancy)
 
Originally posted by: Jugernot
Cluster size?
Probably. Say you have some small 4KB files. If you have a 8KB cluster size each one of those 4KB files still takes up 8KB.
My WINNT folder is the opposite. 930MB Size, 852MB Size on Disk.

 
The harddrive space is divided into clusters, which is basically the smallest unit of space the filesystem can keep track of. Cluster sizes include 4k, 8k 16k and others. So if you formatted your drive to use 4k clusters and had a 4kbyte file, it would take up one cluster. If you had a 1 byte file it would still take up 1 cluster because it's the smallest unit the filesystem can address.

So, in your case, the files are actually 266MB but since there're a lot of small files, you waste a lot of space because the cluster size is large which means it takes 485MB actual disk space.
 
files are stored partly in chunks, so sometimes a file can increase over another one by a single byte but the size on disk may stay the same, as the storage system sets aside room and can quickly fill it, instead of always changing the size on the storage device exactly as the size of the file actually changes. Databases do the same thing and expand or shrink in chunks instead of fluidly.
 
Yup that makes sense... but what's it mean when my webhost limits me to 500MB ? Size or size on disk ? I think how they go about detecting this would tell me the answer to that - so what's a common way webhosts can do it ?
 
Originally posted by: rh71
Yup that makes sense... but what's it mean when my webhost limits me to 500MB ? Size or size on disk ? I think how they go about detecting this would tell me the answer to that - so what's a common way webhosts can do it ?

They probably don't use size on disk to determine their space usage as that all depends on how they formatted their drive. I'd setup systems for clients that use a 64k cluster size. They were using it for video, which is usually very large and does well in a large cluster sized drive.
 
It also can depend on the way the software reads MB and GB.

1GB is technically 1024MB, not just 1000.
 
Back
Top