Here is a quick and easy way to tell if you have not allocated enough aioservers on your AIX 5.3 system. First you want to check how many you have configured currently:
$ lsattr -El aio0
autoconfig available STATE to be configured at system restart True
fastpath enable State of fast path True
kprocprio 39 Server PRIORITY True
maxreqs
12288 Maximum number of REQUESTS
True
maxservers
120 MAXIMUM number of servers per cpu
True
minservers
80 MINIMUM number of servers
True
The ‘maxservers’ setting on a 4 CPU system would give you a maximum
count of 480 aioserver kernel threads. If SMT is enabled - which makes
it appear as if each CPU is 2 CPUs - the maximum number of aioserver
kernel threads would be 960 (480 * 2). You can check to see if SMT is
enabled as root by using the smtctl(5)
command - you can also
enable or disable it with the same command. If you don’t have root
access, you can also find out by using the lparstat
command, seen below from a 4way LPAR:
$ lparstat
System configuration: type=Dedicated mode=Capped smt=On
lcpu=8
mem=16384
The ‘minservers’ setting is the total number of aioserver kernel
threads that will start at boot - this is not a per CPU or per logical
CPU value.
The ‘maxreqs’ setting is the maximum number of outstanding
or pending requests that the kernel will allow at any one time.
aioserver kernel threads do not go away once started, until the
system reboots. So, you can tell how many your applications have
requested/required concurrently since boot by using the ps command:
$ ps -ek | grep aioserver | grep -v posix_aioserver | wc -l
960
It appears that all 960 aioservers have been started, so sometime
between when the system booted and this very instant, something needed
all of them - and possibly more
. The ‘-k’ argument to the ps
command lists kernel threads (also known as kprocs) in addition to user-space processes.
Another test is to see how much CPU time each of the aioserver. If
all of the aioserver threads have a very similar amount of CPU time,
and if the amount of CPU time consumed is significant - chances are you
need to configure more of them. Depending on how long the OS has been
running, you may need to add quite a few more.
$ ps -ek | grep aioserver | more
118880 - 1:31
aioserver
127062 - 1:32
aioserver
…
You can change the AIO parameters for your system with the chdev
command on the aio0
pseudo-device, or by running smitty aio
on AIX 5.3 systems - you can even use the poorly documented aioo
command. An important thing to remember though - is that you can set the values online, with no interruption of service - BUT
- they will not take affect until the next time the kernel is booted.
Some additional documentation is available at the locations below: