Linux Networking & TCP/IP for Developers · 강의

NIC 튜닝 및 최적화

처리량을 높이도록 오프로딩 기능과 큐 관리 등을 포함한 네트워크 인터페이스 카드(NIC) 설정을 최적화합니다.

레슨 2/411개 단계

NIC 튜닝 및 최적화은(는) CoddyKit의 무료 Linux Networking & TCP/IP for Developers 강의입니다. 이것은 4개 중 2번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Linux Networking & TCP/IP for Developers 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Linux Networking & TCP/IP for Developers 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

Introduction to NIC Tuning

Welcome to NIC Tuning & Optimization! In this lesson, we'll explore how to fine-tune your Network Interface Card (NIC) for better performance.

A NIC is the hardware that connects your computer to a network. Optimizing its settings can significantly improve network throughput and reduce CPU load.

Discovering Your Network Interfaces

Before tuning, you need to know your NIC's name. The ip link command lists all network interfaces on your Linux system, showing their status and names.

Common names include eth0, enp0s3, or wlan0 for Wi-Fi.

ip link show

Meet ethtool: Your NIC Utility

ethtool is the primary command-line utility for querying and controlling NIC driver and hardware settings on Linux. It's essential for performance tuning.

You can use it to inspect speed, duplex settings, offloading capabilities, and more.

ethtool eth0

Inspecting NIC Capabilities

One of ethtool's powerful features is showing what hardware offloading capabilities your NIC supports and which are currently enabled.

This helps you understand if your NIC can handle certain network tasks instead of the CPU.

ethtool -k eth0

Understanding Offloading

Offloading means delegating network processing tasks from the main CPU to the NIC's specialized hardware. This frees up CPU cycles for other applications.

  • Checksum Offload: NIC calculates/verifies IP, TCP, or UDP checksums.
  • Segmentation Offload: NIC handles segmenting large data blocks.

These features are crucial for high-performance networking.

TSO and GRO Explained

Two important offloading features are TSO and GRO:

  • TSO (TCP Segmentation Offload): Allows the operating system to pass a large chunk of data (up to 64KB) to the NIC, which then segments it into smaller TCP packets.
  • GRO (Generic Receive Offload): Combines multiple incoming packets into a single larger packet before passing it to the kernel, reducing processing overhead.

Both improve performance for large data transfers.

Configuring Offload Features

You can enable or disable specific offload features using ethtool -K. Be cautious when changing these, as incorrect settings can sometimes degrade performance or cause issues.

Always test changes in a controlled environment.

sudo ethtool -K eth0 rx-checksum on
sudo ethtool -K eth0 tso off

NIC Queues Overview

Network Interface Cards use Receive (RX) and Transmit (TX) queues to buffer packets. Multiple queues are especially beneficial on multi-core CPUs, allowing different cores to process different queues.

  • More queues can improve parallelism.
  • Larger queue sizes can prevent packet drops during bursts.

Managing NIC Queue Settings

You can inspect and modify the number of RX/TX queues using ethtool.

  • ethtool -g eth0: Shows current and maximum queue settings.
  • ethtool -L eth0 rx 4 tx 4: Sets the number of RX and TX queues to 4.

Adjusting these can help distribute network load across CPU cores.

ethtool -g eth0

Quick Check: NIC Tuning

Consider a scenario where your server is experiencing high CPU utilization during heavy network traffic, and you suspect the NIC might not be offloading tasks efficiently.

Which ethtool command would you use to check the current status of offloading features?

Recap & Next Steps

Great job! You've learned how to inspect and optimize your Linux Network Interface Card.

  • We covered identifying NICs with ip link.
  • You met ethtool for checking and configuring NIC settings.
  • We explored offloading features like Checksum, TSO, and GRO.
  • You also learned about managing RX/TX queues for better parallelism.

These tuning techniques can significantly boost your network's performance. Keep practicing with ethtool!

무료로 시작

AI 튜터와 함께 Linux Networking & TCP/IP for Developers을(를) 배우세요 — 무료

브라우저에서 실제 코드를 작성하고 실행하며, 24/7 AI 튜터로부터 즉각적인 도움을 받고, 웹이나 앱에서 중단한 부분부터 계속 학습하세요.

코스
12
레슨
48

자주 묻는 질문

“NIC 튜닝 및 최적화” 강의는 무료인가요?

네 — “NIC 튜닝 및 최적화” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Linux Networking & TCP/IP for Developers 강의 전체를 잠금 해제할 수 있습니다. Linux Networking & TCP/IP for Developers 강의에는 총 4개의 강의가 포함되어 있습니다.

“NIC 튜닝 및 최적화”에서 뭘 배우나요?

처리량을 높이도록 오프로딩 기능과 큐 관리 등을 포함한 네트워크 인터페이스 카드(NIC) 설정을 최적화합니다. 브라우저에서 직접 실행하는 실습 코드로 Linux Networking & TCP/IP for Developers을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

Linux Networking & TCP/IP for Developers을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 Linux Networking & TCP/IP for Developers은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 2번째 강의입니다.

“NIC 튜닝 및 최적화” 강의는 얼마나 걸리나요?

대부분의 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(으)로 돌아가기