summaryrefslogtreecommitdiff
path: root/TAO/performance-tests
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-10-15 17:09:32 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-10-15 17:09:32 +0000
commit34439dea3babf2f879b676cef450e4ec7dc20919 (patch)
tree398cd6f539c2985e283ee04e5ed3c3bbe32cfa9a /TAO/performance-tests
parent55f5c7341e1609373d035546c6c5558452c02993 (diff)
downloadATCD-34439dea3babf2f879b676cef450e4ec7dc20919.tar.gz
Made the test more flexible
Diffstat (limited to 'TAO/performance-tests')
-rw-r--r--TAO/performance-tests/RTCorba/Thread_Pool/rates2
-rwxr-xr-xTAO/performance-tests/RTCorba/Thread_Pool/run_test.pl189
-rw-r--r--TAO/performance-tests/RTCorba/Thread_Pool/server.cpp49
3 files changed, 181 insertions, 59 deletions
diff --git a/TAO/performance-tests/RTCorba/Thread_Pool/rates b/TAO/performance-tests/RTCorba/Thread_Pool/rates
index 7d0dd3894a5..a396b14e8bf 100644
--- a/TAO/performance-tests/RTCorba/Thread_Pool/rates
+++ b/TAO/performance-tests/RTCorba/Thread_Pool/rates
@@ -1 +1 @@
-25 50 75 \ No newline at end of file
+5 10 15
diff --git a/TAO/performance-tests/RTCorba/Thread_Pool/run_test.pl b/TAO/performance-tests/RTCorba/Thread_Pool/run_test.pl
index 3573415b079..ba9c6c50551 100755
--- a/TAO/performance-tests/RTCorba/Thread_Pool/run_test.pl
+++ b/TAO/performance-tests/RTCorba/Thread_Pool/run_test.pl
@@ -14,28 +14,46 @@ $experiment_timeout = 300;
$iorfile_timeout = 10;
$min_rate = 100;
-$max_rate = 100;
-#$max_rate = 250;
+$max_rate = 250;
$rate_increment = 25;
-$min_work = 10;
-$max_work = 15;
-#$max_work = 50;
-$work_increment = 5;
+for ($rate = $min_rate, $i = 0;
+ $rate <= $max_rate;
+ $rate += $rate_increment, $i += 1)
+{
+ @rates[$i] = $rate;
+}
+
+$min_work = 150;
+$max_work = 410;
+$work_increment = 10;
+
+for ($work = $min_work, $i = 0;
+ $work <= $max_work;
+ $work += $work_increment, $i += 1)
+{
+ @works[$i] = $work;
+}
$min_thread = 0;
-$max_thread = 2;
-#$max_thread = 10;
+$max_thread = 10;
$thread_increment = 1;
-#@workers = (1, 2, 3, 5, 10, 15, 20);
-@workers = (1, 2);
+for ($thread = $min_thread, $i = 0;
+ $thread <= $max_thread;
+ $thread += $thread_increment, $i += 1)
+{
+ @threads[$i] = $thread;
+}
+
+@workers = (1, 2, 3, 5, 10, 15, 20);
$results_directory = "results";
@test_types =
(
"rates",
+ "work",
"workers",
"workers-2",
"work-nolanes",
@@ -44,12 +62,16 @@ $results_directory = "results";
"thread-nolanes",
"thread-lanes-increase",
"thread-lanes-decrease",
+ "work-pool-high",
+ "work-pool-medium",
+ "work-pool-low",
+ "work-pool-zero",
);
$iorfile = "ior";
-$work = 10;
-$time_for_test = 1;
-$max_throughput_timeout = 1;
+$work = 30;
+$time_for_test = 10;
+$max_throughput_timeout = 5;
# Parse the arguments
for ($i = 0; $i <= $#ARGV; $i++) {
@@ -59,13 +81,41 @@ for ($i = 0; $i <= $#ARGV; $i++) {
print STDERR "\t-h shows options menu\n";
- print STDERR "\t-a test types (";
+ print STDERR "\t-tests: defaults to (";
for $test_type (@test_types)
{
print STDERR "$test_type, ";
}
print STDERR ")\n";
+ print STDERR "\t-rates: defaults to (";
+ for $rate (@rates)
+ {
+ print STDERR "$rate, ";
+ }
+ print STDERR ")\n";
+
+ print STDERR "\t-works: defaults to (";
+ for $work (@works)
+ {
+ print STDERR "$work, ";
+ }
+ print STDERR ")\n";
+
+ print STDERR "\t-workers: defaults to (";
+ for $worker (@workers)
+ {
+ print STDERR "$worker, ";
+ }
+ print STDERR ")\n";
+
+ print STDERR "\t-threads: defaults to (";
+ for $thread (@threads)
+ {
+ print STDERR "$thread, ";
+ }
+ print STDERR ")\n";
+
print STDERR "\n";
$CL = new PerlACE::Process ("client", "-h");
@@ -78,10 +128,26 @@ for ($i = 0; $i <= $#ARGV; $i++) {
exit;
}
- elsif ($ARGV[$i] eq "-a") {
+ elsif ($ARGV[$i] eq "-tests") {
@test_types = split (',', $ARGV[$i + 1]);
$i++;
}
+ elsif ($ARGV[$i] eq "-rates") {
+ @rates = split (',', $ARGV[$i + 1]);
+ $i++;
+ }
+ elsif ($ARGV[$i] eq "-works") {
+ @works = split (',', $ARGV[$i + 1]);
+ $i++;
+ }
+ elsif ($ARGV[$i] eq "-workers") {
+ @workers = split (',', $ARGV[$i + 1]);
+ $i++;
+ }
+ elsif ($ARGV[$i] eq "-threads") {
+ @threads = split (',', $ARGV[$i + 1]);
+ $i++;
+ }
elsif ($ARGV[$i] eq "-o")
{
$extra_args .= " " . $ARGV[$i];
@@ -119,6 +185,11 @@ $fixed_client_args = "-w $work -t $time_for_test -z $max_throughput_timeout";
server => "-n 1",
},
{
+ description => "work",
+ server => "-s 3 -f 32767",
+# server => "-n 1",
+ },
+ {
description => "workers",
server => "-n 1",
},
@@ -150,6 +221,22 @@ $fixed_client_args = "-w $work -t $time_for_test -z $max_throughput_timeout";
description => "thread-lanes-decrease",
server => "-l three-lanes-with-best-effort -b three-bands-with-best-effort",
},
+ {
+ description => "work-pool-high",
+ server => "-s 3 -f 32767",
+ },
+ {
+ description => "work-pool-medium",
+ server => "-s 3 -f 21844",
+ },
+ {
+ description => "work-pool-low",
+ server => "-s 3 -f 10922",
+ },
+ {
+ description => "work-pool-zero",
+ server => "-s 3 -f 0",
+ },
);
for $test (@configurations)
@@ -159,11 +246,26 @@ for $test (@configurations)
#
if ($test->{description} eq "rates")
{
- for ($rate = $min_rate, $i = 0;
- $rate <= $max_rate;
- $rate += $rate_increment, $i += 1)
+ $i = 0;
+ for $rate (@rates)
{
$test->{clients}[$i] = "-r $rate $fixed_client_args";
+ $i++;
+ }
+
+ $test->{clients}[$i - 1] .= " -x 1";
+ }
+
+ #
+ # setup work test
+ #
+ elsif ($test->{description} eq "work")
+ {
+ $i = 0;
+ for $work (@works)
+ {
+ $test->{clients}[$i] = "-w $work -c 1 -r empty-file -t $time_for_test -z $max_throughput_timeout";
+ $i++;
}
$test->{clients}[$i - 1] .= " -x 1";
@@ -190,11 +292,11 @@ for $test (@configurations)
#
elsif ($test->{description} eq "work-nolanes")
{
- for ($work = $min_work, $i = 0;
- $work <= $max_work;
- $work += $work_increment, $i += 1)
+ $i = 0;
+ for $work (@works)
{
$test->{clients}[$i] = "-w $work -r increasing-rates -u 1000 -t $time_for_test -z $max_throughput_timeout";
+ $i++;
}
$test->{clients}[$i - 1] .= " -x 1";
@@ -205,11 +307,26 @@ for $test (@configurations)
#
elsif ($test->{description} eq "work-lanes-increase")
{
- for ($work = $min_work, $i = 0;
- $work <= $max_work;
- $work += $work_increment, $i += 1)
+ $i = 0;
+ for $work (@works)
{
$test->{clients}[$i] = "-w $work -r increasing-rates -t $time_for_test -z $max_throughput_timeout";
+ $i++;
+ }
+
+ $test->{clients}[$i - 1] .= " -x 1";
+ }
+
+ elsif ($test->{description} eq "work-pool-high" or
+ $test->{description} eq "work-pool-medium" or
+ $test->{description} eq "work-pool-low" or
+ $test->{description} eq "work-pool-zero")
+ {
+ $i = 0;
+ for $work (@works)
+ {
+ $test->{clients}[$i] = "-w $work -r rates -t $time_for_test -z $max_throughput_timeout";
+ $i++;
}
$test->{clients}[$i - 1] .= " -x 1";
@@ -220,11 +337,11 @@ for $test (@configurations)
#
elsif ($test->{description} eq "work-lanes-decrease")
{
- for ($work = $min_work, $i = 0;
- $work <= $max_work;
- $work += $work_increment, $i += 1)
+ $i = 0;
+ for $work (@works)
{
$test->{clients}[$i] = "-w $work -r decreasing-rates -t $time_for_test -z $max_throughput_timeout";
+ $i++;
}
$test->{clients}[$i - 1] .= " -x 1";
@@ -235,11 +352,11 @@ for $test (@configurations)
#
elsif ($test->{description} eq "thread-nolanes")
{
- for ($thread = $min_thread, $i = 0;
- $thread <= $max_thread;
- $thread += $thread_increment, $i += 1)
+ $i = 0;
+ for $thread (@threads)
{
$test->{clients}[$i] = "-c $thread -r increasing-rates -u 1000 $fixed_client_args";
+ $i++;
}
$test->{clients}[$i - 1] .= " -x 1";
@@ -250,11 +367,11 @@ for $test (@configurations)
#
elsif ($test->{description} eq "thread-lanes-increase")
{
- for ($thread = $min_thread, $i = 0;
- $thread <= $max_thread;
- $thread += $thread_increment, $i += 1)
+ $i = 0;
+ for $thread (@threads)
{
$test->{clients}[$i] = "-c $thread -r increasing-rates $fixed_client_args";
+ $i++;
}
$test->{clients}[$i - 1] .= " -x 1";
@@ -265,11 +382,11 @@ for $test (@configurations)
#
elsif ($test->{description} eq "thread-lanes-decrease")
{
- for ($thread = $min_thread, $i = 0;
- $thread <= $max_thread;
- $thread += $thread_increment, $i += 1)
+ $i = 0;
+ for $thread (@threads)
{
$test->{clients}[$i] = "-c $thread -r decreasing-rates $fixed_client_args";
+ $i++;
}
$test->{clients}[$i - 1] .= " -x 1";
diff --git a/TAO/performance-tests/RTCorba/Thread_Pool/server.cpp b/TAO/performance-tests/RTCorba/Thread_Pool/server.cpp
index 1588fe298fc..c962fedaae7 100644
--- a/TAO/performance-tests/RTCorba/Thread_Pool/server.cpp
+++ b/TAO/performance-tests/RTCorba/Thread_Pool/server.cpp
@@ -78,6 +78,8 @@ static const char *ior_output_file = "ior";
static CORBA::ULong static_threads = 1;
static CORBA::ULong dynamic_threads = 0;
static CORBA::ULong number_of_lanes = 0;
+static RTCORBA::Priority default_thread_priority = 0;
+static RTCORBA::Priority pool_priority = ACE_INT16_MIN;
static const char *bands_file = "empty-file";
static const char *lanes_file = "empty-file";
@@ -86,7 +88,7 @@ int
parse_args (int argc, char *argv[])
{
ACE_Get_Opt get_opts (argc, argv,
- "b:hl:n:o:s:" // server options
+ "b:f:hl:n:o:s:" // server options
"c:g:hi:j:k:m:p:q:r:t:u:v:w:x:y:z:" // client options
);
int c;
@@ -98,6 +100,10 @@ parse_args (int argc, char *argv[])
bands_file = get_opts.optarg;
break;
+ case 'f':
+ pool_priority = ACE_OS::atoi (get_opts.optarg);
+ break;
+
case 'l':
lanes_file = get_opts.optarg;
break;
@@ -139,6 +145,7 @@ parse_args (int argc, char *argv[])
ACE_ERROR_RETURN ((LM_ERROR,
"usage: %s\n"
"\t-b <bands file> (defaults to %s)\n"
+ "\t-f <pool priority> (defaults to %d)\n"
"\t-h <help: shows options menu>\n"
"\t-l <lanes file> (defaults to %s)\n"
"\t-n <number of lanes> (defaults to %d)\n"
@@ -147,6 +154,7 @@ parse_args (int argc, char *argv[])
"\n",
argv [0],
bands_file,
+ default_thread_priority,
lanes_file,
number_of_lanes,
ior_output_file,
@@ -199,11 +207,6 @@ main (int argc, char *argv[])
ACE_TRY_ENV);
ACE_TRY_CHECK;
- int result =
- parse_args (argc, argv);
- if (result != 0)
- return result;
-
fudge_priorities (orb.in ());
CORBA::Object_var object =
@@ -240,10 +243,15 @@ main (int argc, char *argv[])
ACE_TRY_ENV);
ACE_TRY_CHECK;
- RTCORBA::Priority default_thread_priority =
+ default_thread_priority =
current->the_priority (ACE_TRY_ENV);
ACE_TRY_CHECK;
+ int result =
+ parse_args (argc, argv);
+ if (result != 0)
+ return result;
+
CORBA::ULong stacksize = 0;
CORBA::Boolean allow_request_buffering = 0;
CORBA::ULong max_buffered_requests = 0;
@@ -266,13 +274,6 @@ main (int argc, char *argv[])
policies,
ACE_TRY_ENV);
ACE_TRY_CHECK;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- rt_orb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED,
- default_thread_priority,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
}
else if (ACE_OS::strcmp (lanes_file, "empty-file") != 0)
{
@@ -304,21 +305,18 @@ main (int argc, char *argv[])
if (result != 0)
return result;
-
- policies.length (policies.length () + 1);
- policies[policies.length () - 1] =
- rt_orb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED,
- default_thread_priority,
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
}
else
{
+ if (pool_priority == ACE_INT16_MIN)
+ pool_priority =
+ default_thread_priority;
+
RTCORBA::ThreadpoolId threadpool_id =
rt_orb->create_threadpool (stacksize,
static_threads,
dynamic_threads,
- default_thread_priority,
+ pool_priority,
allow_request_buffering,
max_buffered_requests,
max_request_buffer_size,
@@ -339,6 +337,13 @@ main (int argc, char *argv[])
ACE_TRY_ENV);
ACE_TRY_CHECK;
+ policies.length (policies.length () + 1);
+ policies[policies.length () - 1] =
+ rt_orb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED,
+ default_thread_priority,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
PortableServer::POA_var poa =
root_poa->create_POA ("RT POA",
poa_manager.in (),