[click] Linux module ToHostSniffers

Eddie Kohler kohler at icir.org
Thu Feb 13 10:27:04 EST 2003


Hey Doug,

> Is it feasible that packets sent to ToHostSniffers might get dropped
> before making it to tcpdump?

It is absolutely feasible, because Click can be a resource hog, even when
it's not doing very much.

But there is a possible fix: I've just checked in Petros Zerfos' adaptive
scheduler. Recompile Click with --enable-adaptive. This will give you a
couple advantages:

- If Click isn't busy, it will give the CPU back to Linux more often. (NB:
This might not show up in "top", especially if Linux isn't busy either.)

- You can control the minimum and maximum fractions of time Click will take
for itself by writing real numbers between 0.001 and 0.999 to
/click/{min_cpu_share,max_cpu_share}. To see the current fraction Click is
using, 'cat /click/cpu_share. Default min and max CPU shares are 0.005 and
0.8.

So these might help out the tcpdump issue because (a) Click will give the
CPU to tcpdump more often, if it isn't doing very much work; and (b) even
if Click is busy, you can limit its CPU usage with /click/max_cpu_share,
thus ensuring that other programs -- and in particular tcpdump -- will get
to run.

Please try it out and let me know how it works.

Eddie




More information about the click mailing list