I’m not sure if this is a performance issue with select per say, or if
it’s more a question of what’s the best strategy for what we are
doing. This is with jruby-1.6.7.
For each request our rails app handles, we make 3-4 outgoing http
calls (these go to an api server that sits on top of our mongodb
clusters). The cpu time (according to visualvm cpu sampling) spent in
SelectBlob.doSelect eventually grows to just under 50%, at which point
we are doing around 2000 http calls per second.
I’m assuming the increased cpu time is because there is one selector
per socket, and doSelect gets called once for every http call?
My inclination at this point is to put in an eventmachine based http
client, so we just have one poller for all file descriptors. But I
wanted to make sure there isn’t something I am missing here before I
do that.
Chris