I am on vacation right now. But I think what happens is that the worker
threads inherit the priority setting from the UDP listener thread. You
probably need to change thread creation in ./runtime/wtp.c.

HTH
Rainer

> -----Original Message-----
> From: [email protected] [mailto:rsyslog-
> [email protected]] On Behalf Of Dražen Kacar
> Sent: Tuesday, December 28, 2010 3:57 PM
> To: rsyslog-users
> Subject: Re: [rsyslog] Losing UDP packages
> 
> Dražen Kačar wrote:
> 
> > There is a serious flaw there. The pthread_setschedparam() function
> is
> > being called by the main thread before other threads are created, so
> all
> > threads will inherit the scheduling parameters, which we don't want.
> That
> > call has to be moved from willRun() function to the rcvMainLoop()
> which is
> > being executed by a new thread so it will afect the UDP thread only.
> You
> > can check this with:
> >
> >    ps -eLo "cmd lwp policy rtprio"
> >
> > I'm attaching a patch which does that, against rsyslog 5.6.2. (After
> > applying you need to call autoreconf). It also has improved
> validation.
> > Note that the allowed scheduling priority range is OS specific, so
> the
> > code shouldn't expect that it will be non-negative.
> 
> I've put the patch to test on the server under load and there were
> several
> threads with FIFO scheduling policy. One of them was receiving packets
> from the UDP socket. Another was locking and unlocking mutex (or
> mutexes)
> and strace didn't show anything else. Yet another thread was writing to
> the log file. There was one or two more, but I didn't bother to check
> what
> they were doing.
> 
> This is not good. It seems like the UDP receiver thread is spawning
> other threads and then they inherit scheduling policy. That should be
> prevented somehow.
> 
> --
>  .-.   .-.    Yes, I am an agent of Satan, but my duties are largely
> (_  \ /  _)   ceremonial.
>      |
>      |        [email protected]
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com

Reply via email to