Starting TUX

TUX can be started by issuing the command /etc/rc.d/init.d/tux start.

This script is written to start TUX on a single-processor as well as a multi-processor server.

If you choose to write your own script to start TUX or start it from the /usr/sbin/tux binary, you can use the following options:

Table 3-3. /usr/sbin/tux options

OptionDescription
-t, --threads=Nnumber of tux threads
-d, --docroot=pathdirectory path for document root
-m, --modpath=pathdirectory path for user-space loadable TUX modules
-d, --daemonrun in the background as a daemon
-D, --date-interval=secondshow often (in seconds) to update the date string, the default is 1 second
-?, --helpshow help message
--usagedisplay brief usage message

Warning

IRQ affinity is a small performance boost. If you are not experiencing any performance difficulties, it is not recommended you try the following.

IRQ Affinity

Binding IRQ's to a group of CPU's is a new feature of the 2.4 kernel. While it was originally developed as part of TUX, it is now a generic and independent kernel feature. Every IRQ source in Linux has an entry in /proc/irq directory. For example, the settings for IRQ 40 is stored in /proc/irq/40. IRQ affinity, or IRQ bindings, is configured though the smp_affinity setting in that directory. For example, the smp_affinity for IRQ 40 is in /proc/irq/40/smp_affinity. The value of the smp_affinity setting is a bitmask of all CPU's that are permitted as a resource for the given IRQ. The default value for smp_affinity is the HEX value 0xffffffff. This means the processes for the IRQ are sent to all CPU's. You are not allowed to turn off all CPU's for an IRQ. If the IRQ controller does not support IRQ affinity, the value can not be changed from the default. If multiple CPU's are defined, then the IRQ source uses the least busy CPU. This is called 'lowest priority APIC routing.' IRQ affinity is achieved by binding an IRQ to a specific CPU or group of CPU's by echoing a HEX value to smp_affinity for the IRQ.

Thus, TUX thread N is bound to CPU N. If a single TUX thread is used (which is recommended) and there is only one network interface card, then the network interface card's IRQ should be bound to CPU0.