dbTalk Databases Forums  

Limiting file system caching on RH Linux version 5

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss Limiting file system caching on RH Linux version 5 in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mark A
 
Posts: n/a

Default Limiting file system caching on RH Linux version 5 - 02-22-2010 , 02:23 PM






For DB2 Version 9.5, does setting swappiness= 0 (/proc/sys/vm/swappiness) on
RHEL 5 sufficiently limit Linux file system caching, or is there some other
way to limit on the percent of memory that can be used for Linux file system
caching.

Please do not explain to me how DB2 tablespace file system caching (or no
file system caching) works. I already know about that and I am talking about
Linux OS configurations for a DB2 data server where almost all tablespaces
are defined with no file system caching (except those that contain LOB's).

Reply With Quote
  #2  
Old   
Troels Arvin
 
Posts: n/a

Default Re: Limiting file system caching on RH Linux version 5 - 02-23-2010 , 01:06 PM






Mark A wrote:

Quote:
For DB2 Version 9.5, does setting swappiness= 0
(/proc/sys/vm/swappiness) on RHEL 5 sufficiently limit Linux file system
caching, or is there some other way to limit on the percent of memory
that can be used for Linux file system caching.
My completely non-authoritative answer would be:

The vm.swappiness parameter is irrelevant here.

To prevent file system caching, DB2 will use relevant file system API
hooks to instruct the kernel to skip caching of reads and writes. DB2
probably uses the O_DIRECT flag when opening the involved data files; or
perhaps IBM has listened to Linus Torvalds and uses other API facilities:
http://kerneltrap.org/node/7563

--
Troels

Reply With Quote
  #3  
Old   
Ian
 
Posts: n/a

Default Re: Limiting file system caching on RH Linux version 5 - 02-23-2010 , 02:56 PM



On 2/23/10 12:06 PM, Troels Arvin wrote:
Quote:
Mark A wrote:

For DB2 Version 9.5, does setting swappiness= 0
(/proc/sys/vm/swappiness) on RHEL 5 sufficiently limit Linux file system
caching, or is there some other way to limit on the percent of memory
that can be used for Linux file system caching.

My completely non-authoritative answer would be:

The vm.swappiness parameter is irrelevant here.
I don't think that this is irrelevant. There are many other files on
the system accessed outside of DB2. A simple daily cron job calling
updatedb can wreak havoc, sucking memory into the file system cache.

Reply With Quote
  #4  
Old   
Mark A
 
Posts: n/a

Default Re: Limiting file system caching on RH Linux version 5 - 02-23-2010 , 04:54 PM



"Troels Arvin" <troels (AT) arvin (DOT) dk> wrote

Quote:
My completely non-authoritative answer would be:

The vm.swappiness parameter is irrelevant here.

To prevent file system caching, DB2 will use relevant file system API
hooks to instruct the kernel to skip caching of reads and writes. DB2
probably uses the O_DIRECT flag when opening the involved data files; or
perhaps IBM has listened to Linus Torvalds and uses other API facilities:
http://kerneltrap.org/node/7563

--
Troels
I specifically mentioned in my OP that I was not asking how DB2 turns off
file system caching of DB2 tablespace containers, but I pretty much knew
that there would be someone who could not control themselves.

I believe there is a Linux parameter that can limit file caching memory to a
percent of total system memory, but I noticed that IBM only recommended the
following kernel parameters, and was wondering if these are enough to limit
file system caching (such as might occur during a DB2 backup to a file) to a
reasonable percent of the total memory.

vm.swappiness=0
vm.dirty_ratio=10
vm.dirty_background_ratio=5

Reply With Quote
  #5  
Old   
Mark A
 
Posts: n/a

Default Re: Limiting file system caching on RH Linux version 5 - 02-23-2010 , 04:54 PM



"Ian" <ianbjor (AT) mobileaudio (DOT) com> wrote

Quote:
I don't think that this is irrelevant. There are many other files on
the system accessed outside of DB2. A simple daily cron job calling
updatedb can wreak havoc, sucking memory into the file system cache.
Exactly. I was specifically NOT referring to OS caching of DB2 tablespace
containers, but caching of other files by the OS. Some of these files may be
related to DB2 such as DB2 backup files.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.