mtcp-stack / mtcp

mTCP: A Highly Scalable User-level TCP Stack for Multicore Systems
Other
1.98k stars 436 forks source link

Correct usage of apache_benchmark ab #193

Closed PhilippGruber closed 6 years ago

PhilippGruber commented 6 years ago

Hi,

I tried succesful your epwegt/epserver example but I don´t get how to use the apache_benchmark server. It seems logical that I should have a apache_server on my second machine while running ab on the first. But is that the intended way of use? And if it is should I install/set up some specific version of apache or is that not important?

Thanks in advance for your effort.

ajamshed commented 6 years ago

Hi @PhilippGruber ,

Did you read apps/apache_benchmark/README-mtcp file? Let me know if you have any questions after reading the file.

PhilippGruber commented 6 years ago

Of course; I did read it. I configured as it is described for the dpdk version and run ab on both machines. Somehow that printed some information/statistic but after ctrl +c the system showed me this twice (the file exists on both machines) ./ab -N 4 -c 1000 -n 10000000 10.0.0.4/test.txt [...] Server Software:
Server Hostname: 10.0.0.4 Server Port: 80 Document Path: /test.txt Document Length: 0 bytes Number of Cores: 4 Concurrency Level: 1000 Time taken for tests: 0.000 seconds Complete requests: 0 Failed requests: 36176210 (Connect: 0, Receive: 0, Length: 0, Exceptions: 36176210) Write errors: 0 Total transferred: 0 bytes HTML transferred: 0 bytes

Likely this is not the way to use it, therefore my question should I do something diffrent on the second machine, probably run an apache server?

eunyoung14 commented 6 years ago

It looks like ab isn't making any successful connection to the server. You can use epserver or mtcp-enabled lighttpd which is enclosed in our apps directory as a server-side application. Both of them should work with ab.

If you are not going to use mTCP and dpdk on the server side, you may use any kind of webserver applications such as apache or lighttpd.

PhilippGruber commented 6 years ago

Thanks a lot with epserver on the other machine it worked.

But I have another question regarding the printed statistic. For example it got the following one [ ALL ] dpdk0 flows: 1103, RX: 2384117(pps) (err: 0), 2.28(Gbps), TX: 2629553(pps), 2.25(Gbps)

Can you tell me with what packet size epserver/ab is running or even better whether/where I can change that value? I did not found anything like that for the applications.

eunyoung14 commented 6 years ago

You cannot change the packet size of epserver and ab directly since they are HTTP server and client and include HTTP headers in addition to payloads. However, you can vary the size of the payload by requesting files with different size. For which size of payload to use, please refer to our paper. We usually tested mTCP with payloads between 64B and 8KiB.