Re: CPU usage problems when using KAIO in V7.3? on SINIX.
Posted in 1999
In article <7ulh6m$unq$1@snoopy.inftec.be>, Mike Aerts <mike@inftec.be>
writes
>I agree that there is some work at the level of oninit to
>do some comparisons which acount for about 30% of the user
>time but the 70% of system time is simply due to the fact
>the number of times kaiopoll is called.
>I'm under the impression that when the kaiopoll is called in
>a non blocking way and when no data is available from the disk I/O
>they just call kaiopoll again.
>And this just burns CPU cycles in a Windows way not a Unix way. ;-)
>
>In a multi CPU environment this is not such a problem
>as you can decide to give up one CPU to handle the
>KAIO calls, although I'm not 100% sure these calls are only
>used by the first oninit process.
>
>In a single CPU environment the usage of Asynchronous Kernel I/O
>drains too much CPU power from the other client processes IMHO.
>
Hmmmm, what if ALL client processes are waiting for disk I/O.
Disk is 100 times slower than CPU. If the clients are ALL waiting
for the disk then continously polling makes sense since the CPU
is otherwise not achiveing anything and the more often you poll
the quick you notice than a disk I/O is complete...
>One supplementary question : Am I the only one encountering this?
>>
>> [SNIP]
>>
>>>I'm open to all suggestions and requests for further information and tests.
>>
Check the FAQ but on HP-UX Informix used 3 KAIO methods, the latest
being the most efficient, I think the second was continuous polling.
Certainly polling appears and it was not the final solution. The final
solution involved using select() which signals the process when it I/O
is complete.
>
>> onstat -p>
>Informixx Dynamic Server Version 7.31.UC2 -- On-Line -- Up 00:06:37 -
> 76384 Kbytes
>
>Profile
>dskreads pagreads bufreads %cached dskwrits pagwrits bufwrits %cached
>90536 88898 93259 2.92 13 8 3 0.00
>
>isamtot open start read write rewrite delete commit rollbk
>92546 41 434 91244 0 0 0 0 0
>
>gp_read gp_write gp_rewrt gp_del gp_alloc gp_free gp_curs
>0 0 0 0 0 0 0
>
>ovlock ovuserthread ovbuff usercpu syscpu numckpts flushes
>0 0 0 28.87 64.14 1 4
>
>bufwaits lokwaits lockreqs deadlks dltouts ckpwaits compress seqscans
>9 0 181 0 0 0 0 2
>
>ixda-RA idx-RA da-RA RA-pgsused lchwaits
>2 0 0 2 0
>
>This is the profile taken during the test where the query
>reads every active page from all chunks so the value
>for %cached is normal.
>RA-pgsused is less normal but yes its KAIO.
>
>> onstat -R>
>Informix Dynamic Server Version 7.31.UC2 -- On-Line -- Up 00:07:11 --
>76384 Kbytes
>
>8 buffer LRU queue pairs priority levels
># f/m pair total % of length LOW MED_LOW MED_HIGH HIGH
> 0 f 876 100.0% 876 0 579 293 4
> 1 m 0.0% 0 0 0 0 0
> 2 f 876 100.0% 876 0 577 290 9
> 3 m 0.0% 0 0 0 0 0
> 4 f 876 100.0% 876 0 578 291 7
> 5 m 0.0% 0 0 0 0 0
> 6 f 876 100.0% 876 0 610 263 3
> 7 m 0.0% 0 0 0 0 0
> 8 f 874 100.0% 874 0 602 270 2
> 9 m 0.0% 0 0 0 0 0
>10 f 874 100.0% 874 0 611 258 5
>11 m 0.0% 0 0 0 0 0
>12 f 874 100.0% 874 0 584 282 8
>13 m 0.0% 0 0 0 0 0
>14 F 874 100.0% 874 0 595 269 10
>15 m 0.0% 0 0 0 0 0
>0 dirty, 7000 queued, 7000 total, 8192 hash buckets, 2048 buffer size
>start clean at 60% (of pair total) dirty, or 525 buffs dirty, stop at 50%
>0 priority downgrades, 0 priority upgrades
>
>> onstat -F>
>
>Informix Dynamic Server Version 7.31.UC2 -- On-Line -- Up 00:07:24 --
>76384 Kbytes
>
>
>Fg Writes LRU Writes Chunk Writes
>0 0 3
>
>address flusher state data
>24314504 0 I 0 = 0X0
>243149f0 1 I 0 = 0X0
> states: Exit Idle Chunk Lru
>
>>
>> $INFORMIXDIR/etc/$ONCONFIG
>
>Configuration File: /opt/lib/informix/etc/rmsanoisa.conf
>#**************************************************************************
>#
># INFORMIX SOFTWARE, INC.
>#
># Title: onconfig.std
># Description: Informix Dynamic Server Configuration Parameters
>#
>#**************************************************************************
>
># Root Dbspace Configuration
>
>ROOTNAME rootdbs # Root dbspace name
>ROOTPATH /infor/d01part00 # Path for device containing root dbspace
>ROOTOFFSET 0 # Offset of root dbspace into device (Kbytes)
>ROOTSIZE 300000 # Size of root dbspace (Kbytes)>
># Disk Mirroring Configuration Parameters
>
>MIRROR 1 # Mirroring flag (Yes = 1, No = 0)
>MIRRORPATH /infor/d02part00 # Path for device containing mirrored root
>MIRROROFFSET 0 # Offset into mirrored device (Kbytes)>
># Physical Log Configuration
>
>PHYSDBS rootdbs # Location (dbspace) of physical log
>PHYSFILE 20000 # Physical log file size (Kbytes)>
># Logical Log Configuration
>
>LOGFILES 6 # Number of logical log files
>LOGSIZE 20000 # Logical log size (Kbytes)>
># Diagnostics
>
>MSGPATH /usr/users/informix/rmsano.log
>CONSOLE /usr/users/informix/rmsano.con # System console message path
>ALARMPROGRAM /opt/lib/informix/etc/log_full.sh # Alarm program path
>SYSALARMPROGRAM /opt/lib/informix/etc/evidence.sh # System Alarm program path
>TBLSPACE_STATS 1>
># System Archive Tape Device
>
>TAPEDEV /dev/ios0/rstape006chn # Tape device path
>TAPEBLK 64 # Tape block size (Kbytes)
>TAPESIZE 4000000 # Maximum amount of data to put on tape (Kbytes)>
># Log Archive Tape Device
>
>LTAPEDEV /dev/ios0/rstape006chn # Tape device path
>LTAPEBLK 64 # Log tape block size (Kbytes)
>LTAPESIZE 4000000 # Max amount of data to put on log tape (Kbytes)>
># Optical
>
>STAGEBLOB # Informix Dynamic Server/Optical staging area
>
># System Configuration
>
>SERVERNUM 0 # Unique id corresponding to a Dynamic Server>instance
>DBSERVERNAME rmsanoisashm # default database server
>DBSERVERALIASES rmsanoisatcp #