linux - Benchmarking PHP through unix socket vs tcp with ab and wrk -
when benchmarking regular php 5.6 through unix socket results many order of magnitues better tcp port.
when run command this:
$ ab -k -n 10000 -c 1000 http://127.0.0.1/api/user/1 i avg 3272 reqs per second.
but tcp port instead of unix socket 6.5 reqs per second.
with wrk
$ wrk -t1 -c1000 -d5s http://127.0.0.1:80/api/user/1 on unix socket: 6500 req per second
on tcp port: 300 req per second
how supposed use these benchmarks feel of how server , code can handle load when these kinds of results?
should trust tcp port or unix socket one?
how using unix socket in example? -k option http keep alive.
unix sockets used inter-process communication, i'm primary access method used access webserver via tcp.
really testing efficiency of code , webserver. if care efficiency of code, should consider inspecting xdebug output also.
Comments
Post a Comment