2015-08-09 23:58:03 +02:00
|
|
|
# Tuning {#tuning}
|
2014-06-05 09:35:31 +00:00
|
|
|
|
2015-08-09 23:58:03 +02:00
|
|
|
## Operating System and Kernel
|
2014-06-25 13:08:33 +00:00
|
|
|
|
|
|
|
For minimum latency several kernel and driver settings can be optimized.
|
2015-10-09 15:48:55 +02:00
|
|
|
A [PREEMPT_RT patched Linux](https://rt.wiki.kernel.org/index.php/Main_Page) kernel is recommended.
|
2014-06-25 13:08:33 +00:00
|
|
|
Precompiled kernels for Fedora can be found here: http://ccrma.stanford.edu/planetccrma/software/
|
|
|
|
|
2016-02-26 08:39:05 +01:00
|
|
|
- Install `tuned` package and activate the `realtime` profile. This profile will:
|
2016-06-08 23:21:42 +02:00
|
|
|
- Reserve some CPU cores solely for VILLASnode (Kernel cmdline: `isolcpus=[cpu_numbers]`)
|
2016-02-26 08:39:05 +01:00
|
|
|
- Activate sub-profiles:
|
|
|
|
- `network-latency`
|
|
|
|
- `latency-performance`
|
|
|
|
- See `/etc/tuned/realtime-variables.conf`
|
|
|
|
- See `/usr/lib/tuned/realtime/`
|
|
|
|
|
2016-06-08 23:21:42 +02:00
|
|
|
- VILLASnode configuration:
|
2016-02-26 08:39:05 +01:00
|
|
|
- `affinity`: Maps network card IRQs and threads to isolated cores
|
|
|
|
- `priority`: Increases priority of network packets and threads
|
2015-09-19 18:48:00 +02:00
|
|
|
|
2014-06-25 13:08:33 +00:00
|
|
|
- Configure NIC interrupt coalescence with `ethtool`:
|
|
|
|
|
2016-02-26 08:39:05 +01:00
|
|
|
$ ethtool -C|--coalesce devname [adaptive-rx on|off] [adaptive-tx on|off] ...
|
2014-06-25 13:08:33 +00:00
|
|
|
|
|
|
|
- Configure NIC kernel driver in `/etc/modprobe.d/e1000e.conf`:
|
|
|
|
|
2016-02-26 08:39:05 +01:00
|
|
|
# More conservative interrupt throttling for better latency
|
|
|
|
# https://www.kernel.org/doc/Documentation/networking/e1000e.txt
|
|
|
|
option e1000e InterruptThrottleRate=
|
2014-06-25 13:08:33 +00:00
|
|
|
|
2015-08-09 23:58:03 +02:00
|
|
|
## Hardware
|
2014-06-25 13:08:33 +00:00
|
|
|
|
|
|
|
This are some proposals for the selection of appropriate server hardware:
|
|
|
|
|
|
|
|
- Server-grade CPU: Intel Xeon
|
|
|
|
- A multi-core systems allows parallization of send/receive paths.
|
2015-09-19 18:48:00 +02:00
|
|
|
|
2014-06-25 13:08:33 +00:00
|
|
|
- Server-grade network cards: Intel PRO/1000
|
|
|
|
- These allow offloading of UDP checksumming to the hardware
|