On Fri, Sep 20, 2013 at 9:01 PM, Justin Karneges <[email protected]> wrote:
> I'm trying to see how many connections I can write to in under 1 second. > Has anybody ever tried a benchmark like this? > > I've made a simple python handler that collects requests for a few seconds > and then responds to all of them at once. This is not a test of raw > hits/sec, but rather a test of delivery time to write to already open > requests. > > With an EC2 m1.xlarge, I can get about 7000 deliveries in under a second > in the best case. However, I'm not able to get this 100% of the time. Every > once in awhile I'll see a lag of one to several seconds on some requests, > probably due to dropped packets and TCP retransmissions. The lower the > number of connections, the lower the > You could probably prove this on the sending side: $ while $(sleep 5); do echo $(date) $(netstat -s |grep retransmited); done (notice the single 't' in 'retransmited') if the segments retransmitted count jumps around the same time as your lag spike, it's probably that. It could be something else- an overflowed buffer in zmq or the linux networking stack, or in one of the routers in between. > > This is my first time ever really benchmarking this sort of thing, and I'm > sure lot of factors play into how much throughput is possible. At least in > my environment, my feeling is that the limit is at the network level. In > other words, the ceilings I'm hitting here are likely not performance > issues with the OS, Mongrel2, or even the fact that I'm using python as the > handler language, since adding delays will improve performance. > Python is better than you might expect at threading that involves I/O. It's the computation-heavy stuff where things get goofy. > Anyway just thought I'd share. > :). You should post your handler and whatever you're using to drive traffic in the first place to a gist. -- ----------------------- | Henry Finucane | (510) 473-7148 -----------------------
