[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: wasted disk space



> 
> What you have here is a case of usage v speed.  Your files are broken up
> by the file system in to blocks and scattered over the disk surface. 
> 
> To store a file which contains just a single character will take up one block.  
> Not very efficient in terms of disk usage.
> 
> However a large file which requires many blocks also requires the disk heads
> to seek many time toaccess them.  If the block size is small then more head
> seeking is required and performance goes down. (There's a lot more to block
> positiong than this.)
> 
> As a sysadmin it is your job to configure the partion in the best way for
> the job it has to handle.  If the disk is storing emails or news then file
> size is, on the whole, small and performance not such a big issue.  If the
> file system is holding a database then performance (and a bigger block size)
> is better.
> 
> Don't worry about the wasted 10%.  The missing space is taken up with the
> end of files that don't fit into a block.  File systems often fragment
> the little bits of the files left over and place them into one block.  The
> problem with these fragments is that to get them requires more CPU then
> full blocks.
> 
> At the end of the day its the old choice of cost against performance.  Your
> system; you decide.
> 
> Steve
> -- 
>                                 Steve Dobson steve.dobson@krasnegar.demon.co.uk
> 
> If bankers can count, how come they have eight windows and only four tellers?

Yes, I understant this. The question is if the default debian installation
should use the mke2fs default (4096) or force a 1024 block size.

In my opinion optimizing for space would be a better choice for the root
partition because it contains a lot of very small files that waste a lot
of disk space and speed optimization is not very important in this case.

As a system administrator I usually use different blocksizes based on the
expected usage of the disk, but debian doesn't give me an option to do
it in the default installation, unless I open a shell and do the job
myself, but unfortunately I discovered the problem only after the
installation was finished.

I suggest therefore that we use the 1K option and maybe prompt the user
for a better choice if he wants to change the default. Other options which
could also be changed for non-root partitions are the inode ratio and the
reserved percentage.

BTW, my computations of %wasted was wrong because it was relative to total
disk space instead of used disk space. On my partitition the correct number
is about 11.8% of the used space. That's a lot of space in my opinion.

Regarding the use of fragments, mke2fs doesn't supports them:

  # mke2fs -b 4096 -f 1024 /dev/sdc2
  mke2fs 1.18, 11-Nov-1999 for EXT2 FS 0.5b, 95/08/09
  Warning: fragments not supported.  Ignoring -f option

-- 
Massimo Dal Zotto

+----------------------------------------------------------------------+
|  Massimo Dal Zotto               email: dz@cs.unitn.it               |
|  Via Marconi, 141                phone: ++39-0461534251              |
|  38057 Pergine Valsugana (TN)      www: http://www.cs.unitn.it/~dz/  |
|  Italy                             pgp: see my www home page         |
+----------------------------------------------------------------------+



Reply to: