Skip to content

Commit 84ca9b2

Browse files
Merge pull request #1471 from dcbw/4-northd-threads
Bug 2092495: ovn: use up to 4 northd threads in non-SNO clusters
2 parents 38b3e99 + 4b665d8 commit 84ca9b2

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

Diff for: bindata/network/ovn-kubernetes/managed/ovnkube-master.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ spec:
117117
--ovnnb-db "{{.OVN_NB_DB_LIST}}" \
118118
--ovnsb-db "{{.OVN_SB_DB_LIST}}" \
119119
--pidfile /var/run/ovn/ovn-northd.pid \
120+
--n-threads={{.NorthdThreads}} \
120121
-p /ovn-cert/tls.key \
121122
-c /ovn-cert/tls.crt \
122123
-C /ovn-ca/ca-bundle.crt &

Diff for: bindata/network/ovn-kubernetes/self-hosted/ovnkube-master.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ spec:
8787
--ovnnb-db "{{.OVN_NB_DB_LIST}}" \
8888
--ovnsb-db "{{.OVN_SB_DB_LIST}}" \
8989
--pidfile /var/run/ovn/ovn-northd.pid \
90+
--n-threads={{.NorthdThreads}} \
9091
-p /ovn-cert/tls.key \
9192
-c /ovn-cert/tls.crt \
9293
-C /ovn-ca/ca-bundle.crt &

Diff for: pkg/network/ovn_kubernetes.go

+6
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,14 @@ func renderOVNKubernetes(conf *operv1.NetworkSpec, bootstrapResult *bootstrap.Bo
315315
renderOVNFlowsConfig(bootstrapResult, &data)
316316
if len(bootstrapResult.OVN.MasterAddresses) == 1 {
317317
data.Data["IsSNO"] = true
318+
data.Data["NorthdThreads"] = 1
318319
} else {
319320
data.Data["IsSNO"] = false
321+
// OVN 22.06 and later support multiple northd threads.
322+
// Less resource constrained clusters can use multiple threads
323+
// in northd to improve network operation latency at the cost
324+
// of a bit of CPU.
325+
data.Data["NorthdThreads"] = 4
320326
}
321327

322328
var manifestSubDir string

0 commit comments

Comments
 (0)