UFS journal size

2011-09-21 Thread Ross
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?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: UFS journal size

2011-09-21 Thread Matthew Seaman
On 21/09/2011 10:48, 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?

How much churn do you expect in the data on that partition?  A journal
that's about the same size as the actual filesystem in question and on
the same physical device is not really going to get you any advantages.
If it's mostly going to be read rather than written, then you wouldn't
fill up that size of journal in any case.

The 'twice physical RAM' advice is all about achieving maximum
performance on large filesystems with lots of data writes: if write
performance is not actually a limiting factor, then you could get away
with a much smaller or even no journal at all.

You might just as well use plain UFS+Softupdates.  Softupdates to
provide the meta-data ordering feature, so that if you do crash and need
to fsck the filesystem, there's not going to be any really nasty stuff
to fix.  Plain UFS because a filesystem of that size will take about as
long to fsck as it would to replay all the journalled but uncommitted
updates.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: UFS journal size

2011-09-21 Thread RW
On Wed, 21 Sep 2011 11:41:08 +0100
Matthew Seaman wrote:

 On 21/09/2011 10:48, Ross wrote:

  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?
 

 The 'twice physical RAM' advice is all about achieving maximum
 performance on large filesystems with lots of data writes: 

IIRC the original justification for 2*ram was as a crude
rule-of-thumb to avoid panics. I think the idea was that writing the
whole ram into one of the two journalling areas was an extreme case. 

 You might just as well use plain UFS+Softupdates.  Softupdates to
 provide the meta-data ordering feature, so that if you do crash and
 need to fsck the filesystem, there's not going to be any really nasty
 stuff to fix.  

And in 9.x UFS filesystems (even existing ones) will be able to use
journalled soft-updates. This should give a fast fsck without the
overheads of full data journalling or background fsck.

 Plain UFS because a filesystem of that size will take
 about as long to fsck as it would to replay all the journalled but
 uncommitted updates.

FWIW fsck doesn't replay the journal, it just does a quick check for
orphaned files and marks the filesystem as clean - uncommitted updates
are left for gjournal.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: UFS journal size

2011-09-21 Thread Ivan Voras
On 21/09/2011 11:48, 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?

You are probably missing that gjournal does full data journaling, not
just metadata as is more common with other systems, so you need a
journal which can hold *at least* everything you can hold in RAM, and
then twice as much since one half may be replaying while other is being
filled up. Even this is an estimate since it's heavily load-dependant.

Or you can wait for 9.0 with metadata journaling.




signature.asc
Description: OpenPGP digital signature


Re: UFS journal size

2011-09-21 Thread Doug Poland
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
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org