Normal to get 3000 RPM in Game Server?

44 views
Skip to first unread message

John Chow

unread,
Feb 1, 2012, 3:05:07 PM2/1/12
to eventm...@googlegroups.com
Hey Everyone,

I'm using EM (1.0.0.beta.4) as our back-end for a realtime game and chat server. I've read a couple of previous posts (notably [Eventmachine-talk] Checking performance of your EventMachine server?? and How scalable is the EM chat server example?). There are a lot of performance numbers being out there, so I'm unsure whether our performance is normal or whether we're doing something wrong. Here are my constraints and benchmarks:
  • We have approximately 100 game "rooms", each capped at 6 users each, and our EM app simply broadcasts the message from one client to the other clients
  • We make a lot of other remote calls, mainly to authenticate user with our Rails app and update our memcached
  • We also send/receive "keepAlive" messages roughly every 5 seconds to each connected client
  • Our data payloads are JSONs, and the EM spends somewhere ~5ms processing the message (on local Mac machine). Note, this is the time spent in Ruby for that tick, so it doesn't include the time waiting for remote calls.
  • Looking through our code base, we leveraged all possible EM libraries
  • We do very little logging on production (maybe 5-10lines a sec)
  • Like Steve H mentioned in "Checking performance...", my server processes approximately 3000 requests per minute (on an EC2 Medium instance). Anything more than 3000 RPM, our response times starts dropping significantly (I use an EM bot on a separate EC2 instance to connect and send real messages and log the response time).
I know this is a lot of information and maybe I'm asking a bit too much, but I don't know any other EM developers, and I was wondering if my results are consistent with anything you guys may have out in the wild.

Thanks for your time everyone.

John Chow

James Tucker

unread,
Feb 10, 2012, 2:05:37 AM2/10/12
to eventm...@googlegroups.com
That sounds pretty reasonable.

--
You received this message because you are subscribed to the Google Groups "EventMachine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/eventmachine/-/7wiycGD0-QgJ.
To post to this group, send email to eventm...@googlegroups.com.
To unsubscribe from this group, send email to eventmachine...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/eventmachine?hl=en.

James Tucker

unread,
Feb 10, 2012, 2:07:20 AM2/10/12
to eventm...@googlegroups.com
Oh, sorry, RPM, not RPS.

You should be able to drive things faster than that, but I can't really tell from your description where the bottlenecks might be. It really depends how much ruby is executing.

On Feb 1, 2012, at 12:05 PM, John Chow wrote:

John Chow

unread,
Feb 11, 2012, 3:07:07 PM2/11/12
to eventm...@googlegroups.com
I know there are some Ruby bottlenecks (i.e. profanity filtering on chat messages), but not a lot of chat messages are sent. We also use Zlib compression on sending/receiving data payload, and we also use the bindata gem (http://bindata.rubyforge.org/) to mark our payload length (not sure if this is the most effective way to do things).

While our effective RPM is 3000 (or 50 RPS), for every request we're broadcasting the same message to others in the room, so it's effectively sending/receiving 250-300 messages per second.
Reply all
Reply to author
Forward
0 new messages