Last updated May 14, 2009 06:12, by Igor Minar
= Benchmarks =
Even though focus on performance and scalability is behind the over architecture of grizzly-sendfile, not much attention was paid to profiling and fine-grained optimization. Having said that, the benchmarks show that for small files grizzly-sendfile performs comparably to grizzly (GlassFish), and for larger files (1MB+) grizzly-sendfile outperforms grizzly without breaking a sweat. Comparing grizzly-sendfile to any way of sending files via JavaEE servlets doesn't even make sense.
As grizzly-sendfile evolves and missing features are added, more focus will be put into tuning the code to achieve even better performance and scalability.
Just for informational value, here are some results of benchmarking a 1MB download with concurrency 10 and thread-count 50 using [http://faban.sunsource.net/ faban] :
{| border="1"
! glassfish v2ur2 + grizzly-sendfile 0.2
| <pre>ops/sec: 22.222
% errors: 0.0
avg. time: 0.447
max time: 10.128
90th %: 0.570</pre>
|-
! glassfish v2ur2
| <pre>ops/sec: 8.789
% errors: 0.0
avg. time: 1.129
max time: 6.214
90th %: 1.365</pre>
|-
! glassfish v3prelude
| <pre>ops/sec: 18.017
% errors: 0.0
avg. time: 0.551
max time: 5.563
90th %: 0.745</pre>
|}
A thorough comparison of performance and scalability characteristics of different [[Algorithms]] can be found blog post: [http://blog.igorminar.com/2009/05/grizzly-sendfile-and-comparison-of.html grizzly-sendfile and Comparison of Blocking and NonBlocking IO]





