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 (http://en.wikipedia.org/wiki/Slab_allocation);
  • /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 (http://chenguangblog.wordpress.com/2011/03/09/async-io/).

Using Mirrors for Repositories

Technical, Technology

Creating a local mirror of maven repository often saves your developers a lot of time waiting for getting everything from a repository. Just by modifying the settings.xml can do, e.g.:

<settings>
...
<mirrors>
      <mirror>
         <id>UK</id>
         <name>UK Central</name>
         <url>http://uk.maven.org/maven2</url&gt;
         <mirrorOf>central</mirrorOf>
      </mirror>
   </mirrors>
   ...
</settings>

See the links for more details: