I'm trying to tests the amount of CPU that iptables use for NAT. Perhaps it will be more accurate to say "the amount of CPU that the netfilter kernel module" uses.
The approach i took was to try and strip the system of all userspace processes, run the streaming and check the Load average
in top.
In that case, the load averages are pretty low, as if the processor isn't being affected by packet routing.
However, after reading a bit about what load average means (here) it seems it doesn't represent the CPU utilization but the length of the process queue.
From my current understanding, execution of kernel modules aren't treated as processes which is why it will never be listed in the process queue.
Does that mean that the only way to detect CPU overload by kernel code is to run it with a userspace code and see the userspace code fail due to not getting processor time?
A simple example to formulate the question. If there was a piece of kernel code having a 'busy wait' bug, how would you detect that it's the kernel that's overusing the cpu?