[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: processing writes requests in data=journal,sync mode



On Apr 23, 2004  09:27 -0700, Boris Erl wrote:
> We are currently doing SpecSFS comparison benchmarking to evaluate
> advantages of FS journaling to NVRAM card versus journaling to hard disks.
> We compare NFS performance for Linux file server with ext3 file system in
> ?data=journal? mode for three different locations of the file system
> journal:
>    - inside main file system
>    - on a dedicated HD
>    - on an NVRAM PCI card
> The file system is mounted and exported in ?sync? mode.
> 
> We assume that ext3 file system works in the following way:
>   - synchronously writes data to file system journal
>   - acknowledges to the client that NFS operation is completed
>   - at some time asynchronously writes data to the main file system
> 
> Could somebody confirm or correct our assumption above?

This is almost correct.  For ext3 with sync writers, the data is written to
the journal asynchronously and before the journal is synced the writing
thread reschedules so that any other running threads can also do asynchronous
writes to the journal.  When no more running threads want to write to the
journal then it is finally synced.  Of course, none of the threads doing
sync writes return until after the journal has been synced.

Doing it this way can batch multiple sync writes to the journal instead of
each writer starting and syncing a transaction, and improves performance
if there are multiple writers (usually the case for busy NFS servers).

I believe previous testing found very little difference between NVRAM and
dedicated HD journals, because the IO to the journal is basically linear
writes (no reads or seeks) unless the journal is being recovered.  Having
a larger journal (mke2fs -J size=400) can make a noticable difference if
there are lots of clients writing becuase if the journal gets too full you
have to wait for it to flush before resuming transactions.

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]