Skip to content

[ UDP ] packet buffer size 조절

조회 수 6969 추천 수 0 2013.04.25 01:28:13

Linux에서 Session Clustering 설정 할 경우 buffer size가 부족해서 time out 나는 경우가 있었습니다.


그래서 설정하는 방법에 대해 정리해 보았습니다.


step 1. 현재 설정 값 조회

# sysctl -a | grep mem

net.core.wmem_max = 1048576
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.rmem_default = 262144
net.core.optmem_max = 20480
net.ipv4.igmp_max_memberships = 20
net.ipv4.tcp_mem = 193131 257511 386262
net.ipv4.tcp_wmem = 4096 16384 4194304
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.udp_mem = 193131 257511 386262
net.ipv4.udp_rmem_min = 4096
net.ipv4.udp_wmem_min = 4096


step 2. 값 변경

# vi /etc/sysctl.conf

.

.

.

.

#
# Do not accept IP source route packets (we are not a router)
#net.ipv4.conf.all.accept_source_route = 0
#net.ipv6.conf.all.accept_source_route = 0
#
# Log Martian Packets
#net.ipv4.conf.all.log_martians = 1
#

net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 26214400
net.core.wmem_default = 262144
net.core.wmem_max = 1048576


step 3. 값 적용

rocksea ~ # sysctl -p /etc/sysctl.conf


net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 26214400
net.core.wmem_default = 262144
net.core.wmem_max = 1048576


위와 같이 적용 된 것을 확인 해 볼 수 있습니다.

참고로

wmem은 send

rmem은receive

라고 보시면 됩니다.


자세한 옵션 설명은 아래 주소 참조

http://blog.naver.com/bycymon?Redirect=Log&logNo=100019747080

profile

일요일은 짜빠게뤼~ 먹는날~^^

엮인글 :
http://adminplay.com/197355/c41/trackback
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
47 System V 메시지 큐(Message Queue), 세마포어(Semaphore)... ADMINPLAY 2010-04-28 27342
46 악성코드 일괄 삭제 ADMINPLAY 2010-04-17 27425
45 리눅스 패키지 정보 확인 ADMINPLAY 2010-05-03 27658
44 FFmpeg ADMINPLAY 2010-05-03 27923
43 [linux] 리눅스에서 hostname 변경과 구동과정 ADMINPLAY 2010-12-16 28298
42 고정아이피 설정하기(Ubuntu Server DIY ) l2zeo 2010-02-20 28543
41 Http Live Streaming 으로 아이폰 동영상 서비스 ADMINPLAY 2012-02-07 29104
40 [Linux_CentOS_5.5] 텍스트 모드(Text mode)에서 해상도 변경 file ADMINPLAY 2011-02-11 29229
39 CentOS 5.3에서 samba구축방법 file l2zeo 2010-03-08 29455
38 ruby on rails 설치 (Ubuntu Server DIY ) l2zeo 2010-02-20 30437
37 Dstat - 모니터링 file ADMINPLAY 2009-10-30 30688
36 Apache 설치(Ubuntu Server DIY ) l2zeo 2010-02-20 31096
35 FFMpeg + rtspdump + segmenter 를 이용한 iPhone 스트리... ADMINPLAY 2012-02-07 31369
34 Cent OS-5.2 설치 문서 file l2zeo 2010-02-24 31798
33 가상화 (XEN & KVM) 리눅스 - CentOS 5.4 에서 XEN 설치 file ADMINPLAY 2010-03-24 32446
32 리눅스 서버 부하 점검 - htop 소스설치 file [3] ADMINPLAY 2010-09-12 32565
31 시스칼리지- 꿔니님의 클러스트링 강좌 l2zeo 2010-03-08 32766
30 HTTP Live Streaming 구축 ADMINPLAY 2012-02-07 33150
29 리눅스 IO 스케쥴러 변경하기 ADMINPLAY 2010-12-13 33181
28 [Ubuntu] 부팅시 시작되는 데몬 관리하기 – update-rc.d ADMINPLAY 2013-03-05 33234

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234