Skip to content

[ UDP ] packet buffer size 조절

조회 수 6963 추천 수 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/f15/trackback
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
367 linux daemon (리눅스 데몬 설명) ADMINPLAY 2014-02-26 647988
366 대용량 HDD 파티셔닝(Mass storage Partitioning) (GPT 파... ADMINPLAY 2010-04-14 74039
365 FFMPEG를 가장쉽게 설치하는 방법(ffmpeg-php 등) ADMINPLAY 2010-05-03 66811
364 rrdtool 컴파일시 에러 configure: error: Please fix the... ADMINPLAY 2009-08-08 65171
363 커널 2.6으로 업그레이드!「A to Z」 ADMINPLAY 2009-08-08 64820
362 e2fsck - 파일 시스템 복구 및 검사. - fsck file ADMINPLAY 2010-09-12 60903
361 배치파일을 이용한 백업방법 l2zeo 2010-03-31 59533
360 Maskrading ADMIN 2008-11-11 59187
359 시스템 백업과 응급 복구 ADMINPLAY 2009-05-11 59147
358 리눅스 전원부터 부팅이 되기까지의 과정이해 ADMIN 2008-11-11 58026
357 리눅스 디렉토리 구조와 파티션 관리의 기본 ADMINPLAY 2009-05-22 57973
356 hdparm 세부옵션 ADMINPLAY 2012-01-16 55535
355 CentOS 설치 - VMware 상에서 CentOS 설치하기 file l2zeo 2010-02-24 52101
354 Red Hat Linux 9 ADMINPLAY 2009-09-24 51551
353 Dell OMSA 설치 및 이용방법 ADMINPLAY 2014-08-13 50210
352 2TB이상의 Disk를 사용한 Raid6 구성 ADMINPLAY 2015-08-08 46621
351 sulinux 1.0. 서버 패키지 리스트 ADMINPLAY 2011-04-30 45975
350 ORA-01031: insufficient privileges 오류 ADMINPLAY 2010-02-24 41013
349 [APM] 리눅스에서 Apache, PHP, MySQL 등 제거 방법 ADMINPLAY 2009-06-29 39388
348 AIX 필수 명령어 ADMINPLAY 2009-12-10 39124

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234