fsync() takes about 0.06 second ---makes Cyrus deliver slow
David Lang
david.lang at digitalinsight.com
Tue Sep 10 13:05:19 EDT 2002
ext3 has the option of journaling data and metadata, metadata with
unbuffered data, or metadata with writeback cached data.
it's woth checking all three options, there are several cases reported
where journaling data ends up being a win (since the journal is a
sequential block of data writing to it is fast allowing your program to
continue knowing it's on disk, then the OS puts it in the proper place
later without delayig your code)
also if you have journaling data turned on you may not need to have the
program fsync to have your data safe.
also check what size a journal you have ext3 configured to use, if your
disk is very busy (especially if you have data=journal) you can run out of
space in a default sized journal which will slow down all writes as the
system has to commit the existing journal before it can write more stuff
to it.
David Lang
On Tue, 10 Sep 2002, Daniel Nilsson wrote:
> Date: Tue, 10 Sep 2002 11:12:36 -0400
> From: Daniel Nilsson <dnilsson at sisoft.com>
> To: Su Li <sli at rim.net>
> Cc: info-cyrus at lists.andrew.cmu.edu
> Subject: Re: fsync() takes about 0.06 second ---makes Cyrus deliver slow
>
> Su Li wrote:
> > Daniel,
> >
> > My Linux is red hat 7.2-1 with kernel 2.4.7-10. The file system is ext3.
> > Hard disk it RAID5.
> >
> > -----
> > Besides, I did some calculation on the time of the system calls on a
> > new-email. 3 fcync takes about 0.15 seconds. Each mail overall takes 0.65
> > seconds. I see the number of locks and deliver process can go up to
> > thousands. Maybe some thing else is also taking big time, say the
> > communication between deliver and lmtpd?
> >
> > Anyway, I'll keep trying. Thanks for every body's help. If anybody got some
> > idea, please let me know.
>
> Su,
>
> The interesting thing here is that you are using ext3. I haven't tried
> ext3 myself but from what I understand using ext3 you get journaling of
> both data and metadata where for example reiserfs only journals
> metadata. This obviously has advantages if you are worried about crashes
> and such, but at the cost of performance.
>
> I would try using a different filesystem, you can try both ext2 and
> reiserfs to see what the performance impacts are and then make a
> tradeoff on which one to use. Do you fell like you need a journaling
> filesystem for this task ?
>
> --
> Daniel Nilsson
> Senior Consultant
> Signal Integrity Software Inc.
> 6 Clock Tower Place, Suite 250
> Maynard, MA 01754
> Phone: (978) 461-0449, ext 12
> Cell: (508) 783-1379
> http://www.sisoft.com
>
More information about the Info-cyrus
mailing list