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 > Too many idle db2agents

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-11-11, 15:57
db2user24 db2user24 is offline
Registered User
 
Join Date: Nov 2007
Posts: 248
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
File Type: txt grep_agent.txt (25.9 KB, 19 views)
Reply With Quote
  #2 (permalink)  
Old 08-11-11, 16:07
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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.
Reply With Quote
  #3 (permalink)  
Old 08-11-11, 16:23
db2user24 db2user24 is offline
Registered User
 
Join Date: Nov 2007
Posts: 248
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!!!
Reply With Quote
  #4 (permalink)  
Old 08-11-11, 16:34
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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.
Reply With Quote
  #5 (permalink)  
Old 08-11-11, 16:41
db2user24 db2user24 is offline
Registered User
 
Join Date: Nov 2007
Posts: 248
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!
Reply With Quote
  #6 (permalink)  
Old 08-11-11, 16:52
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Actually, idle agents retain private memory. Look at the RSS (real memory) and SZ (including paging space) in your ps aux output.
Reply With Quote
  #7 (permalink)  
Old 08-11-11, 17:32
db2user24 db2user24 is offline
Registered User
 
Join Date: Nov 2007
Posts: 248
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?
Reply With Quote
  #8 (permalink)  
Old 08-11-11, 17:38
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
The heading is missing in your ps output because you used grep. Use" ps aux | head -1" to see it
Reply With Quote
  #9 (permalink)  
Old 08-11-11, 17:42
db2user24 db2user24 is offline
Registered User
 
Join Date: Nov 2007
Posts: 248
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
File Type: txt grep_agent.txt (26.0 KB, 16 views)
Reply With Quote
  #10 (permalink)  
Old 08-12-11, 12:23
db2user24 db2user24 is offline
Registered User
 
Join Date: Nov 2007
Posts: 248
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 12:37.
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