Results 1 to 14 of 14

Thread: cache memory

  1. #1
    Join Date
    Aug 2010
    Location
    Singapore
    Posts
    197

    Red face Unanswered: 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 !

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    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 09:25.

  3. #3
    Join Date
    Aug 2010
    Location
    Singapore
    Posts
    197
    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 ...

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by alwayssathya View Post
    correct me if wrong ...
    http://www.dbforums.com/6535166-post2.html

  5. #5
    Join Date
    Sep 2009
    Posts
    66
    We have this problem on Red Hat. Swap goes very high during DB2 backup to disk but memory usage is normal. Why?

  6. #6
    Join Date
    Sep 2009
    Posts
    66
    Any advice for backup and swap plz?

  7. #7
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    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?

  8. #8
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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
    Last edited by Marcus_A; 02-09-12 at 15:35.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  9. #9
    Join Date
    Sep 2009
    Posts
    66
    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?

  10. #10
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  11. #11
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    It should get externalized with v9.7 FP6. I think it will become dynamic in FP6 (no instance restart is needed).

  12. #12
    Join Date
    Sep 2009
    Posts
    66
    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?

  13. #13
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    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.

  14. #14
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •