You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
= Configuring FIFO priority scheduling for PTP hardware
7
+
8
+
In telco or other deployment configurations that require low latency performance, PTP daemon threads run in a constrained CPU footprint alongside the rest of the infrastructure components. By default, PTP threads run with the `SCHED_OTHER` policy. Under high load, these threads might not get the scheduling latency they require for error-free operation.
9
+
10
+
To mitigate against potential scheduling latency errors, you can configure the PTP Operator `linuxptp` services to allow threads to run with a `SCHED_FIFO` policy. If `SCHED_FIFO` is set for a `PtpConfig` CR, then `ptp4l` and `phc2sys` will run in the parent container under `chrt` with a priority set by the `ptpSchedulingPriority` field of the `PtpConfig` CR.
11
+
12
+
[NOTE]
13
+
====
14
+
Setting `ptpSchedulingPolicy` is optional, and is only required if you are experiencing latency errors.
15
+
====
16
+
17
+
.Procedure
18
+
19
+
. Edit the `PtpConfig` CR profile:
20
+
+
21
+
[source,terminal]
22
+
----
23
+
$ oc edit PtpConfig -n openshift-ptp
24
+
----
25
+
26
+
. Change the `ptpSchedulingPolicy` and `ptpSchedulingPriority` fields:
27
+
+
28
+
[source,yaml]
29
+
----
30
+
apiVersion: ptp.openshift.io/v1
31
+
kind: PtpConfig
32
+
metadata:
33
+
name: <ptp_config_name>
34
+
namespace: openshift-ptp
35
+
...
36
+
spec:
37
+
profile:
38
+
- name: "profile1"
39
+
...
40
+
ptpSchedulingPolicy: SCHED_FIFO <1>
41
+
ptpSchedulingPriority: 65 <2>
42
+
----
43
+
<1> Scheduling policy for `ptp4l` and `phc2sys` processes. Use `SCHED_FIFO` on systems that support FIFO scheduling.
44
+
<2> Required. Sets the integer value 1-65 used to configure FIFO priority for `ptp4l` and `phc2sys` processes.
45
+
46
+
. Save and exit to apply the changes to the `PtpConfig` CR.
47
+
48
+
.Verification
49
+
50
+
. Get the name of the `linuxptp-daemon` pod and corresponding node where the `PtpConfig` CR has been applied:
<2> Specify an array of one or more `profile` objects.
@@ -153,12 +155,14 @@ spec:
153
155
<7> The interface name to synchronize from.
154
156
<8> The interface to synchronize devices connected to the interface.
155
157
<9> Specify system config options for the `phc2sys` service, for example `-a -r`. If this field is empty the PTP Operator does not start the `phc2sys` service.
156
-
<10> Specify an array of one or more `recommend` objects which define rules on how the `profile` should be applied to nodes.
157
-
<11> Specify the `profile` object name defined in the `profile` section.
158
-
<12> Specify the `priority` with an integer value between `0` and `99`. A larger number gets lower priority, so a priority of `99` is lower than a priority of `10`. If a node can be matched with multiple profiles according to rules defined in the `match` field, the profile with the higher priority is applied to that node.
159
-
<13> Specify `match` rules with `nodeLabel` or `nodeName`.
160
-
<14> Specify `nodeLabel` with the `key` of `node.Labels` from the node object.
161
-
<15> Specify `nodeName` with `node.Name` from the node object.
158
+
<10> Scheduling policy for ptp4l and phc2sys processes. Default value is `SCHED_OTHER`. Use `SCHED_FIFO` on systems that support FIFO scheduling.
159
+
<11> Integer value from 1-65 used to set FIFO priority for `ptp4l` and `phc2sys` processes. Required if `SCHED_FIFO` is set for `ptpSchedulingPolicy`.
160
+
<12> Specify an array of one or more `recommend` objects that define rules on how the `profile` should be applied to nodes.
161
+
<13> Specify the `profile` object name defined in the `profile` section.
162
+
<14> Specify the `priority` with an integer value between `0` and `99`. A larger number gets lower priority, so a priority of `99` is lower than a priority of `10`. If a node can be matched with multiple profiles according to rules defined in the `match` field, the profile with the higher priority is applied to that node.
163
+
<15> Specify `match` rules with `nodeLabel` or `nodeName`.
164
+
<16> Specify `nodeLabel` with the `key` of `node.Labels` from the node object.
165
+
<17> Specify `nodeName` with `node.Name` from the node object.
0 commit comments