Cautions and benefits
There are many benefits to employing MIO but this library should be used with caution.
Benefits
- MIO, because it is so easy to implement, makes it very simple to analyze the I/O of an application.
- MIO allows to cache the I/O at the application level: you can optimize the I/O system call, then the system interrupts.
- The pf cache can be configured for each file, or for a group of files, making it more configurable than the OS cache.
- MIO can be used on I/O applications that run simultaneously, linking some of them with MIO and configuring them to use the pf cache and DIRECT I/O to bypass the normal JFS and JFS2 cache. These MIO-linked applications will release more OS cache space for the I/O applications that are not linked to MIO.
- MIO cache is useful for large sequential-access files.
Cautions
- Misuse of the MIO library cache configuration can cause
performance degradation. To avoid this, first analyze the I/O policy of your
application, then find the module option parameters that truly apply to your
situation and set the value of these parameters to help improve the performance
of your application. Examples of misuse the of MIO:
- For an application that accesses a file smaller than the OS memory size, if you configure direct option of the pf module, you can degrade your performance.
- For random access files, a cache may degrade your performance.
- MIO cache is allocated with malloc subsystem in the application's address space, so be careful because if the total MIO cache size is bigger than the available OS memory, the system will use the paging space. This can cause performance degradation or operating-system failure.