directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Karasulu <aok...@bellsouth.net>
Subject Re: [mina] Performance issues
Date Thu, 24 Mar 2005 15:44:01 GMT
Berin Loritsch wrote:

> Vinod Panicker wrote:
>
>>
<snip/>

>> 3.  Client/Server CPU usage.  The number of connections per second
>> steadily keeps decreasing as the total connections increase.  Client &
>> Server both are at 100% CPU.  That is what is weird.  I'm aiming to
>> isolate the problem.  I'm currently a bit doubtful about the way the
>> Connector works, but wont be able to point out anything concrete until
>> more permutations & combinations are tried.
>
>
> A couple of thoughts here.  First it is normal for the number of 
> connections per second to decrease as the total connections increase. 
> The key here is how quickly it decreases.  Ideally we would have a 
> smooth taper off of connections per second instead of an abrupt drop. 
> That means the system scales well.  Secondly, the 100% CPU cycles can 
> be a symptom of how you are running your loops.  I have found that 
> calling Thread.yeild() will sometimes allow another thread to run, and 
> sometimes not--on the same system.  No matter what, the processor is 
> still pegged.  The next question to ask is how often do we need to 
> poll, really?  I find that even the process of forcing the loop to 
> sleep 1 millisecond between iterations will greatly reduce the load on 
> the processor.  In the life of connection times the loss of a 
> millisecond is nothing, the the reduction in stress on the CPU is 
> tremendous.  It helps the CPU stay busy with real work.  Same thing 
> with game loops.  If you draw a new screen each iteration you might 
> have 200+ FPS but your processor will be busy doing work that you will 
> never truly appreciate.

Hmm it might help to get an idea of how much effort the CPU is expending 
while context switching verses actually executing code in a thread (work 
being done).   You've made some good points Berin on giving the CPU some 
rest while looping.  It would be nice to have some raw statistics to 
graph the decay with greater concurrency and show these stats on the 
MINA pages.  If someone provides raw data I can gnuplot it and make it 
pretty.

It took me a while too but I've become comfortable taking a back seat to 
Trustin.  His work here is first class.  It was a no brainer tossing apseda.

Alex




Mime
View raw message