[Haskell-cafe] warp vs scotty + some benchmark numbers

Gregory Collins greg at gregorycollins.net
Sun Apr 13 09:38:40 UTC 2014


On Sat, Apr 12, 2014 at 11:22 PM, Miro Karpis <miroslav.karpis at gmail.com>wrote:

> Hi,
> I'm trying to make a small benchmarking for warp and scotty (later with
> json/no-json text performance test). My client is a Qt c++ application. I
> made a minimum code in both Haskell and C++. The problem is the numbers I'm
> getting.
>

If you're not running your Haskell program with "+RTS -A4M" (or for a newer
chip even larger, the "4M" should correspond to the size of your L3 cache),
please do so. The default of 512k is really too small for most processors
in use and will force the runtime into garbage collection before the L3
cache is even consumed. In my benchmarks this flag alone can give you a
remarkable improvement.

Also, a more fundamental issue: those other tests you mentioned are
measuring something different than you are. Those tests use a large number
of simultaneous client connections to simulate a busy server, i.e.
measuring throughput. Your test makes 10,000 connections serially: you're
measuring the server's latency.

G
-- 
Gregory Collins <greg at gregorycollins.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140413/484ef3a4/attachment.html>


More information about the Haskell-Cafe mailing list