You can download just those files that are necessary to build PDQ in your preferred language.
Clicking any of the following links will automatically start a download of the tarball file from SourceForge.
Otherwise, the complete source code distribution
can be downloaded and installed in the usual way.
This separated packaging also facilitates the installation of PDQ on the most common operating systems
For more detailed information about installing Perl PDQ, Python PDQ or R PDQ on Windows (where ancillary language support is needed), please see the relevant release notes
for PDQ 6.1.1 (Section 3) and PDQ 6.0.1 (Section 4).
Mac OS X also needs the clang compiler from
The 6.2.0 Report banner that displays the name of your model, the date and time your PDQ model was solved, and the version of PDQ used,
has been tweaked slightly to look like this:
PRETTY DAMN QUICK REPORT
*** on Thu Aug 20 15:33:21 2015 ***
*** for Get Nopt Test ***
*** PDQ Version 6.2.0 Build 082015 ***
PDQ 6.2.0 now tests for the existence of queueing nodes, workload streams, and service demands, instantiated respectively by
CreateNode(), CreateOpen() or CreateClosed(), and SetDemand() as part of defining a PDQ circuit.
If any of these necessary components is missing, a warning message appears. In the next major release, execution will terminate.
The C language PDQ models in ../examples/ppa_1998, pertaining to
The Practical Performance Analyst (PPA) book,
were not building due to lack of source and object dependencies in the Make file. This has been fixed in PDQ 6.2.0.
Minor release 6.1.1, build 011013.
This minor release (coming so soon after 6.0.1) was motivated by our desire to
make more of the PDQ language extensions available on Windows; not just PDQ-R.
This is particularly true for Perl, since that is the language used for all the PDQ models
in the Perl::PDQ book.
We realized shortly after the release of 6.0.1 that the compilation procedure we
developed for R could also be used as a template for re-packaging the other
language extensions. In other words: packaging the code as a source tarball, building it with
the language's native compiling facilities, and making each of them available to run under
Windows. The specific details for building the full 6.1.1 distribution, along with
each of the re-packaged extensions, are described below, beginning in Section 3.1.
The other minor change pertains to a reformatting of some sections of the output generated by the
PDQ Report() function.
See Section 3.2.
To acquire the full PDQ 6.1.1 distribution, download the zipped tarball from
The tarball now shows major, minor and patch release numbers.
On *nix systems, make sure you have root privileges to avoid permissions problems.
Very important note. Read and heed:
If you only want to build PDQ specifically for one of the particular languages:
Python or R or Perl—especially
Microsoft Windows environment—goto Section 3.1.
Do not cherry-pick your favorite language by just running make from within that sub-directory of the full distribution without
running the top-level make. Otherwise, PDQ will not get compiled.
In this release, two major changes have been made to the build process for the full distribution.
The build process runs using only Gnumake without resorting to any of the
shell scripts that where a major part of the process in prior versions. This
change was made to make the build process more uniform across all of PDQ's
components. However, it has only been fully tested on Linux and Mac OS X
platforms. Users trying to build on Solaris or any of the Unix-like
environments on Windows (Cygwin or MinGW) might run into issues. If you are one
of those users, please notify us via the Google Gurillia Group, and we'll try to
On Mac OS X, the necessary shell commands are not available in the default O/S distribution.
They can be downloaded free as part of the
XCode developer toolset for MacOS an iOS.
Note that there is a
command line preference
that needs to be invoked during the install process.
Unlike earily versions of PDQ, where the build process ignored build errors
while building the extensions, the 6.1.1 build process now aborts when any error
occurs. This means, if you're looking to build the full distribution or the
C-library, you'll need to have R, Perl5, and Python installed on your system.
Otherwise, the entire build will fail when it tries compiling the extension for
the missing language. We made this change to help debug build issues. We've been
getting a lot of support questions where users report that one of the extensions
isn't working, only to find that it failed to build without them realizing it.
As in previous versions of PDQ, the build process for the full distribution is started by
running make as root from the top-level directory. See the README file in the
untar-ed download for full details.
Each of the three language extension packages shipped with PDQ (Perl5, Python, and R) have been
reconfigured so they build using the "offical" compile method for their language
(e.g. ExtUtils::MakeMakers for Perl.) This continues (and finishes) the process
we started in 6.0.1 where we provided the R language extension as its own
separate source package. By doing this, we've removed the need to build the
full distribution in order to compile the extensions. All three extensions will
now be available as separate, native source packages that can be built outside
of the full distribution. And, like R, we'll be making each of them available in
the PDQ download area on
The following sections gives specifics on building and installing each of the
three language extensions using their respective source packages.
The PDQ Perl5 Extension has now been re-packaged as Perl source module that can
be compiled using the ExtUtils::MakeMaker extension. While this greatly reduces
the complexity of installing the extension on all platforms, on Windows, using
the most current versions of Strawberry and ActiveState Perl, it provides a
relatively staightforward means of making the extension available on that
platform, without the need to also install a separate Unix/Linux-like
environment such as Cygwin or MinGW.
The next two subsections provide details on how to install the Perl Extension
for both Unix-like and Windows operating systems.
make test—a PDQ report will be displayed if the execution of test.pl is successful
The Perl PDQ module has been successfully built and tested using both Strawberry
Perl and ActiveState Perl. Strawberry Perl ships with all the necessary
compilers need for installing, and, if this is the version of Perl you're
running, you can go immediately to step 1 below.
If you're running ActiveState Perl, you need to install two addition
ActiveState PPMs before the build process can proceed. You can do this by using
the following two commands:
ppm install dmake
ppm install MinGW or ppm install MinGW64 for 64-bit platforms.
You need to be running ActiveState 5.16 build 1601 or greater.
With both of these PPMs installed, you can now go to step 1 below.
Assuming all the prerequisites have already been met, you can build the Perl extension as follows:
Like the Perl extension, the Python extension has been reconfigured to build
separately using the Python's Distutils. This should make the install process
significantly easier for Linux,Unix and/or MacOS X users who are only interested
in using this extension and have no interest in other parts of PDQ. At this
point, there is no offical support for Windows. Technically, the extensions
should build, but unlike Perl and R that ship with their on compiler
environments for Windows, building Python on Windows requires using Visual C/C++
tools and no testing with this compiler has been done yet. We'd be interested
in hearing about the experiences of users who try compiling on Windows.
The default procedure for building the Python extension is:
The command: python setup.py install
will build and install the package on most platforms, if it is run with root priviledges.
On MacOS X,
this can also be accomplished by prepending the sudo command as:
sudo python setup.py install
If you don't have root access on the install machine, a "local" compile
can be included in your PYTHONPATH with the command:
python setup.py install -user
You can test whether or not the install is working correctly by running the test.py script
located in the pdq-6.1.1 directory.
As of PDQ release 6.0.1, the PDQ-R extensions has been supplied as a separate source tar.
It has been sucessfully installed on Linux, MacOS X and Windows.
Building PDQ-R on Microsoft Windows is fairly simple process, even for
those R Windows users who don't regularly build packages from sources. The steps
are as follows:
Download and install the
R tools for Windows package from CRAN
tarball pdq_6.1-1.tar.gz from the Sourceforge/Files page into a local directory
e.g. C:\Users\Example\R-SRC Note the underscore in the tarball file name, which should not to be confused with the full PDQ distribution tarball.
Start your version of R
Use the command install.packages from the R console to install the package.
The command will be something like this:
The surrounding borders have been simplified so as to consume less vertical space.
The header width has been increased to accommodate the complete 3-level version numbering.
Previously, only 2 levels were shown. The section title is now displayed in all caps to be consistent with other sections.
Single nodes, invoked with the
are identified by the FCFS (first come first served) scheduling class
while multiserver queues, invoked with the
are identified by the MSQ (multi server queue) scheduling class.
Node Sched Resource Workload Class Demand
---- ----- -------- -------- ----- ------
1 FCFS Select Calls Open 0.5000
3 MSQ Claims Calls Open 3.3420
7 MSQ Policy Calls Open 9.2228
The Node column shows the number of servers available to each resource.
That parameter now also reappears in the Resource section for easier cross-referencing.
Two new rows, identified by the following resource metrics:
In service metric
have been added to this section. The new format looks like this:
Metric Resource Work Value Unit
------ -------- ---- ----- ----
Capacity Policy Calls 7 Servers
Throughput Policy Calls 0.5833 Calls/Mins
In service Policy Calls 5.3800 Calls
Utilization Policy Calls 76.8567 Percent
Queue length Policy Calls 6.7826 Calls
Waiting line Policy Calls 1.4027 Calls
Waiting time Policy Calls 2.4046 Mins
Residence time Policy Calls 11.6274 Mins
The Capacity metric (1st row) indicates the number of servers available at that resource
and is a repeat of the Node value in the Workload Parameters section.
This can be used to check the intent of your PDQ model.
The In service metric (3rd row) refers to the average number of requests being served. It also
indicates the total utilization of multi-server capacity.
In the above example, an average of 5.38 Policy servers out of a possible 7 servers are being utilized by the
For a single server (i.e., a PDQ node with a Capacity Value of 1), the numerical value of the In service metric should be identical to the numerical value of the Utilization metric (4th row), except that the latter is expressed as a
percentage (as it was in previous releases). Once again, this can be used as a cross check.
Major release 6.0.1, build 121512.
If you are a new (or returning) user of PDQ, please join the
Guerrilla google group
and follow The Pith of Performance blog
to keep abreast of all the latest developments.
Download the zipped tarball from
The tarball only shows major and minor 6.0 release numbers.
In a *nix shell, be sure to issue a
sudo make command to avoid permissions problems.
The main purpose of this release is improved compatibility and stability between PDQ and the
R statistical environment.
Many of the PDQ models,
previously found in the ../examples/ directory, can now also be accessed via the demo()
command in the R-console.
After installing PDQ, issue the following commands in the R-console:
and a list of available PDQ-R models will be shown.
These PDQ-R scripts can be executed and studied entirely from within the
R environment in the usual way. Use the help() function for an online introduction:
To get a listing of PDQ function calls, go to the bottom of the Help page in R and click on the Index link.
Too see the R source code for the PDQ-R models, click on the Code demos link at the top of the PDQ listings page.
Testing was carried out using R version 2.15.2 (2012-10-26).
Operationally, PDQ (of any flavor) should appear cosmetically the same as the release 5 version;
no additional programming required.
Further background information about this release can be found in the blog posts:
PDQ 6.0 is On Its Way and
PDQ 6.0 from a Developer Standpoint.
The following changes to the PDQ C-library were made to better support PDQ-R:
· Replaced printf, fprintf functions with macro PRINTF to support toggling between
c-library functions and R API Rprintf() functions. This routes output to the R
console instead of directly to stdout. The chief benefit of this that the R
sink() function can now redirect the output of the PDQ-R Report() function.
· Added code as an #ifdef which toggles between standard c-library calloc() and
free() and R API Calloc() and Free() functions. R API functions are used when
compiling PDQ source files inside an R package. This allows PDQ to use R memory
management APIs when running inside R.
· Added code as an #ifdef that toggles between standard c-library exit() and R API
error() functions. This fixes the issue of PDQ-R causing the R console to end
abruptly when an error condition is hit. Error messages are also redirected to
the R console.
· Twenty six (26) demo scripts have been added to the PDQ-R package. A full
listing of scripts can be seen by running demo(pdq) after the R package has been
loaded into your environment using the command, library(pdq).
· With this release, PDQ-R is also being provided as an R source tar.gz. This tar
ball is exactly the same code that the build process of the distribution
produces. This should provide PDQ-R users who want to run package on Microsoft
Windows a means of building and installing the package without the need to
build the entire PDQ distribution.
Building PDQ-R on Microsoft Windows is fairly simple process, even for those R Windows
users who don't regularly build packages from sources. The steps to do are as
· Download and install the R tools for Windows package from
· Download the PDQ-R source tar ball from the
page into a local directory (e.g. C:\Users\Example\R-SRC)
· Start your version of R
· Use the command install.packages from the R console to install the package.
The command will be something like this: install.packages("source_directory\\pdq_6.0-1.tar.gz",repos=NULL,type="source")
· For the source directory shown in the earlier example, the complete command would be: install.packages("C:\\Users\\Example\\R-SRC\\pdq_6.0-1.tar.gz",repos=NULL,type="source")
Fixed a bug that was identified on the
For models with multiple streams (workloads) on multiple nodes (queues), it
was possible for the arrival rate of stream-B to be reported as exceeding
the saturation throughtput of say, node-X, but using the (inverse) service demand of
stream-A on node-X in the calculated comparison. In other words, the index cross-referencing was wrong.
This problem only showed up at or above saturation thresholds, which is why it managed
to escape previous detection in the QA test suite.
Improved error messaging to show explicit stream and node names when saturation threshold is exceeded.
For example, in the above case:
ERROR in procedure 'canonical()':
Arrival rate 34.560 for stream 'workB' exceeds saturation thruput
34.483 of node 'CPU' with demand 0.029
Updated PDQ online manual synopsis for
Must call CreateOpen or CreateClosed before calling SetWUnit or SetTUnit.
Don't forget, you need to perform a sudo make in the top-level /pdq directory
to ensure write permission for the various support directories.
This release ensures that all PDQ functions are available in each
programming-language environment and fixes a bug in how mixed workloads are
as well as a bug with displayed device utilizations in PDQ Report().
PDQ can be built and installed by issuing a sudo make
command in the top-level /pdq directory. The sudo is important
to ensure you the right permissions to write into the various support
directories. This is especially important for the
R build to work.
An as yet unresolved problem with PDQ-R
is that it may crash the R console GUI if there is an error in your PDQ model.
Known examples include:
utilization of a PDQ node exceeds 100%
reference is made to an unnamed or incorrectly named queue
Some important benefits of these new features are:
As well as centralized development,
SourceForge also provides a forum
page for Help and Discussions.
Due to various unforeseen circumstances (as always), the implementation of multiserver queues (MSQ)
did not occur until well after the Perl::PDQ book
was released in 2005.
As a consequence, the application of PDQ with MSQ to Erlang's queueing model (1917) and the extension to Jackson's theorem (1957)
did not appear in the book. However, you can find this information
in Section 3 of the online development notes
from 2007. Think of this material as a sneak preview into a portion of the next edition of the
The integration with R is very significant because it does not have a qeueing network solver, but now
with PRQ-R you can:
Release 4.2.1 Build 031307.
PDQ (Pretty Damn Quick) finally made it out the door as version 4.2 and is now
available for immediate download. The PDQ models included in the /examples/
directory correspond to those discussed in each of my books, but PDQ is
primarily associated with the Perl::PDQ book.
The main features of PDQ 4.2 are:
Java version of PDQ contributed by Peter Harding in Australia
PHP version of PDQ contributed by Italian student Samuel Zallocco
Threaded-server model and errata corrections contributed by Neil Gunther
Better organization of the Perl and Python models
The Java and PHP packages are released stand-alone at this time
Complete installation instructions are available on the download page. Make sure
you also read the various README files. Tom Becker (USA) and Christof
Schmalenbach (Germany) have kindly provided separate installation notes for
ActivePerl on Windows. This also indicates how international PDQ has become. :)
Major release 4.0.1, build 022507.
Version 4.0 of PDQ (Pretty Damn Quick) is in the pipeline: it's been there for
quite some time, actually (blush). The current hold up is related to getting
both the Perl and the new Java version through the QA suite designed by Peter
Harding. As soon as that is sorted out, we'll release it; probably in two
pieces, keeping the Java PDQ separate initially. Also included will be updates
to PyDQ (python) and a new PHP version.
A number of people have asked me for the C-language version of PDQ,
especially those using my 1998/2000 book
The Practical Performance Analyst.
The C-code of those PDQ models can be found in the directory examples/ppa_1998/.
The Perl scripts for the PDQ models discussed my 2005 book
Analyzing Computer System Performance with Perl::PDQ,
can now be found in the directory examples/ppdq_2005/.
A detailed synopsis of the PDQ functions in Perl is presented in Chapter 6.
The preferred way to keep abreast of PDQ changes is to join the
Guerrilla Google Group.
You can also ask questions there about using PDQ to solve performance problems.
Similarly, subscribe to the blog The Pith of Performance.
Alternatively, if you would like to be notified by email, please fill out the
online form with your correct email address and select the heading
Notify for PDQ updates.
The same applies if you have changed your email address (e.g., changed employer).
File translated from
version 3.81. On 4 Feb 2017, 14:06.