> -----Original Message-----
> From: Rainer Gerhards
> Sent: Tuesday, June 08, 2010 7:52 AM
> To: '[email protected]'
> Subject: RE: [rsyslog] discussion request: performance enhancement for
> imtcp
>
>
>
> > -----Original Message-----
> > From: [email protected] [mailto:[email protected]]
> > Sent: Tuesday, June 08, 2010 7:50 AM
> > To: Rainer Gerhards
> > Subject: RE: [rsyslog] discussion request: performance enhancement
> for
> > imtcp
> >
> > On Tue, 8 Jun 2010, Rainer Gerhards wrote:
> >
> > >> -----Original Message-----
> > >> From: [email protected] [mailto:[email protected]]
> > >> Sent: Tuesday, June 08, 2010 7:45 AM
> > >>
> > >> On Tue, 8 Jun 2010, Rainer Gerhards wrote:
> > >>
> > >>> Just some thing I'd like to verify: as of my understanding, once
> a
> > >> write()
> > >>> request has been issued, the OS will make sure that this write is
> > >> handled in
> > >>> an atomic manner, even though another thread may be issuing
> another
> > >> write for
> > >>> the same fd in parallel and thread one's timeslice is exhausted.
> I
> > am
> > >> pretty
> > >>> sure this is the case, but as it becomes fundamental, I'd like to
> > get
> > >> some
> > >>> confirmation from others.
> > >>
> > >> I don't believe that that is the case, write() isn't even
> guaranteed
> > to
> > >> write out all the data that is is passed, it's return is the
> number
> > of
> > >> bytes written and the programmer needs to check and see what is
> > >> written.
> > >
> > >
> > > Good reminder, and rsyslog actually has this loop. So that means
> that
> > the
> > > write call itself must be guarded by a mutex, else we may get
> > incomplete
> > > lines into the file... :(
> >
> > from a experimental point of view, I think you didn't have this mutex
> > in
> > some of the v5 series and I was seeing horrible overlaps between
> > different
> > messages. The more recent versions have not has the problem to the
> same
> > extent.
>
> That was caused by an invalid default for the lazy writer. Remember
> that the current interface always guarantees that an action is called
> only once, so each action call is guarded by a mutex. This is part of
> the interface description. So what I am talking about can not happen
> with the current interface, it handles that. I am just thinking on how
> to permit concurrency at the output module level as well (something
> thought about a long time, but not yet implemented).
>
> Rainer
> >
> > David Lang
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com