I’ve seen many websites that have pretty much the same ext3 performance tips, but I just came across this one today that had something very useful on it.

It turns out that the ext3 filesystem by default reserves 5% of the disk space of the volume just in case the volume fills up.  This would allow the system to continue running and allow the root user to still log in and clean things up.  The problem is, 5% of a 300G drive is 15G, which is pretty excessive.  Like most things, this setting can be changed uisng the tune2fs program.  I changed my percentage of reserved blocks to 1% instead of 5% which freed up 10G on my drive.

This was very easy to do with the following:

# tune2fs -m 1 /dev/sda1

Tags: , ,

4 Responses to “Quickly get up to 5% more disk space from your ext3 volumes”

  1. Aniruddha says:

    Great tip! What about non root (/) partitions? Is it possible and desirable to disable the reserved-blocks-percentage on non root partitions?

    • John Alberts says:

      Actually, it does this for any ext3 file system, regardless of the mount point. So, if you create seperate ext3 partitions for /, /usr, /home, /var, /boot, you’ve lost 5% of the blocks for each of those partitions. I’m not sure if it’s possible to disable this completely or not, but I see no reason not to reduce it to 1% instead of 5%. I haven’t had a chance to try something like ‘tune2fs -m 0 /dev/sda1′ on an unimportant partition.
      Let me know if completely disabling it works for you.

  2. Carlos says:

    Unfortunately this is a not so great tip. It could degrade perfomarce of your hard disk a lot. I know it because I tried for a while and the hdd was very slow. Theodore Ts’o, the mantainer of ext{3,4} advices to let this percentage as it is. If you don’t believe me, you can google for it.

    • John Alberts says:

      I tried to find what you were referring to about it degrading performance, and the only thing I could find is this:

      > > Just as a side note but do you really want to reserve 5%
      > > of your 2TB partition for root?

      The filesystem performance will degrade if you eat into the last 5%,
      but as long as you’re willing to live with this tradeoff, and assuming
      you don’t need to reserve space for things like log files, then sure,
      you can always drop the percentage.

      So, this seems to indicated that performance will only be degraded if you start using that final 5%. It’s good to know, but for me, in some situations, the performance trade off is worth it.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>