Boost logo

Boost :

Subject: [boost] [asio]https significantly reduce performance
From: lx (lxlenovostar_at_[hidden])
Date: 2019-01-30 01:48:13

Hi Boost experts:
     I build a https server from asio example of server2, let it support
ssl.we use the codes from:
     I complie the codes with boost_1_64 and openssl-1.1.0j, the commed
line of complie is:
*g++ -g -Wall -o https_server2 *.cpp -I/usr/local/include/
-I/usr/local/openssl-1.1.0j/include -L/usr/local/openssl-1.1.0j/lib
/usr/local/boost_1_64_0/lib/libboost_system.a -Wl,-Bstatic -lglog
-lunwind -Wl,-Bdynamic -lpthread -lcrypto -lssl -ldl -lrt*
    I test the https_server2 by ngrinder, the TPS is just 400, If I test is
just http request , the TPS is 36000. So https significantly reduce
    The perf top result is:

[image: 1.png]
    The top result is:
[image: 2.png]

When I test it by http request, the top result is:
[image: 4.png]

    I have push the codes on github.
    I test 2, 4, 8, 24, 32 threads,but this can't improve the TPS.I test
the nginx with 32 worker process, The TPS is about 5000.
    So maybe lock in asio ?

btw: cpu is 32 cores, and Intel(R) Xeon(R) CPU E5-2440 v2 @ 1.90GHz
        memory is 66GB.
        os is CentOS 6.5
        kernel is 2.6.32

Thank you.


Boost list run by bdawes at, gregod at, cpdaniel at, john at