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!
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.
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!!!
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.
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!
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..
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..