What is maxreqs parameter in AIX?

Hello gentlemen,

I am running Aix 5.3 and Oracle 9.1;

What is the parameter "maxreqs" in Aix?

# lsattr -E -l aio0 -a maxreqs
maxreqs 4096 Maximum number of REQUESTS True;

Last night our database was down. Someone was telling it was due to maxreqs was full.

Question to gentlmen what is the maxreqs used for?

And is there any way to monitor whether the AIO maxreqs is going to full. And what step I can take to avoid this?

Cheers,
Purple

It is the current maximum of asynchronous I/O requests that can be either waiting to be processed or are currently processed.

There is an explicit ORA error message (I forgot the error code) that can be searched on Metalink or in Oracle documentation, that points that this threshold has been hit and should be raised.

Usually on older versions of AIX this is per default 4096, I think from AIX 6 on it is 16384.
It is definetly a parameter that could and should be set to a higher values. That is why they have set the default value in AIX 6 to a 4 times higher value.

You can monitor this with

> iostat -A 1 | awk '/avg/ {if(x!=1){print; getline; print; x=1}else{getline; print}}'
aio: avgc avfc maxgc maxfc maxreqs avg-cpu: % user % sys % idle % iowait
     1624.1  0.0   349     0    32768            31.4  11.6   45.8     11.2
     908.0  0.0     7     0    32768            32.1  11.1   50.6      6.2
     1565.7  0.0   263     0    32768            41.3  15.7   34.5      8.5
     1408.0  0.0   316     0    32768            34.2  12.8   45.5      7.5
     1055.0  0.0    49     0    32768            36.6  13.5   41.7      8.2
     1818.3  0.0   290     0    32768            31.3  12.1   46.8      9.9

From the man page of iostat:

Asynchronous I/O report

       The asynchronous I/O report has the following column headers :
       avgc
            Average global AIO request count per second for the specified interval.
       avfc
            Average fastpath request count per second for the specified interval.
       maxgc
            Maximum global AIO request count since the last time this value was fetched.
       maxfc
            Maximum fastpath request count since the last time this value was fetched.
       maxreqs
            Maximum AIO requests allowed.
1 Like

I agree with zaxxon - this is the very well known ora600 error :slight_smile: When we were running into it, IBM recommended to set the value on all our 5.3 servers to 65536 - we did it and never faced that error again :slight_smile:

Regards
zxmaus

Quit informative reply from you gentlemen.

well, how to bump up the "maxreqs" value to 65536. By which command?

Do I need to restart the Aix and Oracle dbase after changing the value?

Hi.

You can set it using chdev.

Tuning aio0 (AIX)

PS: zxmaus is a lady :wink:

.... and also one of our most valuable forum members!

Hello guys,

I have incresed the maxreqs value to 16384 which is 4 times than 4096;

I am getting the out of

# iostat -A 1 | awk '/avg/ {if(x!=1){print; getline; print; x=1}else{getline; print}}'

aio: avgc avfc maxg maif maxr avg-cpu: % user % sys % idle % iowait
        0    0    4 4040 16384             2.2   0.7   97.1      0.0
        0    0    0    2 16384             8.9   1.0   90.1      0.0
        0    0    0   66 16384             4.8   1.6   93.4      0.2
        0    1    0    5 16384             1.5   0.5   98.0      0.0
        0    0    0    2 16384             3.2   1.2   95.6      0.0

Does it mean currently there is no AIO request processing as "avgc" is 0 ? May be i am interpreting wrongly. I would like to observe current aio request processed by maxreqs

your kind help please.

Right, there is no AIO requests at the time this is taken. Is your AIO enabled? Is the DB actually up and running, having traffic?

lsdev -C| grep aio
aio0           Available               Asynchronous I/O (Legacy)
posix_aio0     Available               Posix Asynchronous I/O

AIX offers two AIO subsystems, Legacy AIO (aio0) and Posix AIO (posix_aio0). Oracle uses Legacy AIO which is represented by the device aio0. But I found a note here:
Administering Oracle Database on AIX

As you said you are using Oracle 9.1 so maybe it will try to use posix_aio0. The tuning tips so far were considering aio0 so you might have to tune posix_aio0 as well. Anyway it seems currently is no AIO traffic there anyway.

Maybe this link is interessting for you too:
pSeries and AIX Information Center

The commands to check aio utilization are

# pstat -a | grep -c aios
# ps -k | grep aioserver

make sure that you are allowing oracle to really use async io by checking that
disk_async_io = true and filesystemio_options = async or setall

BTW - oracle recommends that you either systemwide (/etc/environment) or at least in the oracle profile set AIXTHREAD_SCOPE=S - what will reduce the memory utilization of oracle processes a lot.

Kind regards
Nicki

Just to add some info to zxmaus' - those 2 commands show the number off current running AIO-servers (legacy I think). It does not necessary mean that they are being used at the moment. Once started from a peak of workload for example, they stay running until a reboot.
To see how many are currently running, you can use nmon. When starting it interactively, you can press a+shift and get something like:

 Asynchronous-I/O-Processes 
 Total AIO processes=1100 Actually in use=  35  CPU used=  15.7%    [Use zero                                                                  
       All time peak=1100     Recent peak=  44      Peak=  15.7%     to reset]       

For the number of current AIO-requests, iostat -A will show as written (don't know another way tbh^^).