Goal: when running a FPS game in Linux, automate the setup of higher priority for its network traffic
I know such tasks are usually accomplished with a combination of iptables (to mark IP packets meeting certain criteria) and tc (to prioritize those IP packets).
- earlier version of iptables had an --pid-owner option with a warning in the manpage that this is broken on SMP kernels. My recent version of iptables (1.4.7) doesn't mention this option in the manpage at all
- probably I can't use a single destination port to match traffic, because game servers run on different ports
I aim for a wrapper shell script which will:
- run the game executable
- find its name/pid
- based on this will increase the priority of network traffic for this process
- when I exit the game, will restore everything to defaults
Is this possible? I'm willing to go as far as dealing with custom netfilter modules, if there are any which could help.