1844834 Members
4541 Online
110233 Solutions
New Discussion

spining process

 
SOLVED
Go to solution
jerry1
Super Advisor

spining process

Does anyone know why a process would do so many
gettimeofday system calls? It's using up 99% of
the CPU. For every read of this Oracle process there are about 4-6 gettimeofday system calls. Seems excesive. truss snapshot output below.

1616: gettimeofday(0x7bff4838, NULL) = 0
1616: gettimeofday(0x7bff4938, NULL) = 0
1616: gettimeofday(0x7bff4938, NULL) = 0
1616: gettimeofday(0x7bff4878, NULL) = 0
1616: gettimeofday(0x7bff4978, NULL) = 0
1616: gettimeofday(0x7bff4978, NULL) = 0
1616: read(25, "\b02\0\0\0c04 d3b8X ~ 84069401\b".., 524288) = 524288
1616: gettimeofday(0x7bff48b8, NULL) = 0
1616: gettimeofday(0x7bff48b8, NULL) = 0
1616: gettimeofday(0x7bff4978, NULL) = 0
1616: gettimeofday(0x7bff4978, NULL) = 0
1616: read(25, "\b02\0\0\0c05 13b8X ~ 84069401\b".., 8192) = 8192
1616: gettimeofday(0x7bff4838, NULL) = 0
1616: gettimeofday(0x7bff4938, NULL) = 0
1616: gettimeofday(0x7bff4938, NULL) = 0
1616: gettimeofday(0x7bff4878, NULL) = 0
1616: gettimeofday(0x7bff4978, NULL) = 0
1616: gettimeofday(0x7bff4978, NULL)

8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: spining process

Have you made modifications to /etc/inititab

Perhaps something is getting spawned rapidly.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
jerry1
Super Advisor

Re: spining process

No, this is a user trying to run an oracle
process.

PU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
5 ? 1616 bob1 152 20 577M 5488K run 37:31 85.60 85.45 oracleb1
0 ? 4860 bob1 152 20 577M 5088K run 28:10 85.00 84.85 oracleb1
6 ? 26551 oracle 152 24 573M 1776K run 1:37 1.66 1.66 oracleb1
9 ? 45 root 152 20 14464K 14464K run 28:11 1.50 1.50 vxfsd
8 ? 1809 root 154 10 15252K 11924K sleep 24:10 1.43 1.43 diagmond

James A. Donovan
Honored Contributor
Solution

Re: spining process

Just a guess, but the database process is probably polling/sleeping while data is being retrieved from the database. The underlying cause of the problem may be poorly tuned SQL code. (I find that 99% of all database performance issues are SQL tuning isssues...)
Remember, wherever you go, there you are...
Michael Steele_2
Honored Contributor

Re: spining process

I've only seen this type of behavior when the 'sleep' command was used in an infinite loop. For example:

while :
do
echo HELLO
sleep 5
done
Support Fatherhood - Stop Family Law
Elmar P. Kolkman
Honored Contributor

Re: spining process

Seems like the active database query contains a lot of calculations on SYSDATE... Perhaps something like a select with multiple comparisons with SYSDATE or something like that (since it only does reads in your snippet, no writes)...
Every problem has at least one solution. Only some solutions are harder to find.
T G Manikandan
Honored Contributor

Re: spining process

To me it looks like the user is collecting lot of metrics on the oracle instance could be metrics taken out for performance.

check whether you have got TIMED_STATISTICS set to TRUE in the instance startup file.

REvert
T G Manikandan
Honored Contributor

Re: spining process

Found a doc on the metalink

check the attache
jerry1
Super Advisor

Re: spining process

Thank you all for your inputs. The docs at
metalink help us in the right direction.
We had an old version of oracle listener
running after the upgrade to 8.1.7.
The process output from above is from an
SQL connection which we are looking into
doing some performance tunning.
TIME_STATISTICS is set to yes but we cannot change it at this point.