# What's the most space efficient journaled filesystem?

## Sith_Happens

Here is a question that I've been puzzling over recently, what is the most space efficient journaled filesystem?  On smaller filesystems, the space sacrifice for a filesystem journal is not that significant, but when you get start dealing with big partitions, it really adds up.  So below you'll see I've done some tests using a 1.5 gig partition, the latest versions of all related filesytem utilities as well as df and fdisk.  From the looks of it, it seems that JFS and XFS have a leg up on ReiserFS, (look at the joural sizes).  I'm not saying this is definitive proof of anything though, in fact I expect that some of these disparities probably arise from the different approaches all the filesystems take, so feel free to bash my meathods  :Wink:  .  I'd like people to try to explain these differences on an empty partition, as well as offer some useful figures on actual effeciency on a full partition (quantative evidence would be nice).  I'm also a little confused as to why the available space according to df on the ext filesystems seems to be so low, it looks to me like some kind of measurement error in df.  :Confused: 

```
#############################################

Filesystem      Space Efficiency

                (df size / fdisk size)

ext2            0.961189

ext3            0.961189

XFS             0.969739

JFS             0.972310

ReiserFS 3.6    0.976482

#############################################

Filesystem      Journal Size

                (df Used on empty partition)

ext2            N/A (20 kb used in case anybody is interested though)

ext3            32828 Kb

XFS             144 Kb

JFS             312 Kb

ReiserFS 3.6    32840 Kb

#############################################

Filesystem      Journal Size

                (indexed against ext2)

ext2            1

ext3            1641.4

XFS             7.2

JFS             15.6

ReiserFS 3.6    1642

#############################################

Filesystem      Journal Efficiency

                (df available / df size)

ext2            N/A

ext3            0.977310

XFS             0.999901

JFS             0.999787

ReiserFS 3.6    0.977657

#############################################

Filesystem      Overall Efficiency

                (df available / fdisk size)

ext2            0.912347

ext3            0.890551

XFS             0.969643

JFS             0.972101

ReiserFS 3.6    0.954669
```

----------

## codergeek42

 *Sith_Happens wrote:*   

>  I'm also a little confused as to why the available space according to df on the ext filesystems seems to be so low, it looks to me like some kind of measurement error in df.  

 By default, Ext2 and Ext3 reserve something like 5% of the available filesystem blocks for the superuser (root). You can change this with tune2fs though:

```
# /sbin/tune2fs -r ${HOW_MANY_BLOCKS_TO_RESERVE} /dev/${PARTITION}
```

Or alternatively

```
# /sbin/tune2fs -m ${RESERVED_BLOCKS_PERCENTAGE} /dev/${PARTITION}
```

Hope that helps..

----------

## GungHo

well, the question is, wether the size of the journal is statically fixed, bound to an initial size of the generation of the new filesystem (mkfs), or could dynamically be shrinken or grown. And how much info is saved in the journal, related to the size of the filesystem

I do not know which one of the available filesystems does this. And wether the journal is inside the filesystem or in an extra partition, as do some commercial Unixes ..

Maybe you find some answers in 

http://linuxgazette.com/issue55/florido.html or

http://www.linuxgazette.com/issue68/dellomodarme.html or

http://bulma.net/impresion.phtml?nIdNoticia=1154 or

http://bulma.net/impresion.phtml?nIdNoticia=642

or in some URL's, which are listed there

Hth

----------

