[Haskell-cafe] code review? store server, 220loc.

Tim Newsham newsham at lava.net
Sun Aug 3 15:09:30 EDT 2008


> What kind of performance do you actually need? Can your network
> connection actually sustain the bandwidth of your synthetic benchmarks?

This is just an exercise at the moment, so no particular performance
goal beyond "how fast can it go".

> (tested using apache-bench, loopback interface, amd64 @ 2.2GHz)
> With cached content 450k:
> with 1 concurrent client:
>        760 requests per second
>        ~1ms latency
>        34Mb/s
[...]
> Obviously this is testing with a loopback network. My point is, it's
> serving at a rather higher rate than most real network connections I
> could buy (except local ethernet networks).

My requests and responses are fairly small, a typical request is 29bytes
and a typical response is 58bytes.  If you just count these payloads
its about 390kB/sec for 4.5kreq/sec and 1.2MB/sec for 13.5kreq/sec
(of course its more like double these as the TCP overhead will be
about the same size).  Anyway, with such small sizes, the performance
shouldn't be limited by the bandwidth (I dont think).  If this was
a back-end storage server, the network probably wouldn't be the
limiting factor.

> Duncan

Tim Newsham
http://www.thenewsh.com/~newsham/


More information about the Haskell-Cafe mailing list