Netzwerkdurchsatz benchmarken
Setzen Sie Werkzeuge und Methoden ein, um die Netzwerkleistung in verschiedenen Szenarien präzise zu messen und zu analysieren.
Netzwerkdurchsatz benchmarken ist eine kostenlose Linux Networking & TCP/IP for Developers-Lektion auf CoddyKit. Dies ist Lektion 3 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des Linux Networking & TCP/IP for Developers-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der Linux Networking & TCP/IP for Developers-Kurs umfasst insgesamt 4 Lektionen.
Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.
Why Benchmark Network Speed?
Ever wonder if your internet connection is truly delivering what it promises? Or if your local network is a bottleneck?
Network benchmarking helps you measure and understand your network's actual performance. It's crucial for diagnosing slowdowns, verifying upgrades, or planning system deployments.
Key Throughput Metrics
When we talk about network performance, we often focus on these key metrics:
- Throughput (Bandwidth): The amount of data transferred successfully per unit of time, usually measured in bits per second (bps) or bytes per second (Bps).
- Latency: The time it takes for a data packet to travel from one point to another.
- Jitter: The variation in latency over time.
- Packet Loss: The percentage of data packets that fail to reach their destination.
For benchmarking, throughput is often the primary focus.
Introducing iperf3 for Throughput
iperf3 is a powerful command-line tool specifically designed for measuring maximum network throughput between two hosts.
It's widely used because it can test both TCP and UDP connections, show detailed statistics, and is available on almost all platforms, including Linux.
Setting Up iperf3 Server
To test network throughput with iperf3, you need two machines: one acting as a server and one as a client.
First, on one of your Linux machines (the 'server'), start iperf3 in server mode. It will listen for incoming connections.
iperf3 -sRunning a Basic iperf3 Client Test
Now, on your second Linux machine (the 'client'), run iperf3 in client mode, pointing it to the server's IP address.
This command will perform a default 10-second TCP test, sending data from the client to the server.
iperf3 -c <server_ip_address>Interpreting iperf3 Output
After the test, both the client and server will display results. Look for the 'Bandwidth' column, which shows the throughput.
Key metrics in the output:
- Interval: Time segments of the test.
- Transfer: Total data sent/received in that interval.
- Bandwidth: The average data rate for that interval.
- Retr: Number of retransmitted packets (for TCP), indicating network issues.
Testing UDP Throughput and Loss
iperf3 can also test UDP performance, which is useful for applications like video streaming or VoIP where packet loss is more critical than retransmissions.
Use the -u flag on the client to switch to UDP mode. You can also specify a target bandwidth with -b.
iperf3 -c <server_ip_address> -u -b 100MMaximizing Throughput with Parallel Streams
Sometimes, a single TCP stream might not fully utilize your network's capacity due to TCP windowing or latency.
You can use the -P flag to run multiple parallel streams simultaneously, which can reveal the true maximum throughput of your link.
iperf3 -c <server_ip_address> -P 4Other iperf3 Options
iperf3 offers many other options for fine-tuning your tests:
-R: Reverse mode (server sends, client receives).-t: Set test duration.-i: Set interval for reporting.-J: Output results in JSON format for scripting.
Always check iperf3 --help for a full list of options!
Quick Check on iperf3
You've run an iperf3 TCP test from a client to a server. The client output shows a 'Retr' count of 150. What does this indicate?
Recap: Benchmarking Throughput
In this lesson, we explored network throughput benchmarking. We learned:
- Why benchmarking is essential for understanding network performance.
- Key metrics like throughput, latency, jitter, and packet loss.
- How to use
iperf3in both server and client modes. - Interpreting
iperf3results, including bandwidth and retransmissions. - Testing UDP performance and using parallel streams for maximum throughput.
Mastering iperf3 is a vital skill for any network professional or developer!
Häufig gestellte Fragen
Ist die Lektion „Netzwerkdurchsatz benchmarken“ kostenlos?
Ja — der vollständige Text von „Netzwerkdurchsatz benchmarken“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des Linux Networking & TCP/IP for Developers-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der Linux Networking & TCP/IP for Developers-Kurs umfasst insgesamt 4 Lektionen.
Was lerne ich in „Netzwerkdurchsatz benchmarken“?
Setzen Sie Werkzeuge und Methoden ein, um die Netzwerkleistung in verschiedenen Szenarien präzise zu messen und zu analysieren. Du übst Linux Networking & TCP/IP for Developers mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.
Brauche ich Erfahrung, um Linux Networking & TCP/IP for Developers zu starten?
Keine Vorkenntnisse erforderlich. Linux Networking & TCP/IP for Developers auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 3 von 4.
Wie lange dauert die Lektion „Netzwerkdurchsatz benchmarken“?
Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.
Kann ich in dieser Linux Networking & TCP/IP for Developers-Lektion Code schreiben und ausführen?
Ja. Jede Linux Networking & TCP/IP for Developers-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.
Alle Lektionen in diesem Kurs
- Netzwerkparameter des Kernels
- NIC-Tuning und -Optimierung
- Netzwerkdurchsatz benchmarken
- TCP-Staukontrolle feinabstimmen