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:<
If we simply increase N to some very large number (much greater than anything used in the load tests), the PDQ model will eventually saturate. In the plot, I've shown what happens if N is increased from say, 100 users (blue solid) to 200 users (blue dashed) while leaving Z unchanged. The load line maintains its slope but shifts in the upward direction. This happens because both the x-intercept and y-intercept are being scaled by the same factor (N). However, if we fix the position of the y-intercept in the plot, by keeping the ratio N/Z constant in eqn.(1), then the x-intercept will move off to the right as we increase N. Eventually, the load line will tend toward the horizontal (red line), which is equivalent to a constant arrival rate for all values of Q.
3 comments:
hi neil,
to 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.
And, 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?
Post a Comment