GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Why two readings on folder size (https://gfy.com/showthread.php?t=124143)

theking 04-10-2003 12:13 AM

Why two readings on folder size
 
Size: 346 MB (363,177,253 bytes)

Size on disk: 848 MB (889,651,200 bytes)

NetRodent 04-10-2003 12:15 AM

Does the folder contain lots of little files?

theking 04-10-2003 12:17 AM

Quote:

Originally posted by NetRodent
Does the folder contain lots of little files?
Contains: 20,470 files, 1,406 folders

NetRodent 04-10-2003 12:31 AM

There's your answer. You've got a lot of slack space. Disk space isn't allocated down the bit, its allocated in clusters (often between 1k to 32k in size). That means that even if you have a file that is smaller than your cluster size, the remainder of the cluster is unusable. For large files this isn't a problem as they'll fill several clusters competely and the last cluster partially. For small files, this can lead to very inefficient use of the disk.

If this is a problem, you might want to consider tar'ing/zipping the files or changing your file system around to use smaller clusters.

theking 04-10-2003 12:43 AM

Quote:

Originally posted by NetRodent
There's your answer. You've got a lot of slack space. Disk space isn't allocated down the bit, its allocated in clusters (often between 1k to 32k in size). That means that even if you have a file that is smaller than your cluster size, the remainder of the cluster is unusable. For large files this isn't a problem as they'll fill several clusters competely and the last cluster partially. For small files, this can lead to very inefficient use of the disk.

If this is a problem, you might want to consider tar'ing/zipping the files or changing your file system around to use smaller clusters.

I assumed that was the reason but did not know for sure.

Another question when you upload to a server which would apply to allocated disk storage.

Size: 346 or
Size on disk: 848

theking 04-10-2003 02:05 AM

Any answers to my last question?

X37375787 04-10-2003 02:23 AM

it depends on the default allocation size. NTFS for example is 8KB, so even if you create a 1 Byte file, it will fill up 8KB. I dunno what *nix OSs have though.

mule 04-10-2003 02:56 AM

Quote:

Originally posted by theking
Any answers to my last question?
LOL, for a retired adult webmaster you sure know a lot about computers :)


All times are GMT -7. The time now is 03:27 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123