siege用法
相信大家對siege還是比較了解的,它是一款比較功能比較強大的壓力測試軟件。可能大家平常也會用,但直到前陣子,發現自己對它的參數理解還不夠深刻,分享出來希望對大家有所幫助。
如果我用以下這樣的參數去進行壓力測試,具體是怎樣的?
siege -r1000 -c20 "127.0.0.1:1823"是不是“20個并發用戶,每個用戶重復請求1000次,去壓本地的1823端口”。
好的,那接下來的問題來了,每個用戶的每個請求之間會不會有延時?如果有延時的話,會不會對得到的性能指標有所影響呢?
這就我們之前很可能忽視的一個參數:
-b, --benchmark BENCHMARK: no delays between requests. ‘ –delay=NUM ‘ Each siege simulated user is delayed for a random number of seconds between one and NUM. If you are benchmarking performance, it is recommended that you use a 1 second delay ( -d1 ). The default value is three (3 ). This delay allows for the transactions to stagger rather then to allow them to pound the server in waves.?
所以正確的壓力測試參數應該是:
siege -r1000 -c20 -b "127.0.0.1:1823"?
參考文章:
http://www.php-oa.com/2010/06/25/siege.html
轉載于:https://www.cnblogs.com/lengyuhong/archive/2012/08/14/2638272.html
總結
- 上一篇: 简单01背包 POJ3211 Washi
- 下一篇: NoSQL数据库探讨之一 - 为什么要用