Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can i simulate heavy http load from one client machine

I have a http server program running on linux host say B that listens to a port and consumes the requests. I am trying to generate huge load (>10k requests per sec) to this http server. For this purpose, i have written a http client program that will repeatedly post a fixed size request to this http server from host A.

Now, what is the impact if i run multiple instances of the httpclient program on host A. Does that generate enough load. Or is there a limit on how many http clients i can run from one machine talking to one server-port.

My observation so far is increasing the number of instances does not really produce enough load or the http server program/OS is not accepting. And i see the cpu/memory/network consumption is very little.

Any ideas? How can i measure the bottleneck?

like image 211
techuser soma Avatar asked Nov 12 '12 19:11

techuser soma


1 Answers

Try apache ab to benchmark your webserver. This generates concurrent http requests very efficiently and is a defacto standard for this purpose.

With ab you can easily create high load on one URL and analyse the results

http://httpd.apache.org/docs/2.2/programs/ab.html

$ ab -n 1000 -c 5 

Creates 1000 total, 5 concurrent requests. Good tutorial how to work with ab http://www.cyberciti.biz/tips/howto-performance-benchmarks-a-web-server.html

like image 194
Michel Feldheim Avatar answered Nov 05 '22 01:11

Michel Feldheim