View Full Version : Softupdates vs gjournal
nickolas
January 27th, 2009, 14:14
Hello!
I'm going to make some changes in my system, that's why i wanna know differences between softupdates and gjournal.
I know, that fsck run quicker on gjournal-ed filesystem, rather then on filesystem with softupdates.
But what about stability and performance?
When it's better to use softupdates and when gjournal.
DutchDaemon
January 27th, 2009, 14:21
For starters:
http://archives.postgresql.org/pgsql-performance/2008-09/msg00214.php
http://lists.freebsd.org/pipermail/freebsd-questions/2008-April/173367.html + http://lists.freebsd.org/pipermail/freebsd-questions/2008-April/173578.html
http://unix.derkeiler.com/Mailing-Lists/FreeBSD/stable/2006-09/msg00290.html
trasz@
January 27th, 2009, 15:01
One note about the gjournal - the journal size should be several times bigger than the machine RAM; otherwise it might panic under heavy filesystem load due to journal overflow.
As for fsck - with gjournal, it just doesn't get run after unclean shutdown.
danger@
January 27th, 2009, 16:37
As for fsck - with gjournal, it just doesn't get run after unclean shutdown.
which actually saves a lot of time on huge file systems :stud
zuborg
January 27th, 2009, 17:46
I've system with gjournal-ed partitions, like
/dev/da0s2d.journal
It reboots from time to time (mostly due gjournal overflows under high write load, heh) but fsck still run on such partitions ;(
danger@
January 27th, 2009, 17:59
IIRC, you need to disable it in /etc/fstab...
trasz@
January 28th, 2009, 16:09
Yes, gjournal can save _huge_ amounts of time. As for fsck - no, it doesn't have to be disabled. For example, the line in my fstab looks like this:
/dev/ad0s1a.journal / ufs rw,async,noatime 1 1
Zuborg, are you sure you have UFS configured to actually _use_ gjournal, and not just placed on top of it? If it's configured properly, you should see the following in the mount output:
/dev/ad0s1a.journal on / (ufs, asynchronous, local, noatime, gjournal)
Notice the 'gjournal' mount flag there.
lumiwa
January 28th, 2009, 22:52
Hello!
I'm going to make some changes in my system, that's why i wanna know differences between softupdates and gjournal.
I know, that fsck run quicker on gjournal-ed filesystem, rather then on filesystem with softupdates.
But what about stability and performance?
When it's better to use softupdates and when gjournal.
I ahve a desktop computer and I try gjournal on frsh installed FreeBSD 7.1 (/usr and /var) and was slower than softupdates. I decided to go back to softupdate. I have 2GB RAM.
trasz@
January 28th, 2009, 23:10
It is quite possible that gjournal will be slower than softupdates, for the simple reason it basically writes everything to the disk twice - the first time into the journal ("intent log"), second time into the filesystem ("commit"). However, it comes down to one question - is the disk throughtput really the bottleneck for you? For me, it's not. I'd rather have a guarantee of not having to run fsck at boot, even in background.
nickolas
January 29th, 2009, 08:50
I ahve a desktop computer and I try gjournal on frsh installed FreeBSD 7.1 (/usr and /var) and was slower than softupdates. I decided to go back to softupdate. I have 2GB RAM.
How large are your /usr and /var filesystems?
And what about your hardware?
zuborg
January 29th, 2009, 13:07
Yes, gjournal can save _huge_ amounts of time. As for fsck - no, it doesn't have to be disabled. For example, the line in my fstab looks like this:
/dev/ad0s1a.journal / ufs rw,async,noatime 1 1
Zuborg, are you sure you have UFS configured to actually _use_ gjournal, and not just placed on top of it? If it's configured properly, you should see the following in the mount output:
/dev/ad0s1a.journal on / (ufs, asynchronous, local, noatime, gjournal)
Notice the 'gjournal' mount flag there.
Sure I'm, here is example:
/dev/da0s2d.journal on /home/B/bak/0 (ufs, asynchronous, local, gjournal)
As far as I know, geom_journal clears 'dirty' bit on every ufs partitions found on gjournal-led device, so it looks like the problem is geom_journal is not able to find some ufs-partitions.
lumiwa
January 30th, 2009, 00:24
How large are your /usr and /var filesystems?
And what about your hardware?
/usr was about 50GB and /var 7GB. I have 2G of RAM and I used 7G for each slice.
Hardware:
CPU: Intel(R) Pentium(R) 4 CPU 2.60GHz (2605.92-MHz 686-class CPU)
real memory = 2146631680 (2047 MB)
avail memory = 2090995712 (1994 MB)
ad0: 76319MB <WDC WD800JB-00FSA0 77.07W77> at ata0-master UDMA100
On the computer is just FreeBSD and I used it as a desktop computer.
hansivers
February 2nd, 2009, 19:12
If my memory is correct, Michael Lucas (Absolute FreeBSD 2th ed.) suggest to install gjournal on partitions over 20GB and keep soft-updates for smaller partitions.
However, on my own FS benchmarks on SATA disk, I see time increases about 20% for file creation, copy and removal, when using gjournal compared to soft-updates. I don't know if other FreeBSD users have replicated a performance penality of this magnitude.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.