Assuming 100K per file, that means 10 files per meg, and:
- 10K files per GB
- 1 million files per 100 GB
- 10 million files per TB
Is this correct?
Assuming 100K per file, that means 10 files per meg, and:
Is this correct?
For the most part yes.
The only big factor that may throw off your calculations is cluster sizes. Depending on what filesystem you use, the smallest unit will be a cluster or equivalent. A file cannot use less than a cluster, so while your files may take up X amount of space and your drive is size Y, your free space isn't necessarily Y - X due to the fact that you can't put another file in a half full cluster that is occupied by another file.
Is this correct?
Only for a first approximation.
Besides the use of disk space to store the actual file contents, you also need to account for:
When measuring file sizes we are more concerned with base 2 conversions than base 10 conversions, so while your calculations are roughly correct, they are not perfect. For example, one megabyte is not 1000 kilobytes, 1 megabyte is 1024 kilobytes. When you go all the way up to terabytes, this error is compounded, so the number of files you can fit in a terabyte of space is significantly increased. If we use the parameters you gave (files exactly 100 kilobytes in size) we could actually fit 10,995,116 files into a 1 terabyte space, nearly a million more files than you suggested with your original calculation! If space is critical, it is important to remember that file sizes are calculated in base 2, not base 10.
You also want to consider what surfasb said, but since the default cluster size for most systems is 4 kilobytes you would not be wasting any space if we are using the parameters you gave (100 kilobyte sized files, 100/4 = 25 with no remainder).