Discussion:
renice and network forwarding
Add Reply
Tom Smyth
2017-12-03 21:13:52 UTC
Reply
Permalink
Raw Message
Hello all,

just wondering if anyone else has tried using renice to
de-prioritise other processes in an effort to give more cpu
time to packet forwarding in the kernel ?

While Im certain that there significant risks to system stability
and other functionality of the system if one were to carpet bomb
the process list pids with renice 20. Perhaps the current defaults
are for general purpose systems ? Perhaps other network
Administrators have tweaked background processes where a system
was a single purpose system such as a Router, Firewall or Bridge.

Also is the softnet process (as seen by command top -SH) only
interrupt handling of packets ?
or does it cover processing (e.g. forwarding if enabled ) (either
bridging or routing depending on network config)

any advice welcome ...

Thanks
Tom Smyth
Theo de Raadt
2017-12-03 21:17:06 UTC
Reply
Permalink
Raw Message
won't help.

it does not adjust the scheduler in that way, at all
Post by Tom Smyth
just wondering if anyone else has tried using renice to
de-prioritise other processes in an effort to give more cpu
time to packet forwarding in the kernel ?
While Im certain that there significant risks to system stability
and other functionality of the system if one were to carpet bomb
the process list pids with renice 20. Perhaps the current defaults
are for general purpose systems ? Perhaps other network
Administrators have tweaked background processes where a system
was a single purpose system such as a Router, Firewall or Bridge.
Also is the softnet process (as seen by command top -SH) only
interrupt handling of packets ?
or does it cover processing (e.g. forwarding if enabled ) (either
bridging or routing depending on network config)
any advice welcome ...
Thanks
Tom Smyth
Martin Pieuchot
2017-12-04 10:09:55 UTC
Reply
Permalink
Raw Message
Post by Tom Smyth
Hello all,
just wondering if anyone else has tried using renice to
de-prioritise other processes in an effort to give more cpu
time to packet forwarding in the kernel ?
The thread responsible for processing packets being forwarded is
'softnet'. Like almost all others kernel threads is has a higher
priority than userland processes. So renice is useless in that case.

This thread already uses as much CPU time as possible. What is your
problem? What do you want to achieve?
Post by Tom Smyth
While Im certain that there significant risks to system stability
and other functionality of the system if one were to carpet bomb
the process list pids with renice 20. Perhaps the current defaults
are for general purpose systems ? Perhaps other network
Administrators have tweaked background processes where a system
was a single purpose system such as a Router, Firewall or Bridge.
There's no such performance tweak. However note that if you're
bridging interfaces you might suffer. That's because nobody did
the work to take the bridge(4) out of the KERNEL_LOCK(). So it's
a totally different issue than the forwarding path.
Post by Tom Smyth
Also is the softnet process (as seen by command top -SH) only
interrupt handling of packets ?
It's processing all incoming packets.
Post by Tom Smyth
or does it cover processing (e.g. forwarding if enabled ) (either
bridging or routing depending on network config)
All of them but some configurations work better because they don't
require to grab the KERNEL_LOCK().
Post by Tom Smyth
any advice welcome ...
What do you want to achieve? Better performances? With which setup?

Cheers,
Martin

Loading...