PDQ is an analytic solver library for queueing-network models (QNM) of computer systems, manufacturing systems, and data networks, that can be written optionally in a variety of conventional programming languages (see below). Perl is the language used in the book Analyzing Computer System Performance with Perl::PDQ, which explains the fundamental queue-theoretic concepts with example PDQ models for computer performance analysis.
Overview: What is PDQ?
Platforms: Linux, OS X, Windows
Maintainers: Neil Gunther and Paul Puglia
Contributors: Denny Chen, Phil Feller, Neil Gunther, Peter Harding, Paul Puglia, Sam Zallocco
License: PDQ is distributed as OSS under the MIT license.
Synopsis: PDQ library functions
Examples: See the examples/
directory.
Here is a simple PDQ model of Help Center serving a single waiting-line of customers, written in C:
#include <stdio.h>
#include "PDQ_Lib.h"
int main(void) {
int agents = 4; // available to take calls
double aRate = 0.35; // customers per minute
double sTime = 10.0; // minutes per customer
PDQ_Init("Call Center ");
PDQ_CreateMultiNode(agents, "Agents", CEN, FCFS);
PDQ_CreateOpen("Customers", aRate);
PDQ_SetDemand("Agents", "Customers", sTime);
PDQ_SetWUnit("Customers");
PDQ_SetTUnit("Minute");
PDQ_Solve(CANON);
PDQ_Report();
}
How long can a customer calling a Help Center expect to wait for a teller?
Predicted performance metrics that result from solving a PDQ model can easily be displayed
using the generic Report()
function:
PRETTY DAMN QUICK REPORT
==========================================
*** on Tue May 17 13:23:24 2016 ***
*** for Call Center ***
*** PDQ Version 7.x.x Build 051116 ***
==========================================
==========================================
******** PDQ Model INPUTS ********
==========================================
WORKLOAD Parameters:
Node Sched Resource Workload Class Demand
---- ----- -------- -------- ----- ------
4 MSQ Agents Customers Open 10.0000
Queueing Circuit Totals
Streams: 1
Nodes: 1
Arrivals per Minute Demand
-------- -------- -------
Customers 0.3500 10.0000
==========================================
******** PDQ Model OUTPUTS ********
==========================================
Solution Method: CANON
******** SYSTEM Performance ********
Metric Value Unit
------ ----- ----
Workload: "Customers"
Number in system 8.6650 Customers
Mean throughput 0.3500 Customers/Minute
Response time 24.7572 Minute
Stretch factor 2.4757
Bounds Analysis:
Max throughput 0.4000 Customers/Minute
Min response 10.0000 Minute
******** RESOURCE Performance ********
Metric Resource Work Value Unit
------ -------- ---- ----- ----
Capacity Agents Customers 4 Servers
Throughput Agents Customers 0.3500 Customers/Minute
In service Agents Customers 3.5000 Customers
Utilization Agents Customers 87.5000 Percent
Queue length Agents Customers 8.6650 Customers
Waiting line Agents Customers 5.1650 Customers
Waiting time Agents Customers 14.7572 Minute
Residence time Agents Customers 24.7572 Minute
PDQ predicts the average customer waiting time will be 14.7572 minutes.
Alternatively, customized reports can be created using specific performance metrics
like, GetUtilization()
or GetThruput()
.