리눅스 txqueuelen 변경

txqueuelen 설정
리눅스 txqueuelen 변경
송신 큐 길이(transmit queue length)

1 개요[ | ]

  • 송신 큐 길이의 기본값은 1000이다. 10000으로 바꾸어보자.
  • tx 큐가 가득 차면 패킷 손실이 일어날 수 있다. → 커야 한다.
  • tx 큐가 크면 메모리를 많이 필요로 한다. → 작아야 한다.[1]
  • ifconfig 명령어를 이용하여 즉시 변경할 수 있다.
  • 재부팅시에 초기화 된다.

2 방법 1: 하나씩 변경하기 (임시)[ | ]

변경 전
Console
Copy
[root@zetawiki ~]# ifconfig eth9 | grep txqueuelen
          collisions:0 txqueuelen:1000
[root@zetawiki ~]# ifconfig eth11 | grep txqueuelen
          collisions:0 txqueuelen:1000
[root@zetawiki ~]# ifconfig bond1 | grep txqueuelen
          collisions:0 txqueuelen:0
변경
Console
Copy
[root@zetawiki ~]# ifconfig eth9 txqueuelen 10000
[root@zetawiki ~]# ifconfig eth11 txqueuelen 10000
[root@zetawiki ~]# ifconfig bond1 txqueuelen 10000
변경 후
Console
Copy
[root@zetawiki ~]# ifconfig eth9 | grep txqueuelen
          collisions:0 txqueuelen:10000
[root@zetawiki ~]# ifconfig eth11 | grep txqueuelen
          collisions:0 txqueuelen:10000
[root@zetawiki ~]# ifconfig bond1 | grep txqueuelen
          collisions:0 txqueuelen:10000

3 방법 2: 한방에 적용하기 (임시)[ | ]

명령어
Bash
Copy
ifconfig | grep ^eth | awk '{print $1}' | xargs -i{} ifconfig {} txqueuelen 원하는값
실행예시
Console
Copy
[root@zetawiki ~]# ifconfig | grep txqueuelen
          collisions:0 txqueuelen:1000 
          collisions:0 txqueuelen:1000 
          collisions:0 txqueuelen:0
Console
Copy
[root@zetawiki ~]# ifconfig | grep ^eth | awk '{print $1}' | xargs -i{} ifconfig {} txqueuelen 10000
[root@zetawiki ~]# ifconfig | grep txqueuelen
          collisions:0 txqueuelen:10000 
          collisions:0 txqueuelen:10000 
          collisions:0 txqueuelen:0
→ txqueuelen이 1000에서 10000으로 변경되었다.
→ 마지막 행의 txqueuelen이 0인 이유는 lo(루프백 어댑터)라서 그렇다.

4 방법 3: 영구적용[ | ]

  • 재부팅되면 초기화되므로, 영구적용하기 위해서는 /etc/rc.local에 아래 내용과 같이 추가하는 방법으로 설정해둔다.
Bash
Copy
/sbin/ifconfig eth0 txqueuelen 10000
/sbin/ifconfig eth1 txqueuelen 10000

5 같이 보기[ | ]

6 주석[ | ]

  1. 트레이드오프. → 패킷 손실 현상이 있고 메모리에 여유가 있다면 txqueuelen 값을 좀더 높게 해보자.

7 참고[ | ]

  • 리눅스 hosts 파일
    hosts 파일 내용을 아래와 같이 같은 이름 test1을 2개 설정한 경우, test1을 호출하면 위에 있는 8.8.8.8로 접속 -> 위 부분에서 8.8.8.8 서버가 통신이 안되면 8.8.4.4 서버로 질의를 해서 dns를 호출하나요?? 올해대박
  • 리눅스 hosts 파일
    hosts 파일(및 DNS)에 그런 기능은 없고, 도메인명을 IP주소로 해석(resolve)해주는 역할만 합니다. 즉, 해당 IP가 접속이 되든 안되든 상관없이, 계속 test1가 8.8.8.8라고 알려줍니다.J Jmnote
  • 리눅스 nc 포트 열기
    중지시키려면 kill -9 27909 ^^
  • 우분투 절전모드 해제시 와이파이 안되는 문제
    driver=iwlwifi 인 인텔 랜카드를 사용중인데 됐다 안됐다 하네요 그래도 아예 안되는것 보다는 나은것 같습니다. D4RT
  • 우분투 절전모드 해제시 와이파이 안되는 문제
    으휴, 컴이 똥컴만 아니면 윈도우 쓸텐데... Beyondthelimit