Skip to content
-
Subscribe to our newsletter & never miss our best posts. Subscribe Now!
The Server Admin
The Server Admin
  • Home
  • Linux
  • Windows
  • About
  • What Powers The Server Admin
  • Home
  • Linux
  • Windows
  • About
  • What Powers The Server Admin
Close

Search

  • https://www.facebook.com/
  • https://twitter.com/
  • https://t.me/
  • https://www.instagram.com/
  • https://youtube.com/
Subscribe
Linux

Simultaneously benchmark many URLs with ApacheBench

By Anthony
July 11, 2024 2 Min Read
0

Souce Help: https://www.simonholywell.com/post/2015/06/parallel-benchmark-many-urls-with-apachebench/

So every now and then, we all like to know what our server can really do, a real world example of our site getting traffic to different pages and different websites across our server(s). Example this site, the home page is where most people stop, but thats great, what about those reading other pages? How do I bench the site in general at the same time?

I find myself looking at one page at a time, usually the home page when I benchmark a site I am hosting. Again see above, and thats great and all, but how do I scan the site?

Apache Bench is an amazing tool but it has a limit of only running one test at a time against one url. So we need a way to “cheat” or make this happen where we can launch multiple copies of this command at the same time.

Along comes parallel, written by Ole Tange, a utility when piped a list of arguments, thiw will execute commands against them concurrently (generally limited by the number of physical CPUs where on job maps to one processor). This means you can take any crusty Linux utility that runs serially and turn it into a concurrently executed task with minimal effort. (If you are using parallel with gzip though you might prefer pigz instead.) On top of that it is also possible to farm out the parallel processing to other machines if you have them.

So lets get started, first we need to install parallel, this is stupid simple, if your running Ubuntu / Debian servers like I do, just do the following.

sudo apt-get install parallel

So I am going to assume you know how to use Apache Bench right? If not, it has many different flags, but 95% of the time your going to do a command something very close to this.

ab -n 100 -c 10 http://www.example.org/

Now I am not going to go into a bunch of details on how you can echo in to the parallel command different sites, which is great for one or two and maybe three URL’s but more then that, your going to want to cheat and use a txt file. So below is the command.

cat URLs.txt | parallel 'ab -c 10 -n 100 {}'

Yep thats it!! Now lets look at the syntax of our URLs.txt file.

http://example.org/
http://www.example.net/
http://tools.example.com/
http://secure.example.tk/my-passwords.html

Nothing more and nothing less.

This will then spit out the the outputs of all the ab results, and it will print them out in the order it finishes them first.

Author

Anthony

Follow Me
Other Articles
Previous

Ideal Site Setup?

Next

Cyberpanel

Search

Need a Virtual Server for sysctl testing? Check out our plans!

Popular Posts

  • Mount sFTP folder as local drive
    by Anthony
    June 9, 2026
  • Robocopy Examples
    by Anthony
    February 12, 2026
  • Rsync Command Examples
    by Anthony
    February 10, 2026

Trending

  • Mount sFTP folder as local drive
    by Anthony
    June 9, 2026
  • Adding a GUI to a Server or VPS
    by Anthony
    August 27, 2024
  • Back up to a shared folder with Time Machine on Mac
    by Anthony
    January 4, 2025
  • Backup Your Databases
    by Anthony
    March 24, 2024

Editors Picks

    Send an email:
    mail@example.com

    Call me:
    123-456-7890

    • Facebook
    • Twitter
    • Instagram
    • TikTok
    • LinkedIn
    • Behance
    Copyright 2026 — The Server Admin. All rights reserved. Blogsy WordPress Theme