Mastering Siege: Install, Configure, and Run HTTP Load Tests on Linux
This guide introduces the Siege HTTP/HTTPS load‑testing tool, explains how to install it on CentOS 7, details its configuration options and command‑line flags, and provides practical examples with performance metrics for benchmarking web services.
Introduction
Siege is an HTTP/HTTPS load‑testing and benchmarking tool designed to help web developers understand the performance of their code under stress.
Siege supports basic authentication, cookies, HTTP, HTTPS and FTP protocols. Users can configure the number of concurrent users to simulate, making it a convenient tool for stress testing.
Official website: http://www.joedog.org/
Download: http://www.joedog.org/pub/siege/
Installation & Configuration
Version: Siege‑4.0.2 Operating System: CentOS 7.x
1. Install: shell> yum install siege -y 2. Basic usage:
shell> siege -V</code>
<code>SIEGE 4.0.2</code>
<code>shell> siege --help</code>
<code>-C, --config Show current configuration</code>
<code>-V, --version Show version information</code>
<code>-c, --concurrent=NUM Number of concurrent users (default 10)</code>
<code>-t, --time=NUMm Test duration (e.g., -t5 for 5 minutes)</code>
<code>-b, --benchmark Benchmark mode (no delay between requests)</code>
<code>-g, --get Use GET method for requests</code>
<code>-d, --delay=NUM Delay between requests (seconds)</code>
<code>-i, --internet Simulate random URLs</code>
<code>-r, --reps=NUM Number of repetitions per connection</code>
<code>-f, --file=FILE File containing a list of URLs (one per line)</code>
<code>-m, --mark="text" Mark string in log output</code>
<code>-H, --header="text" Add custom header</code>
<code>-A, --user-agent="text" Set custom User‑Agent</code>
<code>-u, --url="URL" Target URL for testing3. Example:
# 10 concurrent users, each making 10 requests with 1‑second delay</code>
<code>shell> siege -u www.baidu.com -d1 -r10 -c 10</code>
<code># Sample result (truncated)</code>
<code>HTTP/1.1 200 0.05 secs: 143913 bytes => GET /static/superman/js/lib/jquery-1-cc52697ab1.10.2.js</code>
<code>... (additional request lines) ...</code>
<code>Transactions: 1017 hits</code>
<code>Availability: 100.00 %</code>
<code>Elapsed time: 10.06 secs</code>
<code>Data transferred: 35.65 MB</code>
<code>Response time: 0.03 secs</code>
<code>Transaction rate: 101.09 trans/sec</code>
<code>Throughput: 3.54 MB/sec</code>
<code>Concurrency: 3.38</code>
<code>Successful transactions: 1017</code>
<code>Failed transactions: 0</code>
<code>Longest transaction: 0.33 secs</code>
<code>Shortest transaction: 0.00 secs4. GET‑method test:
shell> siege -g www.baidu.com</code>
<code>HEAD / HTTP/1.0</code>
<code>Host: www.baidu.com</code>
<code>Accept: */*</code>
<code>User-Agent: Mozilla/5.0 (redhat-x86_64-linux-gnu) Siege/4.0.2</code>
<code>Connection: close</code>
<code>HTTP/1.0 200 OK</code>
<code>... (response headers) ...</code>
<code>Transactions: 1 hits</code>
<code>Availability: 100.00 %</code>
<code>Elapsed time: 0.52 secs</code>
<code>Response time: 0.05 secs</code>
<code>Transaction rate: 1.92 trans/sec</code>
<code>Throughput: 0.00 MB/sec</code>
<code>Concurrency: 0.10</code>
<code>Successful transactions: 1</code>
<code>Failed transactions: 0</code>
<code>Longest transaction: 0.05 secs</code>
<code>Shortest transaction: 0.05 secs☆ END ☆
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
