I just compiled Phil Wood’s memory map enabled libpcap and compiled cxtracker against it.
From earlier test, comparing sancp and cxtracker, it seems that cxtracker is in the range of 25 to 30% less CPU intensive than sancp with regular libpcap.
Output from pidstat:
Average: PID %user %system %CPU CPU Command
Average: 28269 1.42 5.75 7.17 – sancp
Average: 27383 1.12 4.44 5.56 – cxtracker
Running cxtracker with mmap libpcap, the results are even better:
Average: PID %user %system %CPU CPU Command
Average: 5450 1.98 8.97 10.95 – sancp
Average: 5322 1.38 2.79 4.16 – cxtracker
As you see, over 60% less CPU usage!
The memory usage is of course higher, but thats the price you have to pay for less CPU usage…
The tests are done about 5 minutes after sancp and cxtracker is started, and the summary are generated from a 5 second interval with 60 counts with pidstat.