Re: HELP: MEANING OF onstat -g sch output
Posted in 1997
Edward Bidinotto wrote:
>
> Can anyone explain what the output on onstat -g sch means especially the
> column
> "busy waits"? Does a high number in that column mean that the vp is
> staying busy
> or that it is staying idle?
>
> We need to find out from the following output if we need to add cpuvps
> or delete
> also if we need to delete aiovps or add them.
>
> It is so confusing and Informix Tech Support is no help at all......
>
> Thanks in advance.
>
> INFORMIX-OnLine Version 7.11.UC1 -- On-Line -- Up 01:13:41 -- 578280
> Kbytes
>
> VP Scheduler Statistics:
>
> vp pid class semops busy waits
> spins/wait
> 1 2476 cpu 43651 44160
> 9952
> 2 2510 adm 0
> 0 0
> 3 2513 cpu 41192 41627
> 9955
> 4 2514 cpu 39627 40069
> 9953
> 5 2516 cpu 37104 37458
> 9964
> 6 2522 lio 939
> 0 0
> 9 2523 msc 4369
> 0 0
> 8 2524 aio 21318
> 0 0
> 10 2525 aio 17915
> 0 0
> 7 2526 pio 333
> 0 0
> 13 2527 shm 17 19
> 918
> 11 2528 aio 12682
> 0 0
> 12 2529 aio 9731
> 0 0
> 14 2530 shm 8 10
> 865
> 15 2531 soc 0
> 0 0
> 16 2532 soc 0
> 0 0
> 17 2533 soc 0
> 0 0
> 18 2534 soc 0
> 0 0
I asked this same question of our Tech Support here in the UK. It took
them a few days (but it wasn't high priority anyway), but they came
back with this:
"When a CPU VP finds no thread to run, the process performs a 'busy
wait'. It is a loop of instructions designed to wait a short time. The
idea is that 1) a thread may become eligible to run very soon, sooner
than any system call to wait could return, and 2) there is no other more
useful work to perform. "Spins" refers to the number of loops in a busy
wait.
So the busy wait count is the number of times the VP was looking for a
thread and found none. Spins is the number of times through the busy
wait loop. Note that if a thread becomes runnable before the busy wait
loop count expires, then the VP breaks out of the loop and runs the
eligible thread.
If the busy wait loop is executed n times, then the VP waits using a
semaphore. Only when a runnable thread is available will the VP be
awakened to run it. In onstat -g sch, the semops record the number
of times this final step is taken."
So, from your output I would say your system isn't too busy.
vp pid class semops busy waits spins/wait
1 2476 cpu 43651 44160 9952
2 2510 adm 0 0 0
3 2513 cpu 41192 41627 9955
4 2514 cpu 39627 40069 9953
5 2516 cpu 37104 37458 9964
Your CPU VPs are entering a busy wait because there is no activity and
"spinning" nearly
10000 times per wait. This means that 99 % of the time, no thread
requires servicing
before the wait loop of 10,000 is up. Another guide is that if the busy
wait reaches
10,000 loops it will progress to a semop. As can be seen, using VP 1 as
an example,
44160 busy waits occurred, leading to 43651 semops, ie, no work to
process.
Ideally, if there are busy waits, then spins/wait and semops should both
be low. This
means that the system is busy, but has time to service waiting threads
as soon as they
arrive. It also means the VP UNIX process isn't seen as idle by UNIX.
Hope this helps,
--
Rick Ward
Senior DBA
Great Universal Stores Home Shopping
MANCHESTER, UK
All views and comments in this e-mail are expressed by myself only, and
are not necessarily representative of my employer, Great Universal
Stores.