Skip to content

Commit 1855765

Browse files
[CI:DOCS] performance: update network docs
* Document that pasta is now the default network driver * Document command: podman info -f '{{.Host.RootlessNetworkCmd}}' * Add note about missing network isolation Fixes: containers#22748 Co-authored-by: Stefano Brivio <[email protected]> Signed-off-by: Erik Sjölund <[email protected]>
1 parent f7bd15d commit 1855765

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

docs/tutorials/performance.md

+22-8
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,13 @@ See storage.conf(5) for all available configuration settings.
144144

145145
### Network performance for rootless Podman
146146

147-
When using rootless Podman, network traffic is normally passed through
148-
[slirp4netns](https://github.com/containers/podman/blob/main/docs/tutorials/basic_networking.md#slirp4netns).
149-
This comes with a performance penalty.
147+
When using rootless Podman, network traffic is normally passed through the network driver
148+
[pasta](https://passt.top/passt/about/#pasta). This comes with a performance penalty.
150149

151-
You can avoid using slirp4netns in the following ways:
150+
You can avoid using _pasta_ in the following ways:
152151

153152
* Use socket activation for listening network sockets. Communication over the activated socket does not pass through
154-
slirp4netns, so it has the same performance characteristics as the normal network on the host.
153+
pasta, so it has the same performance characteristics as the normal network on the host.
155154
Socket-activated services can be started and stopped in different ways:
156155
+ Let systemd start the service when the first client connects. Let the service terminate by itself after some time of inactivity.
157156
Using a service on demand, can free up compute resources.
@@ -160,13 +159,28 @@ You can avoid using slirp4netns in the following ways:
160159
The [socket activation tutorial](https://github.com/containers/podman/blob/main/docs/tutorials/socket_activation.md)
161160
provides more information about socket activation support in Podman.
162161

163-
* Use the network driver [_pasta_](https://passt.top/passt/about/#pasta). Pasta is under development and currently needs a patched Podman to run.
164-
165-
* Set up the network manually as root. Create a bridge and virtual ethernet pair (VETH). See the [example](https://lists.podman.io/archives/list/[email protected]/thread/W6MCYO6RY5YFRTSUDAOEZA7SC2EFXRZE/) posted on the Podman mailing list. See also the section _DIY networking_ in [Podman-Rootless-Networking.pdf](https://podman.io/community/meeting/notes/2021-10-05/Podman-Rootless-Networking.pdf).
162+
* Set up the network manually as root. Create a bridge and virtual ethernet pair (VETH). Note: compared to other methods,
163+
this setup doesn't provide any network isolation. In containers granted CAP_NET_ADMIN or CAP_NET_RAW, processes can
164+
open packet or raw sockets directly facing the host, which allows them to send arbitrary frames, including
165+
crafted Ethernet and IP packets, as well as receiving packets that were not originally intended for the container,
166+
by means of ARP spoofing.
167+
For more information, see
168+
+ An [example](https://lists.podman.io/archives/list/[email protected]/thread/W6MCYO6RY5YFRTSUDAOEZA7SC2EFXRZE/) posted on the Podman mailing list
169+
+ The section _DIY networking_ in [Podman-Rootless-Networking.pdf](https://containers.github.io/podman.io_old/old/community/meeting/notes/2021-10-05/Podman-Rootless-Networking.pdf)
166170

167171
* Use `--network=host`. No network namespace is created. The container will use the host’s network.
168172
Note: By using `--network=host`, the container is given full access to local system services such as D-bus and is therefore considered insecure.
169173

174+
Side note: Pasta is faster than the network driver [slirp4netns](https://github.com/containers/podman/blob/main/docs/tutorials/basic_networking.md#slirp4netns).
175+
Pasta is the default network driver since Podman 5.0.0.
176+
177+
Since Podman 5.1.0 the default network driver can be shown with
178+
179+
```
180+
$ podman info -f '{{.Host.RootlessNetworkCmd}}'
181+
pasta
182+
```
183+
170184
### Lazy pulling of container images
171185

172186
Podman supports lazy pulling for the following container image formats:

0 commit comments

Comments
 (0)