9.0 install and journaling

Arto Pekkanen isoa at kapsi.fi
Sat Dec 10 15:02:26 UTC 2011

On 10.12.2011 15:44, Da Rock wrote:
> So how does soft-update journaling compare to gjournal? I'm using gjournal now
> and it runs a bit of a dog, but it is reliable (until another ufs filesystem
> turns up at boot) and necessary in my environment. Can I dump it for this new one?
> Its used on a laptop with heavy load on the disk, the power on the battery can
> run out too quick for batterymon to shut it down- plus kids that play silly
> monkeys with daddy's laptop... :)
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"

I am not an expert, but this is how I currently understand this:

Geom-journal is a block level journaling mechanism. It means that all data 
written on a journaled provider will be first written to the providers journal 
and then later commited to the provider. Thus data is written twice to provide 
more redundancy.

Soft-updates by itself has nothing to do with any journaling. It simply makes 
synchronous writes faster. When a filesystem is mounted synchronously, each 
write to a file first updates the metadata of the file, such a file size, and 
after that writes the actual data into the disk. When doing operations on 
thousands of small files, the overhead from synchronous writing is considerable. 
Bring forth soft-updates, which caches the metadata (file size etc.) updates 
into ram, and commits these updates into disk later when a delay and some 
conditions trigger; actual data is written into disk as soon as possible. Thus 
append/random access operations on gazillion of files are a lot faster.

 From this I would conclude that soft-updates journaling tries to write the 
metadata updates into a filesystem spesific soft-update journal (the soft-update 
journal being a file maybe?) sooner than they are actually committed. I also 
suspect that soft-updates journaling has some clever way of detecting when it 
is, performance wise, okay to update the journal and/or commit updates.

In short:
- gjournal writes both data and metadata, providing more redundancy to the 
actual data AND filesystem integrity while slowing down write operations 
(although I do not have data how much it slows down disk i/o)
- journaled soft-updates writes metadata updates twice on the disk, providing 
redundancy to file system integrity, but does not prevent actual data loss.

I do not even use FreeBSD 9.0 myself, my information is totally third party, 
second hand, wise-cracks and guessing.

Any expert consultation would be appreciated.

Arto Pekkanen
ksym at IRCnet

More information about the freebsd-questions mailing list