IBM Support

IC76872: AIX: HARD TO DIAGNOSE KAIO ERRORS 22 (EINVAL) WHEN SYSTEM RUNNING LOW ON PINNABLE MEMORY PAGES

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as documentation error.

Error description

  • On AIX systems with a lot of allocated pinnable ("resident")
    memory and KAIO / DIRECT_IO being used by Informix, it is
    possible that KAIO read or write calls fail with errno 22
    (EINVAL), potentially leading to down dbscpaces or system
    aborts.
    
    sample message log error:
    04:30:40  KAIO: error in kaio_WRITE, kaiocbp = 0x22b620d0, errno
    = 22
    04:30:40  fildes = 258 (gfd 3), buf = 0x700000122b64000, nbytes
    = 4096, offset = 130785280
    
    The reason for these EINVAL errors usually is the OS running low
    on 'pinnable' memory pages (by default 80% of the available RAM)
    which can be caused by Informix having a lot of shared memory
    segments allocated as "resident" plus pinned OS kernel memory
    plus KAIO resources.
    

Local fix

  • The recommended solution is to have less (or no) Informix shared
    memory segments set resident (RESIDENT 0 or 1) which normally
    should have no adverse effects with modern AIX versions (6.1
    onwards) and default VMM configuration.
    
    Using AIX 64K pages will help performance when RESIDENT is set
    to 0.  64K pages can be enabled similarly to this command when
    starting IDS:
    
    LDR_CNTRL=DATAPSIZE=64K@STACKPSIZE=64K@TEXTPSIZE=64K@SHMPSIZE=64
    K oninit
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All users on AIX running IDS 11.50, 11.70                    *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * KAIO read or write calls fail with errno 22 (EINVAL), if OS  *
    * is running low on resident memory pages.                     *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * The following notes is added to AIX machine notes for        *
    * 11.50.xC10 and 11.70.xC5:                                    *
    *                                                              *
    *     Limit the number of resident memory segments allocated   *
    * to Informix.                                                 *
    *     If you allocate a lot of resident memory segments to     *
    * Informix and                                                 *
    *     Informix uses a lot of KAIO and direct I/O, KAIO read or *
    * write calls                                                  *
    *     might fail with errno 22 (EINVAL). EINVAL errors can     *
    * lead to down dbspaces                                        *
    *     or system aborts. The following error typically appears  *
    * in the server log:                                           *
    *                                                              *
    *          04:30:40  KAIO: error in kaio_WRITE, kaiocbp =      *
    * 0x22b620d0, errno = 22                                       *
    *          04:30:40  fildes = 258 (gfd 3), buf =               *
    * 0x700000122b64000, nbytes = 4096,                            *
    *                    offset = 130785280                        *
    *                                                              *
    *     The usual reason for these EINVAL errors is that the OS  *
    * is running low                                               *
    *     on resident memory pages because the Informix server has *
    * too many shared                                              *
    *     memory segments allocated as "resident,"  as well as     *
    * pinned OS kernel                                             *
    *     memory and KAIO resources.                               *
    *                                                              *
    *     You can prevent these errors by setting fewer, or no,    *
    * Informix server                                              *
    *     shared memory segments as resident. Set the RESIDENT     *
    * configuration                                                *
    *     parameter in the onconfig file to 1 or 0.                *
    ****************************************************************
    

Problem conclusion

  • A recommendation notes added to AIX machine notes for 11.50.xC10
    and 11.70.xC5.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC76872

  • Reported component name

    IBM IDS ENTRP E

  • Reported component ID

    5724L2304

  • Reported release

    B15

  • Status

    CLOSED DOC

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-06-08

  • Closed date

    2014-09-18

  • Last modified date

    2014-09-18

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

Applicable component levels

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSGU8G","label":"Informix Servers"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"B15","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
18 September 2014