Hi,
On 2016-05-26 10:37, Nathan Scott wrote:
> ----- Original Message -----
>> [...]
>> so I can't see how to improve this. Thus your suggestion to make these
>> two clusters opt-in is probably the most feasible solution at least in
>> the short-term. Here oracle.object_cache will be ignored but I can try
>> to see how things work after enabling oracle.file.
>
> My main QA machine is in the late stages of dying unfortunately, so I've
> not finished QA on this change yet - but, here's a pmdaoracle.pl patch to
> try out in the meantime. (see $disable_object_cache & $disable_filestat)
Thank you very much - now after disabling object cache in the configuration
file ./Install works as expected and "time pminfo -f oracle > /dev/null"
reports time between 2.7-3.6s under medium load.
Below is a trivial patch to keep connect.pl in sync (all the variables
need to be defined before eval) and tidy up reporting a bit.
With these two patches I think we're in decent shape here.
PS. I noticed this in QA 023, looks like a typo?
-e '/cmd=\/usr\/pcp\/lib\/pmdaoracle7/d' \
---
src/pmdas/oracle/connect.pl | 10 +++++++---
src/pmdas/oracle/sample.conf | 1 +
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/pmdas/oracle/connect.pl b/src/pmdas/oracle/connect.pl
index 9d21f5b..a889407 100755
--- a/src/pmdas/oracle/connect.pl
+++ b/src/pmdas/oracle/connect.pl
@@ -24,6 +24,8 @@ my $password = 'manager';
my $host = 'localhost';
my $port = '1521';
my @sids = ( 'master' );
+my $disable_filestat = 0;
+my $disable_object_cache = 0;
# Configuration files for overriding the above settings
for my $file ( '/etc/pcpdbi.conf', # system defaults (lowest priority)
@@ -49,18 +51,20 @@ if (defined($ARGV[0]) && ($ARGV[0] eq '-c' || $ARGV[0] eq
'--config')) {
}
chop($sidstr);
print("sids=$sidstr\n");
+ print("disable_filestat=$disable_filestat\n");
+ print("disable_object_cache=$disable_object_cache\n");
exit(0);
}
my $status = 0;
foreach my $sid (@sids) {
print("Attempting Oracle login SID=$sid ... ");
- my $db = DBI->connect("dbi:Oracle:host=$host;port=$port;sid=$sid",
$username, $password);
+ my $db = DBI->connect("dbi:Oracle:host=$host;port=$port;sid=$sid",
$username, $password, { PrintError => 0});
if (defined($db)) {
$db->disconnect();
- print("OK\n");
+ print("ok.\n");
} else {
- print("Failed\n%s", $DBI::errstr);
+ printf("failed!\n%s\n", $DBI::errstr);
$status = 1;
}
}
diff --git a/src/pmdas/oracle/sample.conf b/src/pmdas/oracle/sample.conf
index 6502c8b..8e3a645 100644
--- a/src/pmdas/oracle/sample.conf
+++ b/src/pmdas/oracle/sample.conf
@@ -1,6 +1,7 @@
$username = 'oastoltp';
$password = 'oastoltp';
@sids = ( 'oast1' );
+$disable_object_cache = 1;
# this is to get LD_LIBRARY_PATH set at pmdaoracle start,
# which is required to correctly resolve shared libraries
Thanks,
--
Marko Myllynen
|