I’ve been meaning to post these results for a while and with the Thanksgiving break here in the US, I have time to finally do it.
When I ran my my original comparison, both the tests and databases were running on the same host connecting over the loopback interface. Using the loopback interface is a good way to test but the performance characteristics of going over a real network are much different. So I ran the tests again connecting to a second host over a gigabit/second Ethernet network.
I’ve also updated my tests to use the latest versions of both MINA and Netty.
Not only did I run the tests again over a real network connection, but I also added results for using Postgresql as well as the results of using plain JDBC and using JDBC with a thread-pool. Each test executes 50 SELECT statements and each test was run 100 times. Very interesting results.
| Test | Mean |
|---|---|
| MySQL JDBC | 23.03ms |
| MySQL JDBC/Thread-pool | 69.89ms |
| MySQL ADBCJ/MINA | 7.74ms |
| MySQL ADBCJ/Netty | 4.84ms |
| Postgresql JDBC | 25.95ms |
| Postgresql JDBC/Thread-pool | 176.98ms |
| Postgresql ADBCJ/MINA | 6.9ms |
| Postgresql ADBCJ/Netty | 5.65ms |
An astute observer would question why JDBC is so much slower than both ADBCJ/MINA or ADBCJ/Netty. The answer to that question is the fact that ADBCJ supports pipelining which increases the performance of executing multiple queries significantly.
Netty continues to amaze and MINA is still really slow. It’s unfortunate to see the slow progress of MINA. While MINA 2.0 still hasn’t been released, Netty releases happen on a regular basis. It’s true that I’m on the MINA PMC and I could help get a 2.0 release out the door but I just don’t have the time. And honestly, why would I want to contribute to MINA when Netty is making faster progress and is frankly a better framework?
5 Responses
Tuure Laurinolli
November 26th, 2009 at 6:35 pm
1Your “original comparison” link URL lacks an ‘h’.
Mike Heath
November 27th, 2009 at 12:25 pm
2Thanks Tuure. I’ve fixed the link.
Tom Knight
September 12th, 2010 at 12:50 am
3Hi Mike,
I couldn’t find your email address, so I’m posting here! I’m fascinated by AJDBC: the performance improvements are amazing. I realise the code is in beta mode, but could you explain more to me about what is involved in the pipelining of the Postgres protocol, what work needs to be done to move AJDBC to it’s next milestone, and if there are any tips for using the standard Postgres driver in a pipelined way?
Thanks, Tom
Shawn Bigger
May 7th, 2011 at 11:21 pm
4Mike this is really interesting stuff, could you post the source code for your testing? I am in the process of writing a new application and I have been looking for just this combination of technologies. Would you be interested in doing some side work to help my little project along?
Mike Heath
July 8th, 2011 at 10:23 am
5I honestly don’t remember exactly which performance benchmark I used but I have written a variety of benchmarks that are available at https://github.com/mheath/adbcj/tree/master/perf. If you need any help getting ADBCJ up and running, please let me know.
RSS feed for comments on this post · TrackBack URI
Leave a reply
Categories
Archives
Links
Meta
Calendar
Recent Entries
Recent Comments
Most Commented
Totally Nerdy Information is proudly powered by WordPress - BloggingPro theme by: Design Disease