Évaluation du débit réseau
Utilisez des outils et des méthodes pour mesurer et analyser précisément les performances du réseau dans différents scénarios.
Évaluation du débit réseau est une leçon Linux Networking & TCP/IP for Developers gratuite sur CoddyKit. Ceci est la leçon 3 sur 4. Tu peux lire la leçon complète ci-dessous gratuitement — puis la pratiquer en direct dans le navigateur avec un éditeur de code intégré et un tuteur IA 24/7. Elle fait partie du parcours d'apprentissage Linux Networking & TCP/IP for Developers, et ta progression se synchronise sur le web et l'application CoddyKit. Le cours Linux Networking & TCP/IP for Developers comprend 4 leçons au total.
Certaines parties de cette leçon n'ont pas encore été traduites et s'affichent en anglais.
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!
Questions Fréquemment Posées
La leçon « Évaluation du débit réseau » est-elle gratuite ?
Oui — le texte complet de « Évaluation du débit réseau » est gratuit à lire ici sur le web. Pour la pratiquer de manière interactive (un éditeur de code intégré et un tuteur IA 24/7) et déverrouiller le reste du cours Linux Networking & TCP/IP for Developers, passe à CoddyKit PRO. Le cours Linux Networking & TCP/IP for Developers comprend 4 leçons au total.
Qu'est-ce que j'apprendrai dans « Évaluation du débit réseau » ?
Utilisez des outils et des méthodes pour mesurer et analyser précisément les performances du réseau dans différents scénarios. Tu pratiques Linux Networking & TCP/IP for Developers avec du code pratique que tu exécutes directement dans le navigateur, et un tuteur IA 24/7 répond à tes questions au fur et à mesure que tu avances dans la leçon.
Dois-je avoir de l'expérience pour commencer Linux Networking & TCP/IP for Developers ?
Aucune expérience préalable n'est requise. Linux Networking & TCP/IP for Developers sur CoddyKit est structuré pour les débutants jusqu'aux apprenants avancés, donc tu peux commencer ici ou depuis le début et avancer à ton rythme. Ceci est la leçon 3 sur 4.
Combien de temps prend la leçon « Évaluation du débit réseau » ?
La plupart des leçons CoddyKit prennent environ 5–10 minutes. Chacune est courte et interactive, tu progresses régulièrement et tu repiques exactement où tu t'es arrêté sur le web et l'app.
Peux-tu écrire et exécuter du code dans cette leçon Linux Networking & TCP/IP for Developers ?
Oui. Chaque leçon Linux Networking & TCP/IP for Developers inclut un éditeur de code intégré, tu écris et exécutes du vrai code directement dans ton navigateur et tu reçois des retours IA instantanés — aucune configuration locale requise.
Toutes les leçons de ce cours
- Paramètres réseau du noyau
- Réglage et optimisation des NIC
- Évaluation du débit réseau
- Régler le contrôle de congestion TCP