Re: Performance Adjustments: Silly Frames and poll() timeout
"William J. Mills" <[email protected]> Wed, 7 Apr 2004 14:39:15 -0700
| Newsgroups | gmane.network.beep.beepcore.c.general |
|---|---|
| Message-ID | <[email protected]> |
Mark Richardson wrote most of that. I suspect the optimization you are doing is optimising for a single connection. I am wondering what the behavior on the "server" side will be when it accepts more than 1 connection. I think, if I remember correctly, Mark was somewhat concerned with portability and so made some least common denominator trype choices in the poll code. I can well believe that tuning may be needed. I think the timeouts as set are pessimistic, and probably should be set based on the actual number of session rather than the max. -bill On Wed, Apr 07, 2004 at 05:30:18PM -0400, David C Niemi wrote: > On Tue, 6 Apr 2004, Lei Zhang wrote: > > So you have 768 /3 = 256 sessions in a single process? Can you make > > your application host smaller number of sessions? I played a little > > with the timeout value of poll() a little a while ago, my purpose then > > was to see if that helps reduce the CPU usage of my beepcore-c based > > application - and noticed the problem you described in this thread. > > I have done some more real testing, and find that subtle changes in the > vicinity of this poll() call have a rather large impact on performance > (latency in particular). It looks like for my current setup about a 10 > msec timeout to poll() is optimal; reducing it further does not help and > seems to slightly increase CPU consumption. But going up to even 20 msec > makes things noticeably slower. > > Who wrote this code? It is obviously rather intricate and in many ways > hard to improve upon, but it seems to me some sort of change may be called > for (if nothing else, to always set the timeout to 1/HZ). > > ------------------------------------------------------- > -- David C. Niemi Adeptech Systems, Inc. -- > -- Reston, Virginia, USA http://www.adeptech.com/ -- > ------------------------------------------------------- > ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click