[erlang-questions] Improve performance of IO bounded server written in Erlang via having pollset for each scheduler and bind port to scheduler together with process

Wei Cao cyg.cao@REDACTED
Thu Jul 12 10:45:14 CEST 2012


Hi,

2012/7/12 Zabrane Mickael <zabrane3@REDACTED>:
> Hi Wei,
>
> We already surpassed the 100krps on an 8-cores machine with our HTTP server
> (~150K rps).

Which erlang version did you use to get ~150k rps on 8-cores machine,
patched or unpatched? if it was measured on a unpatched erlang
version, would you mind measuring it on the patched version and let me
know the result?

>
> My question was: could we reach the 100K rps on a 4-cores machine with
> ehttpd ?
> That will be awesome.
>

Today I found a lock bottleneck through SystemTap, trace-cmd and lcnt,
after fixing it, ehttpd on my 16-cores can reach 325k rps.

RX packets: 326117 TX packets: 326122
RX packets: 326845 TX packets: 326859
RX packets: 327983 TX packets: 327996
RX packets: 326651 TX packets: 326624

This is the upper limit of our Gigabit network card, I run ab on three
standalone machines to make enough pressure, I posted the fix to
github, have a try ~


> Regards,
> Zabrane
>
> On Jul 12, 2012, at 3:48 AM, Wei Cao wrote:
>
> we can reach 135 rps on a 16 core machine, it's quite reasonable to
> have 70k rps on a 8 core machine.
>
> lscpu
>
> Architecture:          x86_64
> CPU op-mode(s):        32-bit, 64-bit
> Byte Order:            Little Endian
> CPU(s):                16
> On-line CPU(s) list:   0-15
> Thread(s) per core:    2
> Core(s) per socket:    4
> CPU socket(s):         2
> NUMA node(s):          2
> Vendor ID:             GenuineIntel
> CPU family:            6
> Model:                 44
> Stepping:              2
> CPU MHz:               2134.000
> BogoMIPS:              4266.58
> Virtualization:        VT-x
> L1d cache:             32K
> L1i cache:             32K
> L2 cache:              256K
> L3 cache:              12288K
> NUMA node0 CPU(s):     0-3,8-11
> NUMA node1 CPU(s):     4-7,12-15
>
>
>
> 2012/7/12 Zabrane Mickael <zabrane3@REDACTED>:
>
> Hi Wei,
>
>
> On Jul 11, 2012, at 2:35 PM, Wei Cao wrote:
>
>
> sure, the steps is correct
>
>
>
> I re-installed everything from scratch with your second patch and tested
>
> your ehttpd web server example.
>
>
> before: ~55K rps
>
> after: ~70K rps
>
>
> but was unable to reach the 100K rps.
>
>
> Anyone courageous enough to help us reach the 100K rps?
>
>
> Regards,
>
> Zabrane
>
>
>
>
>
> --
>
> Best,
>
> Wei Cao
>
>
>
>



-- 

Best,

Wei Cao



More information about the erlang-questions mailing list