Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2007
    Posts
    265

    Unanswered: Too many idle db2agents

    Hi,

    I've been keeping an eye on the db2agent count on our production server and for some reason, the count seemed pretty high yesterday ( 8/10) ... it was around 236 when typically it has been between 30 - 50 but not more. I have attached a file with the output of the command ps aux | grep db2agent.. is the best way to clean this up by stopping / starting the db? And is there an easy way for me to figure out what actually caused this? Thanks!
    Attached Files Attached Files

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    DB2 agents don't just start by themselves, the application(s) must have attempted that many connections at some point. Idle agents don't consume any resources, so there's no reason to try to remove them. If somehow you still don't like them sitting there, change the NUM_POOLAGENTS database configuration parameter to the value you think you like better.

  3. #3
    Join Date
    Nov 2007
    Posts
    265
    thank you! here's what I currently have for NUM_POOLAGENTS --

    db2 get dbm cfg | grep NUM_POOLAGENTS
    Agent pool size (NUM_POOLAGENTS) = 600(calculated)


    In reality, I don't mind them sitting there if they don't take up any resources.. I guess my main concern is the count of the db2agents and maxing out the value of MAXAGENTS, etc. ( even though I have it set to a pretty high number - 1200) I assume the db will eventually clean up all the idle agents? Also, if you were in my place.. I take it that you wouldn't bother restarting the db after seeing the content of my attached file? Thanks!!!

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    If I were in your place, I would not bother restarting anything. This should be the last resort in any case. However, I would talk to the application folks to understand what their application requirements and peak connection demand might be, and adjust the database parameters to ensure sufficient resources.

  5. #5
    Join Date
    Nov 2007
    Posts
    265
    thanks, a few months ago we had a power outage and after our database came back up I noticed a bunch of idle agents then as well ( not as many as this time though.. I think there were about 100). This happened on june 30 / july 1.. if you look at my file today, there are a total of 4 idle agents for those two days now. The rest cleaned up on their own without me restarting anything.. am I correct in assuming that the ones from Aug 10 will clean up over time as well? Does the db usually take care of it over a period of time? I appreciate all your help today!

  6. #6
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Actually, idle agents retain private memory. Look at the RSS (real memory) and SZ (including paging space) in your ps aux output.

  7. #7
    Join Date
    Nov 2007
    Posts
    265
    Quote Originally Posted by db2girl View Post
    Actually, idle agents retain private memory. Look at the RSS (real memory) and SZ (including paging space) in your ps aux output.
    thanks, can you help me figure out where that is.. I attached the file in my original post.. thanks! Do you think a cleanup is required?

  8. #8
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    The heading is missing in your ps output because you used grep. Use" ps aux | head -1" to see it

  9. #9
    Join Date
    Nov 2007
    Posts
    265
    Quote Originally Posted by db2girl View Post
    The heading is missing in your ps output because you used grep. Use" ps aux | head -1" to see it

    thanks, i have attached the file with the headings.. just by glancing at it, what do you think? typically the agents should clean up over time, right? not really sure whether a stop / start is necessary.. any input will be appreciated! thanks so much..
    Attached Files Attached Files

  10. #10
    Join Date
    Nov 2007
    Posts
    265
    Hi, just thought I would add that today I ran the command db2mtrk -i -d -p and based on the output, it seems like none of the idle agents are on the agent memory list.. just wanted to share that since the -p option is supposed to include private memory too and from the output, it seems like none of the idle agents are using up any sort of memory.


    Am going to go ahead with n_i's advice and let the db as is for now..
    Last edited by db2user24; 08-12-11 at 13:37.

Posting Permissions

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