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?