Limiting file system caching on RH Linux version 5

  • Follow


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). 


0
Reply Mark 2/22/2010 8:23:40 PM

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.

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
0
Reply Troels 2/23/2010 7:06:50 PM


On 2/23/10 12:06 PM, Troels Arvin wrote:
> 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.





0
Reply Ian 2/23/2010 8:56:52 PM

"Troels Arvin" <troels@arvin.dk> wrote in message 
news:hm190a$6js$2@news.net.uni-c.dk...
> 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 


0
Reply Mark 2/23/2010 10:54:41 PM

"Ian" <ianbjor@mobileaudio.com> wrote in message 
news:oiXgn.3025$mn6.949@newsfe07.iad...
> 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. 


0
Reply Mark 2/23/2010 10:54:59 PM

4 Replies
1040 Views

(page loaded in 0.064 seconds)

Similiar Articles:













7/25/2012 8:31:47 PM


Reply: