UFS journal size

Doug Poland doug at polands.org
Wed Sep 21 16:11:27 UTC 2011


On Wed, Sep 21, 2011 at 12:48:25PM +0300, Ross wrote:
> Quoting the manpage:
> 
>          -s jsize  Specifies size of the journal if only one provider is
>                        used for both data and journal.  The default is one
>                        gigabyte.  Size should be chosen based on provider's
>                        load, and not on its size; recommended minimum is twice
>                        the size of the physical memory installed.  It is not
>                        recommended to use gjournal for small file systems
>                        (e.g.: only few gigabytes big).
> 
> My question is: if I have 4 or 8 GB of RAM should I create 8 or even
> 16 GB journals?.. This seems huge especially if the fs size without
> journal is only 10 gigs. Or the recommended minimum is for systems low
> on RAM?
>
My experience has shown that speed of the underlying filessystem has a
huge impact on the required size of the journal.  I have a system
running hardware RAID-10 on a 3Ware SATA controller.  On a 100G
partition, rsync would regularly cause a panic until I got my journal up
above 10G.  This particular host has only 1G of RAM and a single 3.4GHz
P4 CPU.

Sizing this particular box using gjournal was painful until I got the
journal sizes large enough.  It turns out the journals had to be so
large (for the infrequent write burst) that a significant amount of disk
was chewed up for journals that were mostly unused.  

If I had to do it over again, I would have not used gjournal and simply
used softupdates.  YMMV

-- 
Regards,
Doug


More information about the freebsd-questions mailing list