Skip to main content
Author:

Oliver Tonnhofer <olt@bogosoft.com>

Introduction

palb is a HTTP benchmark tool. The command line interface resembles the Apache benchmark tool ab. It lacks the advanced features of ab, but it supports multiple URLs (from arguments, files, stdin, and Python code).

palb uses pycurl for high-performance URL retrieval and is able to handle more than thousand requests per second with dozens of concurrent requests. If pycurl is not available palb will fall back to Pythons urllib2.

Be sure you have pycurl installed if you expect test results with more than a few hundred requests per second. Check the output of palb:

[...]
Using pycurl as URL getter.
[...]

Installation

This package can be installed with easy_install or from the tarball.

If you are installing from a tarball, run the following command as an administrative user:

python setup.py install

You need setuptools to install palb. If you don’t have it, you can use the ez_setup.py script to install it.

If you are installing using easy_install, you don’t even need to download anything as the latest version will be downloaded for you from the Python package index:

easy_install --upgrade palb

For best performance install pycurl (see Introduction):

easy_install pycurl

Example & Usage

Simple usage (1 request):

% palb http://example.com/

Multiple requests (2 concurrent, 10 total requests):

% palb -c 2 -n 10 http://example.com/

Alternate between multiple URLs:

% palb -c 2 -n 100 http://example.com/index.html\
  http://example.com/foo.html http://example.com/bar.html

Get URLs from file (use - as file name to read from stdin):

% cat test.txt
http://example.com/one.html
http://example.com/two.html
% palb -n 20 -f test.txt

Get URLs from python code:

% cat test.py
def urls(args):
    while True:
        yield 'http://example.com/'
% palb -n 100 -u test:urls

args is a list with all remaining arguments. Use it to pass options to your own URL generators.

Here is an example output:

% palb -c 4 -n 100 -u rndtest:random_urls 'http://localhost:5050/bar/'
This is palb, Version 0.1.1
Copyright (c) 2009 Oliver Tonnhofer <olt@bogosoft.com>
Licensed under MIT License

Using pycurl as URL getter.
Benchmarking (be patient)..... done


Average Document Length: 23067 bytes

Concurrency Level:    4
Time taken for tests: 6.469 seconds
Complete requests:    100
Failed requests:      0
Total transferred:    2306704 bytes
Requests per second:  15.46 [#/sec] (mean)
Time per request:     250.810 [ms] (mean)
Time per request:     62.702 [ms] (mean, across all concurrent requests)
Transfer rate:        348.22 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       43    46   3.5     45      73
Processing:    56   205  97.2    188     702
Waiting:       90   100  12.6     94     138
Total:        106   251  97.1    234     750

Percentage of the requests served within a certain time (ms)
  50%    239
  66%    257
  75%    285
  80%    289
  90%    313
  95%    382
  98%    613
  99%    717
 100%    768 (longest request)

Changelog

0.1.1 (2008-04-30)
  • updated docs (palb is now only available as .tar.gz)

0.1.0 (2008-04-30)
  • reduce number of open file-handles with pycurl, allows more concurrent requests

  • do not import ez_setup, assume it is installed

  • support for python 2.4 (except tests)

0.0.2 (2008-04-19)
  • added PyCurl based URLGetter

  • improved performance (with PyCurl)

  • connection time statistics (with PyCurl)

  • new package structure

  • fix: added *.txt to manifest (LICENSE.txt was missing in 0.0.1 .tar)

  • added tests (nose)

0.0.1 (2009-04-13)
  • first release

Metadata

Release files for palb 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for palb 0.1.1
File Size Uploaded
palb-0.1.1.tar.gz 14.3 kB Details

Release files / palb-0.1.1.tar.gz

Download URL palb-0.1.1.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d6063502a518a6220e9160909b46aaf7a408949d57ff0c68adfc45cd43d998dc
BLAKE2b-256 checksum
How to use checksums
c0f735718cb180ce708e2097d74ca9d0e038ecc2394ae9687f4b8c83d26558c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1.0

1 release file

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page