DB6: How to deactivate file system caching in V9.5

[] [] [] [] [] [] [] [] [] [] []

Related:

  1. Performance problem with MaxDB 7.7: High CPU system loadSymptom After you update your SAP MaxDB instance to Version...
  2. DB6: Installation of FixPaks for DB2 V9.5 (Windows)Symptom This note relates to installing FixPaks for DB2 V9.5...
  3. 640PC Edition May 2008:Installation IBM DB2 on z/OSSymptom This SAP Note is valid for the following releases:...

Symptom

You want to deactivate file system buffered I/O on DB2 objects.

Other terms

file system caching, file system buffered I/O, dio, cio

Reason and Prerequisites

DB2 has own buffer pools in memory. When file system buffered I/O is used for table spaces, a page might be buffered on both DB2 buffer and OS file system buffer. Duplicate buffering consumes additional CPU and memory resources unnecessarily and it may lead to non-optimal I/O performance due to resource bottlenecks.
Data on file system buffer might be lost in case the operating system terminates abnormally. Therefore, log files are recommended not to be buffered at a file system buffer level, but should be read/written directly from/to disks.

Solution

In order to deactivate file system buffered I/O, implement the following:
1. DMS/SMS table spaces in file systems
- set the “FILE SYSTEM CACHING = NO” attribute for all table spaces by
“ALTER TABLESPACE

NO FILE SYSTEM CACHING”
- mount the file systems WITHOUT cio/dio option, if those options are
available on your platform
- restart the database to effect the changes
Without the explicit dio/cio mount option, DB2 is able to choose the best I/O method. See the following link about the default I/O methods DB2 chooses on different platforms.
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw.admin.dbobj.doc/doc/c0051304.html
You can check the current settings by a CLP command:
db2 get snapshot for tablespaces on

2. Log files (as of DB2 V9.5 FP1)
- Activate the registry variable DB2_LOGGER_NON_BUFFERED_IO by
“db2set DB2_LOGGER_NON_BUFFERED_IO = ON”
This registry variable enables direct I/O on the log file system.
- mount the file systems WITHOUT cio/dio option, if those options are
available on your platform
- restart the database to effect the changes

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Leave a Comment