[Oisf-devel] [PATCH 0/2] RFC: Release some CPU pressure

Eric Leblond eric at regit.org
Fri Dec 31 12:15:29 UTC 2010


Here's a little patchset which try to fix a high CPU load
observed on a box without any network traffic. On a
relatively powerful box (Intel(R) Core(TM)2 @ 3.16GHz) with
any noticeable traffic, the CPU load caused by suricata was
around 7%. A little strace show that a great amount of
	nanosleep({0, 100000}, NULL) = 0
was the cause of this CPU load. Perf tools confirm also that
the time was spent in hpet_timer.

Code study shows two points where usleep is used as temporisation
in loop. First case is in main loop, second in flow manager thread.

The following patchset contains two proposals.

With that patchset applied, the CPU load triggered by Suricata is
null and the analysis of a pcap file seems to be a little faster
(maybe because of the usleep(1) suppression).


More information about the Oisf-devel mailing list