Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Nov 2009 16:59:06 +0100
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        Ivan Voras <ivoras@freebsd.org>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: gjournal and calculation of the size of journal provider
Message-ID:  <4AFADF4A.80404@quip.cz>
In-Reply-To: <hdbf04$21k$1@ger.gmane.org>
References:  <4AF84245.7070108@quip.cz> <hdbf04$21k$1@ger.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Ivan Voras wrote:
> Miroslav Lachman wrote:
>> What is the right rule for journal size calculation?
>> There are two sources stating different things.
>>
>> 1] journal size depends on disk write speed
>> http://lists.freebsd.org/pipermail/freebsd-fs/2006-June/002016.html
>>
>> "For example your disk can write
>> at 60MB/s. Journal switch time is 10 seconds. The journal provider has
>> to have place to keep two journals (active and inactive). So bascially
>> you need 60*10*2MB + gjournal headers."
>>
>>
>> 2] journal size depends on RAM size
>> http://www.freebsd.org/doc/en/articles/gjournal-desktop/article.html#UNDERSTANDING-JOURNALING
>>
>>
>> "Your RAM size should fit in 30% of the journal provider's space. For
>> example, if your system has 1 GB RAM, create an approximately 3.3 GB
>> journal provider. (Multiply your RAM size with 3.3 to obtain the size
>> of the journal)."
>>
>>
>> What's the right size for journal on 143GB 15k rpm SAS disks on
>> machine with 16GB of RAM? Based on second case, it will be more than
>> 50 GB - one third of the size of disk. This is insane vasting.
>
> It really does depend on the speed of drives but it could be
> approximated by saying there will not be more data to write than the
> size of memory (which is probably wrong since you can write from
> /dev/zero indefinitely). The first advice is sufficient, but you should
> probably extend the result by 20% to be safer.


So is it safe to use 4GB on PERC6 array, which is capable of 150MB/s 
write speed by dd test?
dd if=/dev/zero of=/dev/mfid0s2e bs=1m count=10000

(150 * 10 * 2 * 1.2) = 3600

150 is write speed in MB/s
10 is journal switch time
2 is active + inactive journal
1.2 is +20% to base safer

And next question about journal. I saw following message in log after 
reboot:

GEOM_JOURNAL: Journal 1933335573: mfid0s2d contains journal.
GEOM_JOURNAL: Journal 1933335573: mfid0s2e contains data.
GEOM_JOURNAL: Journal mfid0s2e clean.
GEOM_JOURNAL: BIO_FLUSH not supported by mfid0s2d.
GEOM_JOURNAL: BIO_FLUSH not supported by mfid0s2e.

"BIO_FLUSH not supported" - is it OK to use gjournal on top of the Dell 
PERC (LSI MegaRAID) with battery backup unit? I think so, but rather ask 
somebody... :)

Miroslav Lachman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AFADF4A.80404>