If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > cache memory

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-30-12, 02:37
alwayssathya alwayssathya is offline
Registered User
 
Join Date: Aug 2010
Location: Chennai India
Posts: 161
Red face cache memory

i found db2 is using more cached memory

[db2inst1@WESSDITM ~]$ free -g
total used free shared buffers cached
Mem: 7 7 0 0 0 6
-/+ buffers/cache: 1 6
Swap: 19 0 19
[db2inst1@WESSDITM ~]$
[db2inst1@WESSDITM ~]$


and to release all the memory what are the steps to be followed. currently no application/user is connected to database. help me !
Reply With Quote
  #2 (permalink)  
Old 01-30-12, 08:13
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
I think you are looking at the kernel page cache, which has nothing to do with DB2. Linux kernel normally uses all free memory for the buffer and page caches and dynamically reallocates that memory to user processes (e.g. DB2) when needed.

http://tldp.org/LDP/tlk/mm/memory.html

Last edited by n_i; 01-31-12 at 08:25.
Reply With Quote
  #3 (permalink)  
Old 01-30-12, 23:02
alwayssathya alwayssathya is offline
Registered User
 
Join Date: Aug 2010
Location: Chennai India
Posts: 161
thanks n_i,

to have a better understanding, as you said they are allocated by linux to different process eg b2, so in this case DB2 is using those memory cache( no other application on that server) i need to release that memory from Db2.

correct me if wrong ...
Reply With Quote
  #4 (permalink)  
Old 01-31-12, 08:27
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by alwayssathya View Post
correct me if wrong ...
cache memory
Reply With Quote
  #5 (permalink)  
Old 02-01-12, 13:25
L_DBA_L L_DBA_L is offline
Registered User
 
Join Date: Sep 2009
Posts: 49
We have this problem on Red Hat. Swap goes very high during DB2 backup to disk but memory usage is normal. Why?
Reply With Quote
  #6 (permalink)  
Old 02-09-12, 14:18
L_DBA_L L_DBA_L is offline
Registered User
 
Join Date: Sep 2009
Posts: 49
Any advice for backup and swap plz?
Reply With Quote
  #7 (permalink)  
Old 02-09-12, 14:29
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by L_DBA_L View Post
Swap goes very high during DB2 backup to disk but memory usage is normal.
Care to demonstrate?
Reply With Quote
  #8 (permalink)  
Old 02-09-12, 14:31
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Quote:
Originally Posted by L_DBA_L View Post
We have this problem on Red Hat. Swap goes very high during DB2 backup to disk but memory usage is normal. Why?
The cache memory is used for file system caching. Even though you may have it turned off for your DMS tablespaces, file system caching is likely to go very high (and sometimes also swap space is high) when backups are performed that write to regular OS files.

On thing you can do to reduce file system caching for backups is to turn on direct I/O:
db2set DB2_BACKUP_USE_DIO=TRUE
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390

Last edited by Marcus_A; 02-09-12 at 14:35.
Reply With Quote
  #9 (permalink)  
Old 02-09-12, 15:09
L_DBA_L L_DBA_L is offline
Registered User
 
Join Date: Sep 2009
Posts: 49
Quote:
Originally Posted by Marcus_A View Post
The cache memory is used for file system caching. Even though you may have it turned off for your DMS tablespaces, file system caching is likely to go very high (and sometimes also swap space is high) when backups are performed that write to regular OS files.

On thing you can do to reduce file system caching for backups is to turn on direct I/O:
db2set DB2_BACKUP_USE_DIO=TRUE

Can I find it in 9.1 and 9.7? Do you know a link to documentation?
Reply With Quote
  #10 (permalink)  
Old 02-09-12, 16:27
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Quote:
Originally Posted by L_DBA_L View Post
Can I find it in 9.1 and 9.7? Do you know a link to documentation?
Last I heard it was not yet documented, but will be at some future date. I doubt it is in 9.1, which goes out of service in another few months.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #11 (permalink)  
Old 02-10-12, 22:12
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
It should get externalized with v9.7 FP6. I think it will become dynamic in FP6 (no instance restart is needed).
Reply With Quote
  #12 (permalink)  
Old 02-12-12, 20:30
L_DBA_L L_DBA_L is offline
Registered User
 
Join Date: Sep 2009
Posts: 49
Quote:
Originally Posted by Marcus_A View Post
Last I heard it was not yet documented, but will be at some future date. I doubt it is in 9.1, which goes out of service in another few months.
Can we use this setting in 9.7 production database without support or must wait until it's documented?
Reply With Quote
  #13 (permalink)  
Old 02-12-12, 20:47
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Quote:
Originally Posted by L_DBA_L View Post
Can we use this setting in 9.7 production database without support or must wait until it's documented?
Whatever the opinion on this forum, I suggest you open a PMR and get a confirmation.
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On