0Pricing
Linux Networking & TCP/IP for Developers · บทเรียน

การวัดประสิทธิภาพอัตราการรับส่งข้อมูลเครือข่าย

ใช้เครื่องมือและระเบียบวิธีเพื่อวัดและวิเคราะห์ประสิทธิภาพเครือข่ายในสถานการณ์ต่าง ๆ ได้อย่างแม่นยำ

การวัดประสิทธิภาพอัตราการรับส่งข้อมูลเครือข่าย เป็นบทเรียน Linux Networking & TCP/IP for Developers ฟรีบน CoddyKit นี่คือบทเรียนที่ 3 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน Linux Networking & TCP/IP for Developers และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส Linux Networking & TCP/IP for Developers มีบทเรียนทั้งหมด 4 บทเรียน

บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ

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!

คำถามที่พบบ่อย

บทเรียน “การวัดประสิทธิภาพอัตราการรับส่งข้อมูลเครือข่าย” ฟรีหรือไม่

ใช่ — ข้อความเต็มของ “การวัดประสิทธิภาพอัตราการรับส่งข้อมูลเครือข่าย” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส Linux Networking & TCP/IP for Developers ให้อัปเกรดเป็น CoddyKit PRO คอร์ส Linux Networking & TCP/IP for Developers มีบทเรียนทั้งหมด 4 บทเรียน

คุณจะเรียนรู้อะไรในบทเรียน “การวัดประสิทธิภาพอัตราการรับส่งข้อมูลเครือข่าย”

ใช้เครื่องมือและระเบียบวิธีเพื่อวัดและวิเคราะห์ประสิทธิภาพเครือข่ายในสถานการณ์ต่าง ๆ ได้อย่างแม่นยำ คุณปฏิบัติ Linux Networking & TCP/IP for Developers ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน

คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน Linux Networking & TCP/IP for Developers หรือไม่

ไม่จำเป็นต้องมีประสบการณ์มาก่อน Linux Networking & TCP/IP for Developers บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 3 จากทั้งหมด 4 บทเรียน

บทเรียน “การวัดประสิทธิภาพอัตราการรับส่งข้อมูลเครือข่าย” ใช้เวลานานแค่ไหน

บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย

ฉันเขียนและรันโค้ดในบทเรียน Linux Networking & TCP/IP for Developers นี้ได้ไหม

ได้ บทเรียน Linux Networking & TCP/IP for Developers ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ

บทเรียนทั้งหมดในหลักสูตรนี้

  1. พารามิเตอร์เครือข่ายของเคอร์เนล
  2. การปรับแต่งและเพิ่มประสิทธิภาพ NIC
  3. การวัดประสิทธิภาพอัตราการรับส่งข้อมูลเครือข่าย
  4. การปรับจูนการควบคุมความแออัดของ TCP
← กลับไปที่ Linux Networking & TCP/IP for Developers