Hi
Jerry,
Firstly, the kernel is not a process in the
conventional sense. It is basically a set of library functions. One of these is
the scheduler, which gets called every time slice, by the timer in the hardware,
in order to decide which actual process to run next. Responding to interrupts is
the only way in which a kernel could be considered to be running. The kernel
exists to provide services to processes, every time a process makes a "system
call", for example to perform I/O, this is invoking a function within the kernel
to actually "do" it - i.e. an application might call read() then read() in the
kernel would handle the business of talking to the device driver and actually
doing the reading of the data from the disk (for example).
The
CPU states line is showing you *where* the code is running. If it's in "user"
then the CPU is spending its time running code in "user land" - probably
computational code, stuff that's actually in the application. If the state is
"kernel", then it means that your application is making lots of system calls,
and the kernel level routines are doing the work.
Incidentally, this is why Java is a good language on
the server - it does much of its real work in fast kernel space, and little of
it in the slow virtual machine. A busy Oracle will also spend a bit of time in
kernel space, doing I/O and networking, accessing shared memory, etc.
Looking at your "top" output, you have a high system
load, but your user processes aren't using much CPU, but kernel time is high.
This suggests that your processes are spending time waiting for the kernel to do
something or other for them, load being the size of the run queue (all the
processes that are ready to run but not actually on the CPU). Are you actually
experiencing performance problems? If so, you need to look at what the system is
doing using "sar" "vmstat" and "iostat". One thing to watch out for is that
"top" is a primitive tool. Notice how large all your Oracle processes are? That
is because top isn't smart enough to realize that they're all connected to
shared memory, it's counting each one as being process size + SGA. So your
processes and your memory in use don't add up. Also top deals poorly with LWPs
(threads) - are you using MTS? You could simply be seeing threads stacking up as
they wait for network.
HTH,
g
-----Original Message-----
From: Jerry C [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 28, 2001 4:20 PM
To: Multiple recipients of list ORACLE-L
Subject: OT : kernel using 75% of CPUHi there,I have a Sun e4500, running Solaris 2.7 and Oracle 8.1.7.1.0. Everything looks normal from a database perspective, but when I run "top" it show the kernel being very hog-like:load averages: 14.38, 15.18, 15.18 07:16:21
126 processes: 118 sleeping, 4 running, 4 on cpu
CPU states: 0.6% idle, 26.6% user, 72.8% kernel, 0.0% iowait, 0.0% swap
Memory: 4096M real, 63M free, 216M swap in use, 5310M swap freePID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
2286 oracle 1 0 0 1844M 1814M run 9:44 13.90% oracle
11068 oracle 1 0 0 2056K 1536K cpu0 0:02 1.53% top
11333 oracle 1 0 0 1150M 1124M cpu1 0:01 1.39% oracle
5944 oracle 1 40 0 1820M 1789M sleep 14:40 1.36% oracle
4797 root 1 50 0 2112K 1248K sleep 6:01 1.36% top
11346 oracle 1 0 0 110M 92M cpu0 0:01 1.26% oracle
11114 oracle 1 0 0 1009M 984M cpu1 0:00 0.66% oracle
11157 oracle 1 0 0 1009M 984M run 0:00 0.63% oracle
11368 oracle 1 33 0 1794M 1765M sleep 0:00 0.29% oracle
19558 oracle 1 60 0 1797M 1751M sleep 78:28 0.28% oracle
19554 oracle 1 60 0 1794M 1751M sleep 38:05 0.20% oracle
11366 oracle 1 55 0 1793M 1763M sleep 0:00 0.19% oracle
11292 oracle 1 26 2 2008K 1424K run 0:00 0.19% dsqlAny ideas on what I, as a lowly DBA, would be able to check? It's a bit out of my area and I'm stumped...Thanks!Jerry
