libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] 回复:Re: 回复:回复:Re: Help : Any HTTP Performance Bench


From: Evgeny Grin
Subject: Re: [libmicrohttpd] 回复:Re: 回复:回复:Re: Help : Any HTTP Performance Benchmark Comparison for Microhttpd with Go HTTP Servers
Date: Tue, 4 Jul 2023 15:04:13 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

Hi Forrest,

Strange the you have such low number of requests per second.
Try to assign number of threads properly: if you are using four threads for requests and you have 10 vCPU cores then use 6 threads for the server. Try to use all cores but not overuse them (the sum of threads on client and server should be equal to number of cores).

Why are you using 1000 connections?
It is not typical and does not improve the performance. Try with 100 connections or even with 10 connections (for 10 vCPU cores).

It is also interesting to measure the memory load for the server side.

The amount of transferred traffic for MHS is lower because the demo tool uses the minimal number of headers resulting is smaller response size.

Update your master branch and use the new tool from there for your next experiments.

--
Evgeny

On 04.07.2023 14:21, lingweicai wrote:
Hi Evgeny:


Thank you for your quick reply. It is very helpful. I built the master of microhttpd and run the benchmark comparing with hello.go (golang), on my laptop running on a vm with 10x CPU processors and 11GB Memory on Linux oe23 6.1.19-7.0.0.17.oe2303. The results of microhttp has a lot of improvement, please refer to below output. Now I am to rebuild microhttpd with gcc-13.1, to if it can improve more performance. Will advise you my results after my benchmark.


I do not understand, why with the same size of http response ( containing 3 bytes in body )  of Hello.go and microhttp, hello.go can achieve much bandwidth ( Transfer/sec).


THANK YOU!

Forrest


WRK Testing:

This is testing for microhttpd:

[root@oe23 tools]# wrk -t 4 -c 1000 -d 10s  http://127.0.0.1:8888/

Running 10s test @ http://127.0.0.1:8888/

   4 threads and 1000 connections

   Thread Stats   Avg      Stdev     Max   +/- Stdev

     Latency     4.23ms    1.79ms  55.21ms   96.13%

     Req/Sec    60.50k     4.31k   73.26k    86.87%

   2383966 requests in 10.04s, 93.21MB read

Requests/sec: 237419.41

Transfer/sec:      9.28MB


This is the testing for hello.go:

[root@oe23 tools]# wrk -t 4 -c 1000 -d 10s  http://127.0.0.1:10000/

Running 10s test @ http://127.0.0.1:10000/

   4 threads and 1000 connections

   Thread Stats   Avg      Stdev     Max   +/- Stdev

     Latency     4.44ms    6.08ms 114.21ms   88.77%

     Req/Sec    70.09k    11.66k   96.44k    78.03%

   2785615 requests in 10.08s, 316.13MB read

Requests/sec: 276362.92

Transfer/sec:     31.36MB


AB Benchmark:

Microhttpd :

[root@oe23 tools]# ab -c100 -n100000  http://127.0.0.1:8888/

Concurrency Level:      100

Time taken for tests:   3.499 seconds

Complete requests:      100000

Failed requests:        0

Total transferred:      6000000 bytes

HTML transferred:       300000 bytes

Requests per second:    28577.94 [#/sec] (mean)

Time per request:       3.499 [ms] (mean)

Time per request:       0.035 [ms] (mean, across all concurrent requests)

Transfer rate:          1674.49 [Kbytes/sec] received


hello.go:

[root@oe23 tools]# ab -c100 -n100000  http://127.0.0.1:10000/

Concurrency Level:      100

Time taken for tests:   3.767 seconds

Complete requests:      100000

Failed requests:        0

Total transferred:      11900000 bytes

HTML transferred:       300000 bytes

Requests per second:    26549.81 [#/sec] (mean)

Time per request:       3.767 [ms] (mean)

Time per request:       0.038 [ms] (mean, across all concurrent requests)

Transfer rate:          3085.38 [Kbytes/sec] received




----- 原始邮件 -----


*发件人:*Evgeny Grin<k2k@yandex.ru>

*发送时间:*2023-07-04 00:40:33

*收件人:*libmicrohttpd development and user mailinglist<libmicrohttpd@gnu.org>

*抄送:*lingweicai<lingweicai@sohu.com>

*主 题:*Re: [libmicrohttpd] 回复:回复:Re: Help : Any HTTP Performance Benchmark Comparison for Microhttpd with Go HTTP Servers

Hi all,

I've published the new tool on git master branch. You can find it at src/tools/perf_replies
Please try it and report any problems.
Performance report are appreciated as well.

The suggested test tools:
wrk, h2load --h1

--
Evgeny

On 01.07.2023 14:15, lingweicai via libmicrohttpd wrote:

    Hi Evgeny:


    Could you please help to share the benchmark source file with me by
    email ? I want to run it on my system ASAP.

       Thanks,

    Forrest


    ----- 原始邮件 -----


    *发件人:*lingweicai<lingweicai@sohu.com> <mailto:lingweicai@sohu.com>

    *发送时间:*2023-07-01 17:30:20

    *收件人:*Evgeny Grin<k2k@yandex.ru>
    <mailto:k2k@yandex.ru>;libmicrohttpd development and user
    mailinglist<libmicrohttpd@gnu.org> <mailto:libmicrohttpd@gnu.org>

    *主 题:*回复:Re: [libmicrohttpd] Help : Any HTTP Performance
    Benchmark Comparison for Microhttpd with Go HTTP Servers

    Hi Evgeny:


    The results are really exciting. Really apreciate your efforts.


    Thanks,

    Forrest



    ----- 原始邮件 -----


    *发件人:*Evgeny Grin<k2k@yandex.ru> <mailto:k2k@yandex.ru>

    *发送时间:*2023-06-30 03:29:17

    *收件人:*libmicrohttpd development and user
    mailinglist<libmicrohttpd@gnu.org> <mailto:libmicrohttpd@gnu.org>

    *抄送:*lingweicai<lingweicai@sohu.com> <mailto:lingweicai@sohu.com>

    *主 题:*Re: [libmicrohttpd] Help : Any HTTP Performance Benchmark
    Comparison for Microhttpd with Go HTTP Servers

    Hi Forrest,

        The tool for performance replies is shaping, I have alpha
    version and
        made some test with suggested wrk.
        Here are the initial results:
        -----------------------------------------
        $ wrk -c100 -d30s -t4 http://127.0.0.1:39683
    <http://127.0.0.1:39683>
        Running 30s test @ http://127.0.0.1:39683 <http://127.0.0.1:39683>
        4 threads and 100 connections
        Thread Stats Avg Stdev Max +/- Stdev
        Latency 143.75us 57.42us 1.93ms 69.18%
        Req/Sec 102.70k 2.45k 108.02k 70.92%
        12262004 requests in 30.00s, 479.45MB read
        Requests/sec: 408721.22
        Transfer/sec: 15.98MB

        $ wrk -c100 -d30s -t8 http://127.0.0.1:39683
    <http://127.0.0.1:39683>
        Running 30s test @ http://127.0.0.1:39683 <http://127.0.0.1:39683>
        8 threads and 100 connections
        Thread Stats Avg Stdev Max +/- Stdev
        Latency 110.83us 251.91us 23.18ms 99.77%
        Req/Sec 101.68k 15.28k 130.87k 65.28%
        24297494 requests in 30.10s, 0.93GB read
        Requests/sec: 807215.36
        Transfer/sec: 31.56MB

        $ wrk -c400 -d30s -t8 http://127.0.0.1:39683
    <http://127.0.0.1:39683>
        Running 30s test @ http://127.0.0.1:39683 <http://127.0.0.1:39683>
        8 threads and 400 connections
        Thread Stats Avg Stdev Max +/- Stdev
        Latency 387.42us 159.03us 13.43ms 74.39%
        Req/Sec 109.04k 13.31k 133.24k 59.58%
        26036491 requests in 30.04s, 0.99GB read
        Requests/sec: 866619.04
        Transfer/sec: 33.89MB

        $ wrk -c400 -d30s -t4 http://127.0.0.1:39683
    <http://127.0.0.1:39683>
        Running 30s test @ http://127.0.0.1:39683 <http://127.0.0.1:39683>
        4 threads and 400 connections
        Thread Stats Avg Stdev Max +/- Stdev
        Latency 482.26us 266.28us 25.07ms 94.71%
        Req/Sec 108.71k 4.57k 120.72k 80.42%
        12979154 requests in 30.06s, 507.49MB read
        Requests/sec: 431811.63
        Transfer/sec: 16.88MB

        $ wrk -c1000 -d30s -t4 http://127.0.0.1:39683
    <http://127.0.0.1:39683>
        Running 30s test @ http://127.0.0.1:39683 <http://127.0.0.1:39683>
        4 threads and 1000 connections
        Thread Stats Avg Stdev Max +/- Stdev
        Latency 1.17ms 475.29us 29.10ms 70.65%
        Req/Sec 101.63k 8.46k 126.45k 81.94%
        12121757 requests in 30.05s, 473.97MB read
        Requests/sec: 403322.87
        Transfer/sec: 15.77MB

        $ wrk -c1000 -d30s -t8 http://127.0.0.1:39683
    <http://127.0.0.1:39683>
        Running 30s test @ http://127.0.0.1:39683 <http://127.0.0.1:39683>
        8 threads and 1000 connections
        Thread Stats Avg Stdev Max +/- Stdev
        Latency 1.20ms 368.89us 20.19ms 88.20%
        Req/Sec 89.15k 8.66k 116.86k 71.04%
        21283031 requests in 30.09s, 832.18MB read
        Requests/sec: 707233.60
        Transfer/sec: 27.65MB
        -----------------------------------------
        I'll let you know when tool is published.

        --
        Evgeny


        On 26.06.2023 3:52, lingweicai via libmicrohttpd wrote:


         ), the results :






    <https://a.app.qq.com/o/simple.jsp?pkgname=com.sohu.mail.client.cordova>











Attachment: OpenPGP_0x460A317C3326D2AE.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]