Avaliação da Taxa de Transferência da Rede
Utilize ferramentas e metodologias para medir e analisar com precisão o desempenho da rede em diferentes cenários.
Avaliação da Taxa de Transferência da Rede é uma aula grátis de Linux Networking & TCP/IP for Developers no CoddyKit. Esta é a aula 3 de 4. Você pode ler a aula completa abaixo gratuitamente — depois pratica ao vivo no navegador com um editor de código integrado e um tutor de IA 24/7. Faz parte do caminho de aprendizado de Linux Networking & TCP/IP for Developers, e seu progresso é sincronizado entre a web e o app CoddyKit. O curso de Linux Networking & TCP/IP for Developers inclui 4 aulas no total.
Partes desta aula ainda não foram traduzidas e aparecem em inglês.
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!
Perguntas Frequentes
A aula “Avaliação da Taxa de Transferência da Rede” é grátis?
Sim — o texto completo de “Avaliação da Taxa de Transferência da Rede” é grátis para ler aqui na web. Para praticá-la interativamente (um editor de código integrado e um tutor de IA 24/7) e desbloquear o restante do curso de Linux Networking & TCP/IP for Developers, atualize para CoddyKit PRO. O curso de Linux Networking & TCP/IP for Developers inclui 4 aulas no total.
O que vou aprender em “Avaliação da Taxa de Transferência da Rede”?
Utilize ferramentas e metodologias para medir e analisar com precisão o desempenho da rede em diferentes cenários. Você pratica Linux Networking & TCP/IP for Developers com código prático que executa diretamente no navegador, e um tutor de IA 24/7 responde suas dúvidas enquanto trabalha na aula.
Preciso ter experiência prévia para começar Linux Networking & TCP/IP for Developers?
Nenhuma experiência prévia é necessária. Linux Networking & TCP/IP for Developers no CoddyKit é estruturado para alunos iniciantes até avançados, então você pode começar aqui ou desde o início e aprender no seu ritmo. Esta é a aula 3 de 4.
Quanto tempo leva a aula “Avaliação da Taxa de Transferência da Rede”?
A maioria das aulas CoddyKit leva cerca de 5–10 minutos. Cada uma é compacta e interativa, então você faz progresso constante e retoma exatamente de onde parou entre web e app.
Posso escrever e executar código nesta aula de Linux Networking & TCP/IP for Developers?
Sim. Cada aula de Linux Networking & TCP/IP for Developers inclui um editor de código integrado, então você escreve e executa código real direto no navegador e recebe feedback de IA instantaneamente — nenhuma configuração local necessária.
Todas as aulas deste curso
- Parâmetros de Rede do Kernel
- Ajuste e Otimização da NIC
- Avaliação da Taxa de Transferência da Rede
- Ajuste do controle de congestionamento do TCP