How to use Siege to test GET requests?

I use a siege to test the local HTTP service:

siege -q -b -t 30S -c 64 "http://localhost:8888/endpoint?params=abc" 

The test result gives ~ 500 transactions per second.

However, when I test the service manually by running 8 simultaneous curl cycles, the same endpoint gives a throughput of several thousand per second.

So what am I doing wrong with the siege?

+6
source share
2 answers

There are several things that can affect your test. Check what you get if you set the -c to 8 parallel value to match the number of matches you test with curl. Your site may not be able to handle a large number of concurrent users.

Also Siege does not support by default (I don't think so, at least). Without using this option, the server and client must configure and tear down sockets, which can be expensive. You should be able to set the header and execute it ( siege -H "Connection: Keep-Alive" ).

As a side note, I find it useful to use several tools for benchmarking, as soon as you start working under siege, I will play with AB (Apache bench), httperf and also do your manual twisting.

+8
source

You can disable it on the command line using bash substitution to create a dynamic siegrc file:

 siege -R <(echo connection = keep-alive) ... 
+1
source

Source: https://habr.com/ru/post/956056/


All Articles