You can use PDQ to extrapolate from your load-test data to a large-N analysis using the following steps:
- Generate your load test data in the usual way, with think time (Z), up to your client limit (N).
- Construct a CLOSED PDQ model. See e.g., Chaps. 9 and 10 in my Perl::PDQ book for examples.
- Use the approximate solution technique, i.e., pdq::Solve($pdq::APPROX); to calibrate your model.
- Increase the PDQ parameter N up to the desired level while keeping the ratio N/Z constant.
#!/usr/bin/perl
use pdq;
$workload_name = "httpGets";
$server_name = "WebLogic";
$service_time = 1.00;
#--------------- Load Test Model -----------
#
# CLOSED model that originally matches the test rig data
$scale_factor = 1000; # adjust upward from 1, 10, ...
$Vusers = 7.5 * $scale_factor; # example starting value
$thinktime = 10 * $scale_factor; # example starting value
pdq::Init("Load Test Model");
pdq::SetWUnit("Cnx");
pdq::SetTUnit("Sec");
$s = pdq::CreateClosed($workload_name, $pdq::TERM, $Vusers, $thinktime);
$n = pdq::CreateNode($server_name, $pdq::CEN, $pdq::FCFS);
pdq::SetDemand($server_name, $workload_name, $service_time);
pdq::Solve($pdq::APPROX);
pdq::Report();
#--------------- Web Application Model -----------
#
# This OPEN model has the same performance statistics
# as the above CLOSED model
$arrival_rate = 0.75;
pdq::Init("Web App Model");
pdq::SetWUnit("Cnx");
pdq::SetTUnit("Sec");
$s = pdq::CreateOpen($workload_name, $arrival_rate);
$n = pdq::CreateNode($server_name, $pdq::CEN, $pdq::FCFS);
pdq::SetDemand($server_name, $workload_name, $service_time);
pdq::Solve($pdq::CANON);
pdq::Report();
Here's why it works. The test rig can only have a finite number of client requests circulating at any given time and is therefore equivalent to a CLOSED queueing sytem (in PDQ parlance), while web apps are better approximated by an OPEN queueing model because the number of users can be unbounded. For a closed queueing system, the effective arrival rate is a variable given by the equation:<
hi neil,
ReplyDeleteto paraphrase what you are describing, when we hold N/Z constant while increasing N, and therefore Z, we are making arrival rate approaches N/Z. thefore, should we also cross-check the CLOSED PDQ approximation with an OPEN PDQ model with arrival rate = N/Z?
BTW, the perl script has 2 variables unset: $workload_name and $service_time.
regards,
wen
Yes, that's correct. You have to increase both N and Z together in the closed PDQ model so as to maintain the ratio.
ReplyDeleteAnd, correct again. You can compare both the original CLOSED model with the equivalent OPEN model, as I've now shown in the above PDQ code. This also corrects the uninitialized variables you mentioned. Well spotted! (as usual).
How does this compare with the so-called "closing" method for turning an open or mixed circuit into a closed one?
ReplyDelete