473,382 Members | 1,290 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

High Execution Time--Low CPU time for statements

Scenario: new functionality was recently deployed in a 3-tier business
application. Since deployment, CPU use has shot up to very high
levels.

Using event monitors to try to track down the culprits hasn't fingered
any bad query in particular who's hogging CPU. One interesting anomaly
is that there is a single type of query that averages 70 seconds of
real time (with highs of 100-300 seconds) while expending zero seconds
of CPU. The query in question takes the form "SELECT * FROM TABLE
WHERE COLUMN = 'VALUE'" where the value is the first element in the
primary key. (The other part of key is a sequence number--with an
average of 2 rows for each main value.) We suspected waiting on locks
at first, but none of our attempts to monitor locking through snapshot
monitor has really shown anything conclusive.

Our suspicion is that if we can figure out what's causing the high
execution times for this query, will probably get us to the solution
of high CPU utilization. Does anyone have any suggestions for tracing
this other than event monitors (for statements and deadlocks) snapshot
monitors for locks?

Platform is 7.2 FP 8 on AIX 4.3

Thanks,
Evan
Nov 12 '05 #1
3 2816
Do you have multiple requestors (different hardware boxes) going after
the database concurrently? I would normally expect this in a multi-tier
environment. A simple example would be two web servers, sharing a
request load, each directly accessing the same database.

Phil Sherman
Evan Smith wrote:
Scenario: new functionality was recently deployed in a 3-tier business
application. Since deployment, CPU use has shot up to very high
levels.

Using event monitors to try to track down the culprits hasn't fingered
any bad query in particular who's hogging CPU. One interesting anomaly
is that there is a single type of query that averages 70 seconds of
real time (with highs of 100-300 seconds) while expending zero seconds
of CPU. The query in question takes the form "SELECT * FROM TABLE
WHERE COLUMN = 'VALUE'" where the value is the first element in the
primary key. (The other part of key is a sequence number--with an
average of 2 rows for each main value.) We suspected waiting on locks
at first, but none of our attempts to monitor locking through snapshot
monitor has really shown anything conclusive.

Our suspicion is that if we can figure out what's causing the high
execution times for this query, will probably get us to the solution
of high CPU utilization. Does anyone have any suggestions for tracing
this other than event monitors (for statements and deadlocks) snapshot
monitors for locks?

Platform is 7.2 FP 8 on AIX 4.3

Thanks,
Evan


Nov 12 '05 #2
There are multiple requestors. There are 3 web servers talking to 3
application servers which in turn, each have a connection pool to a single
database in which connections are reused by different threads. All
transactions are done with auto-commit, so we don't expect any big
transactions with wide windows of exposure.

In this particular scenario, the items which are experiencing high execution
times are queries with a highly selective predicate, so we don't expect
large numbers of rows to be locked (one row usually, sometimes two).

This is a mature application which hasn't experienced anything out of the
ordinary as far as this goes. We would get a deadlock once in a blue moon
before with extremely high volume, but now it's rampant. With a continous
snapshot for locks monitor running, we see a little bit of lock wait on a
different resource, but that generally clears itself up by the next snapshot
a few seconds later. We are pretty sure it's a problem somewhere in the new
modules deployed, but are just having a bear of a time trying to pin it
down.

A side question here. Does waiting on locks burn a lot of CPU?

Thanks,
Evan

"Philip Sherman" <ps******@ameritech.net> wrote in message
news:FC***************@newssvr19.news.prodigy.com. ..
Do you have multiple requestors (different hardware boxes) going after
the database concurrently? I would normally expect this in a multi-tier
environment. A simple example would be two web servers, sharing a
request load, each directly accessing the same database.

Phil Sherman

Nov 12 '05 #3
Where's the high cpu? UDB server? Application server? Web server? Does
your application use dynamic SQL or bound plans? If bound; what
language? All of these can supply clues to help resolve this type of
problem.

You may need to run some statement traces and perform a bit of analysis
on them to determine the culprit.

Phil Sherman
Evan Smith wrote:
There are multiple requestors. There are 3 web servers talking to 3
application servers which in turn, each have a connection pool to a single
database in which connections are reused by different threads. All
transactions are done with auto-commit, so we don't expect any big
transactions with wide windows of exposure.

In this particular scenario, the items which are experiencing high execution
times are queries with a highly selective predicate, so we don't expect
large numbers of rows to be locked (one row usually, sometimes two).

This is a mature application which hasn't experienced anything out of the
ordinary as far as this goes. We would get a deadlock once in a blue moon
before with extremely high volume, but now it's rampant. With a continous
snapshot for locks monitor running, we see a little bit of lock wait on a
different resource, but that generally clears itself up by the next snapshot
a few seconds later. We are pretty sure it's a problem somewhere in the new
modules deployed, but are just having a bear of a time trying to pin it
down.

A side question here. Does waiting on locks burn a lot of CPU?

Thanks,
Evan

"Philip Sherman" <ps******@ameritech.net> wrote in message
news:FC***************@newssvr19.news.prodigy.com. ..
Do you have multiple requestors (different hardware boxes) going after
the database concurrently? I would normally expect this in a multi-tier
environment. A simple example would be two web servers, sharing a
request load, each directly accessing the same database.

Phil Sherman



Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ina Schmitz | last post by:
Hi all, I would like to get the total execution time and the cpu time of a query execution. For that purpose, I think SNAP_GET_DYN_SQL is the correct table function. But SNAPSHOT_DYN_SQL...
1
by: Gregor Kovač | last post by:
Hi! I have a problem. :) I have a big SQL statement with about 20 LEFT JOINS. When I run explain on it it gives me a total cost of about 500, but when I run the query it runs for about two...
1
by: neoswf | last post by:
hi guys im looking for a tool that will test my website execution/render time, OFFLINE. im working local on my computer, and i wish to know my rebuilded website time improvment. thank you guys...
14
by: Michel Esber | last post by:
Linux RH 4.0 running DB2 V8 FP 11. I have a table with ~ 11M rows and running DELETE statements is really slow. Deleting 1k rows takes more than 3 minutes. If I run select statements on the same...
12
by: Joachim Pense | last post by:
Is there recommended way to get the execution plan for queries involving global temporary tables (from the UNIX command line or within a script)? I run the queries in Perl scripts, and the only...
40
by: kavi | last post by:
Hello friends, Could any one tell the way of calculating the speed of c program execution?
9
by: Shuan | last post by:
I am getting this error. Can it be fixed by setting more than 60 for the max_execution_time in php.in file? Fatal error: Maximum execution time of 60 seconds exceeded in categorycrawler.php on...
1
by: arthy | last post by:
Hi, Is it possible to execute multiple statements on to the database using a single dbconnection object.what is the drawback in using .If not possible ,then how can the execution of multiple...
4
by: Mohd Khan | last post by:
For example, can we execute the following script a = 4 b = 3 k = 4 * c c = a + b print k without getting a name error(since c is defined in the 4th line but called for in the 3rd line) i.e....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.