I believe 50M messages per second on a single machine was mainly an example for scaling up. See the kind of machine that was used for it <http://letitcrash.com/post/20397701710/50-million-messages-per-second-on-a-single> .
Anyway, have you tried doing the same analysis on the "legacy" driver? It would be interesting to compare the parts related to actual IO. There's one thing (which may not be helpful to your current questions about Akka performance) that bothers me, but I may just be missing out on something obvious here, so I'll just ask: if Mongo doesn't allow a connection to handle more than one simultaneous request, how can any NBIO implementation do much better than a BIO implementation? I mean the test pretty much only does IO. It's not like we're using the extra free thread to do any other CPU intensive work while waiting on Mongo, right? Doesn't it mean you have to hold some sort of connection pool so you can have more concurrent requests to Mongo in order to see any sort of benefit from using NBIO (Akka or not)? When I use Akka IO in my application I often have lots of concurrent requests using the same socket. They are of course kept serialized by Akka, but I can still have many requests on the same connection. On Monday, February 23, 2015 at 10:57:41 PM UTC+2, Reid Spencer wrote: > > So, here's some more information from my testing which just further > confuses me because I’m left without a course of action to solve the > performance issue. I instrumented the TcpConnection actor via > DiagnosticActorLogging to record System.nanoTime on each log message using > MDC and then added some logging statements into the TcpConnection, mostly > to record doRead and doWrite entry and exit. I wanted to see if the problem > was in the actual I/O or the TcpConnection. The results are a little odd. > > > appWait > doRequest > writeWait > doWrite > writeAck > mongoWait > doRead > readWait > doReply > *count* > 10,000 > 10,000 > 10,000 > 10,000 > 10,000 > 10,000 > 10,000 > 10,000 > 10,000 > *sum* > 2,641,699.00 > 0.00 > 362,172.00 > 0.00 > 764,298.00 > 2,836,716.00 > 0.00 > 413,031.00 > 0.00 > *mean* > 264.17 > 0.00 > 36.22 > 0.00 > 76.43 > 283.67 > 0.00 > 41.30 > 0.00 > *median* > 217.00 > 0.00 > 29.00 > 0.00 > 55.00 > 167.00 > 0.00 > 33.00 > 0.00 > *std.dev* > 323.37 > 0.00 > 27.95 > 0.00 > 172.19 > 1,162.76 > 0.00 > 25.92 > 0.00 > *min* > 139 > 0 > 3 > 0 > 2 > 125 > 0 > 15 > 0 > *max* > 17,719 > 0 > 892 > 0 > 14,616 > 22,565 > 0 > 1,389 > 0 > > The above data was computed by processing the log file that has repeating > entries like this: > > 18:25:17.364UTC 917364997 DEBUG > [RxMongo-akka.actor.default-dispatcher-10:rxmongo.driver.AkkaIOChannel:akka://RxMongo/user/RxMongo-Supervisor-1/Connection-2/ChannelRouter-3/$a] > > -> doRequest > 18:25:17.365UTC 917364997 DEBUG > [RxMongo-akka.actor.default-dispatcher-10:rxmongo.driver.AkkaIOChannel:akka://RxMongo/user/RxMongo-Supervisor-1/Connection-2/ChannelRouter-3/$a] > > <- doRequest > 18:25:17.365UTC 917365026 DEBUG > [RxMongo-akka.actor.default-dispatcher-10:akka.io.TcpOutgoingConnection:akka://RxMongo/system/IO-TCP/selectors/$a/0] > > Entering doWrite > 18:25:17.365UTC 917365026 DEBUG > [RxMongo-akka.actor.default-dispatcher-10:akka.io.TcpOutgoingConnection:akka://RxMongo/system/IO-TCP/selectors/$a/0] > > Leaving doWrite > 18:25:17.365UTC 917365077 DEBUG > [RxMongo-akka.actor.default-dispatcher-10:rxmongo.driver.AkkaIOChannel:akka://RxMongo/user/RxMongo-Supervisor-1/Connection-2/ChannelRouter-3/$a] > > Ack with queuelen=0 > 18:25:17.365UTC 917365173 DEBUG > [RxMongo-akka.actor.default-dispatcher-3:akka.io.TcpOutgoingConnection:akka://RxMongo/system/IO-TCP/selectors/$a/0] > > Entering doRead > 18:25:17.365UTC 917365173 DEBUG > [RxMongo-akka.actor.default-dispatcher-3:akka.io.TcpOutgoingConnection:akka://RxMongo/system/IO-TCP/selectors/$a/0] > > Leaving doRead > 18:25:17.365UTC 917365202 DEBUG > [RxMongo-akka.actor.default-dispatcher-3:rxmongo.driver.AkkaIOChannel:akka://RxMongo/user/RxMongo-Supervisor-1/Connection-2/ChannelRouter-3/$a] > > -> doReply > 18:25:17.365UTC 917365202 DEBUG > [RxMongo-akka.actor.default-dispatcher-3:rxmongo.driver.AkkaIOChannel:akka://RxMongo/user/RxMongo-Supervisor-1/Connection-2/ChannelRouter-3/$a] > > <- doReply > ... -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.