Improvements to QoS (tc) documentation (#5221)
* Improvements to QoS (tc) documentation Add configuration method provided by @laneshields at #4563 Wording improvements. Move additional example chart further up * Update README.md * Fixed internal link
Chris Akritidis committed
Jan 24, 2019 at 20:14 UTC
08e4690db8d08beb77d2438d9dd13d5f8d47d4c8
1 file changed
+38
-25
collectors/tc.plugin/README.md
+38
-25
@@ -6,15 +6,11 @@ Live demo - **[see it in action here](https://registry.my-netdata.io/#menu_tc)**
6
7
Netdata monitors `tc` QoS classes for all interfaces.
8
9
-If you also use [FireQOS](http://firehol.org/tutorial/fireqos-new-user/) it will collect
10
-interface and class names.
9
+If you also use [FireQOS](http://firehol.org/tutorial/fireqos-new-user/) it will collect interface and class names.
10
12
-There is a [shell helper](tc-qos-helper.sh.in) for this (all parsing is done by the plugin
13
-in `C` code - this shell script is just a configuration for the command to run to get `tc` output).
11
+There is a [shell helper](tc-qos-helper.sh.in) for this (all parsing is done by the plugin in `C` code - this shell script is just a configuration for the command to run to get `tc` output).
12
15
-The source of the tc plugin is [here](plugin_tc.c). It is somewhat complex, because a state
16
-machine was needed to keep track of all the `tc` classes, including the pseudo classes tc
17
-dynamically creates.
13
+The source of the tc plugin is [here](plugin_tc.c). It is somewhat complex, because a state machine was needed to keep track of all the `tc` classes, including the pseudo classes tc dynamically creates.
14
15
## Motivation
16
@@ -80,11 +76,16 @@ Once **traffic classification** is applied, we can use **[netdata](https://githu
76
77
QoS, is extremely light. You will configure it once, and this is it. It will not bother you again and it will not use any noticeable CPU resources, especially on application and database servers.
78
83
----
79
+This is QoS from a home linux router. Check these features:
80
85
-## QoS in Linux? Have you lost your mind?
81
+1. It is real-time (per second updates)
82
+2. QoS really works in Linux - check that the `background` traffic is squeezed when `surfing` needs it.
83
87
-Yes I know... but no, I have not!
84
+
85
+
86
+---
87
+
88
+## QoS in Linux?
89
90
Of course, `tc` is probably **the most undocumented, complicated and unfriendly** command in Linux.
91
@@ -108,17 +109,13 @@ For example, do you know that for matching a simple port range in `tc`, e.g. all
109
32768/0x8000
110
```
111
111
-I know what you are thinking right now! **And I agree!**
112
+To do it the hard way, you can go through the [tc configuration steps](#qos-configuration-with-tc). An easier way is to use **[FireQOS](https://firehol.org/tutorial/fireqos-new-user/)**, a tool that simplifies QoS management in Linux.
113
113
-This is why I wrote **[FireQOS](https://firehol.org/tutorial/fireqos-new-user/)**, a tool to simplify QoS management in Linux.
114
+## Qos Configuration with FireHOL
115
116
The **[FireHOL](https://firehol.org/)** package already distributes **[FireQOS](https://firehol.org/tutorial/fireqos-new-user/)**. Check the **[FireQOS tutorial](https://firehol.org/tutorial/fireqos-new-user/)** to learn how to write your own QoS configuration.
117
117
-With **[FireQOS](https://firehol.org/tutorial/fireqos-new-user/)**, it is **really simple for everyone to use QoS in Linux**. Just install the package `firehol`. It should already be available for your distribution. If not, check the **[FireHOL Installation Guide](https://firehol.org/installing/)**. After that, you will have the `fireqos` command which uses a configuration like the following:
118
-
119
-## QoS Configuration
120
-
121
-This is the file `/etc/firehol/fireqos.conf` we use at the netdata demo site:
118
+With **[FireQOS](https://firehol.org/tutorial/fireqos-new-user/)**, it is **really simple for everyone to use QoS in Linux**. Just install the package `firehol`. It should already be available for your distribution. If not, check the **[FireHOL Installation Guide](https://firehol.org/installing/)**. After that, you will have the `fireqos` command which uses a configuration like the following `/etc/firehol/fireqos.conf`, used at the netdata demo site:
119
120
```sh
121
# configure the netdata ports
@@ -166,16 +163,32 @@ And this is what you are going to get:
163
164

165
169
----
170
-
171
-## More examples:
172
-
173
-This is QoS from my home linux router. Check these features:
166
+## QoS Configuration with tc
167
+
168
+First, setup the tc rules in rc.local using commands to assign different DSCP markings to different classids. You can see one such example in [github issue #4563](https://github.com/netdata/netdata/issues/4563#issuecomment-455711973).
169
+
170
+Then, map the classids to names by creating `/etc/iproute2/tc_cls`. For example:
171
+```2:1 Standard
172
+2:8 LowPriorityData
173
+2:10 HighThroughputData
174
+2:16 OAM
175
+2:18 LowLatencyData
176
+2:24 BroadcastVideo
177
+2:26 MultimediaStreaming
178
+2:32 RealTimeInteractive
179
+2:34 MultimediaConferencing
180
+2:40 Signalling
181
+2:46 Telephony
182
+2:48 NetworkControl
183
+```
184
175
-1. It is real-time (per second updates)
176
-2. QoS really works in Linux - check that the `background` traffic is squeezed when `surfing` needs it.
185
+Add the following configuration option in `/etc/netdata.conf`:
186
+```[plugin:tc]
187
+ enable show all classes and qdiscs for all interfaces = yes
188
+```
189
178
-
190
+Finally, create `/etc/netdata/tc-qos-helper.conf` with this content:
191
+```tc_show="class"```
192
193
194