100% cpu usage

M. Warner Losh imp____village.org
Thu Feb 21 21:23:02 CET 2002


I've found a several rather serious performance problems with agent++
and snmp++v3.  The worst one is that agent++ will eat 100% of the cpu
all the time on FreeBSD.  The following patch fixes the problem for
Unix, but I don't know if it does for Win32.   It is against 3.1.6,
but a similar patch worked for the 3.1.4 series.  The problem is that
events aren't waited for, they are busy waited for.  This can cause
problems when your CPU is only a 133MHz 486 :-)

--- src/eventlist.cpp~	Mon Feb 18 15:08:20 2002
+++ src/eventlist.cpp	Wed Feb 20 16:45:35 2002
@@ -341,7 +341,7 @@
 
   do {
     yield_pump();
-    SNMPProcessPendingEvents();
+    SNMPProcessEvents();
   } while (!snmpEventList->Done(req_id));
 
   // reset the msg queue

I'll post the other issues in other mail.

Warner



More information about the AGENTPP mailing list