dev@grizzly.java.net

Grizzly Strategies

From: Niall Gallagher <gallagher_niall_at_yahoo.com>
Date: Sat, 31 Jan 2009 12:02:48 -0800 (PST)

Hi,

First of all, great project. I have been watching with interest for a long time now. I have always downloaded the latest, and with 1.9.x I have found Grizzly in a very stable state. However, I am a little ignorant to the strategies Grizzly uses under load. I know they exist, including changing from persistent connections to connection close under load. Given this I have a question. I myself write an open source NIO server, and have paid particular attention to performance. With 1.9.x I have been able to sustain a large test on Grizzly comparing it to Simple (http://www.simpleframework.org/).

In my performance tests I am particularly interested in latency. I have found Grizzly has really great performance during the initial stages of the test. However, although there is very little latency deviation during the test and throughput is maintained it seems to slow up a bit after about 10,000 requests. I would assume due to strategy change??

For example, here are two runs I have made. Grizzly shows exceptional performance up to about 10,000, but looses out badly to Simple in a sustained test of 1,000,000. It comes out 50% or so slower. Perhaps it peaks early. Before I publish this I want to ensure the tests are fair? Is there something I need to do to tune the performance? Here is what I see.

Throughput:
http://www.simpleframework.org/performance/grizzly/run1/ScalabilityApacheBench.png
http://www.simpleframework.org/performance/grizzly/run2/ScalabilityApacheBench.png

Latency:
http://www.simpleframework.org/performance/grizzly/run1/LatencyApacheBench.png
http://www.simpleframework.org/performance/grizzly/run2/LatencyApacheBench.png

Criteria:
http://www.simpleframework.org/performance/grizzly/README

Do I need to tune the server somehow?

Thanks,
Niall