Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2003
    Posts
    1,605

    Cool Unanswered: How to empty the buffer pool?

    Hi,

    I would like to know when the buffer pool (memory cache for data) is emptied?

    Is it enough to stop database with command "db2stop" and then
    "db2start"? Do I need to restart the operating system do empty buffer pools?

    Thanks,
    Grofaty

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: How to empty the buffer pool?

    Terminating all applications from a database will de-allocate the bufferpools ...

    On terminating the applications, make sure, the database does not appear in the db2 list active databases command ... If it does, do a deactivate database ...

    Cheers

    sathyaram

    Originally posted by grofaty
    Hi,

    I would like to know when the buffer pool (memory cache for data) is emptied?

    Is it enough to stop database with command "db2stop" and then
    "db2start"? Do I need to restart the operating system do empty buffer pools?

    Thanks,
    Grofaty

  3. #3
    Join Date
    Jan 2003
    Posts
    1,605

    Re: How to empty the buffer pool?

    Hi,

    What does the "de-allocate bufferpools" means? Does this mean that bufferpools are emptied? Is this memory free for another applications witch are not using db2 - for example ftp, batch jobs etc.

    Thanks,
    Grofaty

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: How to empty the buffer pool?

    When the database is deactivated, the memory which is database specific is released back to the operating system ..... This can be reused by any OS process/appln that requires it ....


    Obviously, the contents of the bufferpool are cleared this time ...

    Is there any specific reason you are looking at 'to empty the bufferpool' ?


    Yeh ... If you have an installation of db2 on windows NT , you can 'see' the memory allocations and deallocations on the task manager's performance tab .... Activate the database and you will see the memory usage increase .... Deactivate the database and you see the memory fall, and a major portion of this is bufferpool ....

    Cheers

    Sathyaram

    Originally posted by grofaty
    Hi,

    What does the "de-allocate bufferpools" means? Does this mean that bufferpools are emptied? Is this memory free for another applications witch are not using db2 - for example ftp, batch jobs etc.

    Thanks,
    Grofaty

  5. #5
    Join Date
    Jan 2003
    Posts
    1,605

    Re: How to empty the buffer pool?

    Hi,

    I need this information because of performance test I make with complex sql. I just want to know the impact of buffer pools to my performance test.

    Thank you sathyaram_s. You helped me very much.
    Grofaty

  6. #6
    Join Date
    Jul 2002
    Location
    ATL
    Posts
    170

    Re: How to empty the buffer pool?

    The only way you can clear bufferpools is using db2 kill
    You may want to run the command ipcrm.
    The only time the bufferpools are definately clear is when the syatem is shutdown and brought back.

    Originally posted by grofaty
    Hi,

    I would like to know when the buffer pool (memory cache for data) is emptied?

    Is it enough to stop database with command "db2stop" and then
    "db2start"? Do I need to restart the operating system do empty buffer pools?

    Thanks,
    Grofaty

  7. #7
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: How to empty the buffer pool?

    May be I'm looking at an ideal scenario ,

    but IMHO, a db2kill will need a ipcrm because it is a 'dirty' stop of db2 ... A clean stop (like db2stop or terminate) should release the resources

    Cheers

    Sathyaram

    Originally posted by koganti
    The only way you can clear bufferpools is using db2 kill
    You may want to run the command ipcrm.
    The only time the bufferpools are definately clear is when the syatem is shutdown and brought back.

  8. #8
    Join Date
    Nov 2002
    Location
    Delaware
    Posts
    186
    In a perfrect world on AIX, when you do a clean shutdown of DB2, it normally get rid of all ipcs (shared memory processes). But over 50% of the time, it leaves stuff out there that need to be cleanedup. If your trying to clean up a couple of them, do a ipcrm, if you have a bunch, shutdown db2 then run the exec db2nkill 0 and it will clean all of them up. DB2 will already be down, so it will just clean up the memory segments. I have done this a bunch of times with no problems.

Posting Permissions

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