1

I'm using Siege to act as a cache warmer for Varnish on a wordpress site. I've set up a simple script to grab the latest URL list from a dynamic sitemap, output them to a file, purge the cache using Varnishadm and then run siege against the url list to repopulate the cache.

The problem is the Siege part of the equation. If I run the following command:

/usr/bin/siege -c1000 -d3 -r1 -v -i -f url-list-example.txt

It works fine but this obviously randomly accesses the URL list rather than hit one after another. From what I've read removing the -i flag so that the command is:

/usr/bin/siege -c1000 -d3 -r1 -v -f url-list-dekanta.txt

should mean that Siege runs through the list once and stops however it doesn't do this. Instead it just hits the first URL which is / multiple times and stops.

Could someone please explain what I'm doing wrong with this command please? I've read through the docs and nothing seems to work the way I want it to. Many thanks.

d1ch0t0my
  • 443
  • 7
  • 22

2 Answers2

2

The man page of siege mentions this explicitly as --reps=once; and the source implements that exception. So it seems using --reps=once instead of -r1 might fix this for you

Sjon
  • 4,989
  • 6
  • 28
  • 46
  • Sorry I forgot to mention that I'd tried that last night shortly before giving up for sleep. Running the following results in Siege doing nothing: Transactions: 0 hits Availability: 0.00 % Elapsed time: 0.46 secs Data transferred: 0.00 MB Response time: 0.00 secs Transaction rate: 0.00 trans/sec Throughput: 0.00 MB/sec Concurrency: 0.00 Successful transactions: 0 Failed transactions: 0 Longest transaction: 0.00 Shortest transaction: 0.00 FILE: /root/siege.log – d1ch0t0my Jul 13 '15 at 14:50
  • Sorry command that produces no result is - /usr/bin/siege -c1000 -d3 --reps=once -v -f url-list-example.txt – d1ch0t0my Jul 13 '15 at 14:52
2

Fixed it. Seems I was over complicating things but thanks to Sjon for helping me revisit what I had previously tried and thought failed with.

To cycle through a URL list Siege doesn't need the -d or -c flags as these are specified for mimicking random user behavior (-c for how many users to mimic -d for the wait time before hits). Removing these flags and just running the simple command:

/usr/bin/siege --reps=once -v -f url-list-example.txt

..resulted in Siege cycling through the list as its supposed to with a default of 15 concurrent users. You can add -c100 or whatever if you want to increase this concurrent amount.

d1ch0t0my
  • 443
  • 7
  • 22