Check if async I/O is enabled in CentOS

Technical, Technology

First, the command:

grep kio /proc/slabinfo

It gives output similar to this:

kioctx 24 60 384 10 1 : tunables 54 27 8 : slabdata 6 6 0
kiocb 7 15 256 15 1 : tunables 120 60 8 : slabdata 1 1 0

Look at the column header in the first line of /proc/slabinfo:

# name <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> : slabdata <active_slabs> <num_slabs> <sharedavail>

To distinguish if async I/O is enabled, check first and second columns.  If they are non-zero, that means async I/O is enabled (disabled if all zeros).

To drill a little bit more:

  • Slab allocation is a kernel memory management mechanism to kernel memory usage more efficient, hence improving performance (;
  • /proc/slabinfo stores statistics about the Slab allocation;
  • There are many data structures in /proc/slabinfo storing different statistics;
  • Among them, kioctx and kiocb are 2 data structures used to store statistics for async I/O.  Hence, if they are non-zero number of objects for <active_objs> and <num_objs>, async I/O is being used (

Quick Java – PermSize and MaxPermSize

Technical, Technology

“Perm” in these 2 JVM arguments refers to Permanent Generation.

The permanent generation is used to hold reflective of the VM itself such as class objects and method objects. These reflective objects are allocated directly into the permanent generation, and it is sized independently from the other generations. Generally, sizing of this generation can be ignored because the default size is adequate. However, programs that load many classes may need a larger permanent generation.

MaxPermSize defaults to 32m for -client and 64m for -server.

e.g. -XX:PermSize=64m -XX:MaxPermSize=128m