0Pricing
Linux Networking & TCP/IP for Developers · Lekcja

Pomiar przepustowości sieci

Wykorzystaj narzędzia i metodyki do dokładnego pomiaru i analizy wydajności sieci w różnych scenariuszach.

Pomiar przepustowości sieci to bezpłatna lekcja Linux Networking & TCP/IP for Developers na CoddyKit. To lekcja 3 z 4. Możesz przeczytać całą lekcję poniżej za darmo — a potem ćwiczyć ją interaktywnie w przeglądarce z wbudowanym edytorem kodu i tutorem AI dostępnym 24/7. To część ścieżki edukacyjnej Linux Networking & TCP/IP for Developers, a Twój postęp synchronizuje się między webem a aplikacją CoddyKit. Kurs Linux Networking & TCP/IP for Developers zawiera 4 lekcji w sumie.

Części tej lekcji nie zostały jeszcze przetłumaczone i są wyświetlane po angielsku.

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 -s

Running 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 100M

Maximizing 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 4

Other 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 iperf3 in both server and client modes.
  • Interpreting iperf3 results, 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!

Często zadawane pytania

Czy lekcja „Pomiar przepustowości sieci” jest bezpłatna?

Tak — pełny tekst „Pomiar przepustowości sieci” jest dostępny za darmo tutaj w sieci. Aby ćwiczyć ją interaktywnie (wbudowany edytor kodu i tutor AI dostępny 24/7) i odblokować resztę kursu Linux Networking & TCP/IP for Developers, przejdź na CoddyKit PRO. Kurs Linux Networking & TCP/IP for Developers zawiera 4 lekcji w sumie.

Co nauczysz się w „Pomiar przepustowości sieci”?

Wykorzystaj narzędzia i metodyki do dokładnego pomiaru i analizy wydajności sieci w różnych scenariuszach. Ćwiczysz Linux Networking & TCP/IP for Developers z praktycznym kodem, który uruchamiasz bezpośrednio w przeglądarce, a tutor AI dostępny 24/7 odpowiada na Twoje pytania podczas pracy nad lekcją.

Czy potrzebuję doświadczenia, aby zacząć Linux Networking & TCP/IP for Developers?

Nie wymagamy żadnego doświadczenia. Linux Networking & TCP/IP for Developers w CoddyKit jest strukturyzowany dla początkujących i zaawansowanych użytkowników, więc możesz zacząć tutaj lub od początku i uczyć się w swoim tempie. To lekcja 3 z 4.

Ile czasu zajmuje lekcja „Pomiar przepustowości sieci”?

Większość lekcji CoddyKit trwa około 5–10 minut. Każda lekcja to mały, interaktywny krok, dzięki czemu robisz systematyczne postępy i zawsze wracasz dokładnie do tego samego miejsca — na webie i w aplikacji.

Czy mogę pisać i uruchamiać kod w tej lekcji Linux Networking & TCP/IP for Developers?

Tak. Każda lekcja Linux Networking & TCP/IP for Developers zawiera wbudowany edytor kodu, więc piszesz i uruchamiasz prawdziwy kod bezpośrednio w przeglądarce i od razu otrzymujesz sprzężenie zwrotne od AI — bez konfiguracji na komputerze.

Wszystkie lekcje w tym kursie

  1. Parametry sieciowe jądra
  2. Dostrajanie i optymalizacja NIC
  3. Pomiar przepustowości sieci
  4. Dostrajanie kontroli przeciążenia TCP
← Powrót do Linux Networking & TCP/IP for Developers