On 3/15/10, Gary Gatten <[email protected]> wrote: > Run in gdb to see what thread is doing what. I usually use top on just the > ntop process and enable threads to see which thread(s) take the most time. > Then with the thread I'd I can use gdb to see what those threads are doing. > Or, *maybe* if -K and -t 5 is set ntop will write the thread name and I'd to > the log on startup, but I don't recall for sure...
I tracked this down to updateASTraffic() (pbuf.c), 80% of the CPU time is spend in this function. I if I prevent updatePacketCount() from calling updateASTraffic() everything works fine. Only a few packets are dropped (0.1%). It looks like updateASTraffic() is called for every packet?!? So for every packet ntop loops over the myGlobals.device[actualDeviceId].asStats list. After a few seconds running my asStats list had ~2000 entries. With 248320 calles to updateASTraffic() the while(stats) loop in updateASTraffic() already looped 10970927 times. Where are these asStats acutally used? IP/Summary/ASs works fine without that updateASTraffic() call. I only could find a reference in the rrd plugin. I guess we should move this to ntop-dev. _______________________________________________ Ntop mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop
