|
|
sybperl-l Archive
Up Prev Next
From: "Wen-Tsau Chiu" <wchiu at SYBASE dot COM>
Subject: DBI Performance Problem
Date: Jun 26 2000 11:50PM
We have a customer using DBI to connect to Sybase.
The customer is using Apache and calls Perl program to
retrieve the data from Sybase ASE.
If we run the query in ASE, the response is quite fast.
But when 100 perl cients enter into Sybase, the CPU for ASE
go up to 100%.
The sample output of sp_who is such.
0 7 sleeping nobody nobody 0 prod
SELECT
0 8 runnable nobody nobody 0 prod
SELECT
0 9 runnable nobody nobody 0 prod
SELECT
0 10 runnable nobody nobody 0 prod
SELECT
.......................... A lot of processes
0 111 sleeping nobody nobody 0 prod
SELECT
0 112 runnable nobody nobody 0 prod
SELECT
0 113 runnable nobody nobody 0 prod
SELECT
0 116 runnable nobody nobody 0 prod
SELECT
We have change the Sybase ASE to two engine. The two CPU go up to 100% in
short time.
We suspect ASE is busy communicate with the perl clients. For some reason,
the perl
clients just won't respond to the ASE.
The customer is using
$row=$dbh->selectrow_array($qr)
to retrieve the data. After the query, perl program uses $dbh->disconnect
to exit from Sybase ASE.
I am considering to add
$sth=$dbh->childs;
$sth->finish;
right after the queries.
Is it right?
Wen-Tsau
wchiu@sybase.com
|