Skip to content

Commit f95736d

Browse files
authored
Add multithreading blurb (#195)
* Add multithreading blurb * Make linter happy
1 parent dc60c6b commit f95736d

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

docs/multithreading.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: Multithreading
3+
description: Enable ZeroTier to use multiple physical cores
4+
---
5+
6+
As of version `1.14.1` ZeroTier is capable of utilizing more than one CPU core for traffic processing. This enables greater total throughput and more efficient use of machines handling large amounts of traffic.
7+
8+
:::info BETA
9+
This is currently a beta feature and we welcome any feedback and/or test results. For now it is only available for Linux and is disabled by default. It will be ported to FreeBSD, macOS, and Windows in a future release.
10+
:::
11+
12+
The feature requires manual activation using the `local.conf` file in the same home directory that stores your node’s identity files. If that file is not already present, create it.
13+
14+
### Example usage
15+
16+
```json title="Example local.conf"
17+
{
18+
"settings":
19+
{
20+
"multicoreEnabled": true,
21+
"concurrency": 2,
22+
"cpuPinningEnabled": true
23+
}
24+
}
25+
```
26+
27+
*[See here](https://docs.zerotier.com/config) for more info on how to configure the client using `local.conf`*
28+
29+
### Tip for success
30+
31+
It is recommended that you choose a concurrency level that is reflective of the actual number of physical (not virtual) cores on your machine. For instance, if `nproc` reports `4`, set a concurrency level of `2`. Additionally, enabling [pinning](https://en.wikipedia.org/wiki/Processor_affinity) seems to improve performance in more cases than not.
32+
33+
Multithreading is unlikely to improve performance over the Internet but will over a physical LAN in most cases.

sidebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ module.exports = {
227227
description: 'ZeroTier is designed to operate on resource constrained devices and under 16MB of memory.',
228228
slug: '/iot',
229229
},
230-
items: ['lbm', 'compatibility', 'bridging', 'proxy', 'route-between-phys-and-virt'],
230+
items: ['lbm', 'multithreading', 'compatibility', 'bridging', 'proxy', 'route-between-phys-and-virt'],
231231
},
232232
/* FreeBSD */
233233
{

0 commit comments

Comments
 (0)