NetWorker: 네트워킹 구성에 대한 모범 사례
Summary: 이 문서는 NetWorker 호스트에 필요한 표준 네트워킹 튜닝 가능 항목에 대한 간단한 기준을 제공하기 위해 작성되었습니다.
Symptoms
- 다음을 포함하되 이에 국한되지 않는 네트워킹 또는 호스트 접속 구성 관련 오류:
- 실제 데이터 전송을 완료한 것으로 보이는 백업 실패
- 일반화된 리소스 고갈 또는 통신 붕괴
GSS warning Session information (number hex:hex) registered by user for nsrexecd has expired because a NetWorker daemon had not requested it after 120 minutesGSS error Session information (number hex:hex) was requested by nsrmmd but the session has expiredRPC severe Unable to query NSR database for list of configured devices: RPC receive operation failed; peer = ip_addr:port, errno = Connection timed outRPC severe Unable to query NSR database for list of configured devices: RPC send operation failed; peer = ip_addr:port, errno = Broken pipeNSR notice Chunking ssid ssid failed, because saveset was abortedddp_open_file_ext() failed for File: //mtree/vol_dir/nn/nn/long_ssid, Err: 5004-nfs lookup failed (nfs: No such file or directory) ).NSR critical Connectivity check request is failed for: SN_CONN_REPORT_DD type data_domain deviceRPC error RPC client handle: No route to host.RPC error RPC client handle: Connection refused.RPC error Unable to create the connection with 'portmapper' to host 'hostname' with address 'ip_addr' at port number 7938.RPC critical Aborting client connection from ip_addr: Connection timed out.RPC critical Check whether the firewall is blocking the client ports on the host 'hostname'.RPC critical Check whether the client services are running on the host 'hostname'.
Cause
킵라이브: 모든 소켓은 NetWorker 호출 프로세스가 수신기 데몬 프로세스에 접속하기 위해 생성하며, 네트워크 디바이스가 리소스를 회수하려고 시도하면서 너무 오랫동안 유휴 상태로 유지될 경우 이러한 소켓이 중단될 수 있습니다. 일반적으로 이를 위해서는 NetWorker Server 및 노드에 대해 기본적으로 연결 유지가 활성화되어 있어야 하며 클라이언트에 문제가 발생합니다. NetWorker에는 일부의(전부는 아님) 바이너리에 대한 자체 내부 keepalive 처리가 있습니다. 운영 체제에는 기본적으로 작동해야 하는 keepalive도 있습니다.
포트 가용성: NetWorker가 설정하려는 각 소켓에는 통신을 위한 임시 범위의 포트가 있어야 하지만 이 범위는 모든 운영 체제에서 기본적으로 제한되며 통신을 인위적으로 제한하지 않도록 가능한 최대한으로 열어야 합니다. nsrauth가 기본적으로 활성화된 경우 원하는 단일 소켓에 필요한 포트 수는 3개 이상이며, 장애가 발생할 때마다 빠르게 재시도되어 연결에 성공할 때까지 포트가 TIME_WAIT 상태로 유지됩니다. 따라서 사용 가능한 최대 포트 수를 늘려야 하며, TIME_WAIT 상태를 낮추는 것이 가장 좋습니다.
다른 장기 실행 소켓은 더 높은 복원력을 가능하게 하거나 버퍼링을 개선하는 특정 내부 소프트웨어 변수로 강화될 수도 있습니다.
Resolution
다음은 운영 체제 및 호스트 클래스별 일반적인 권장 설정과 해당 구현 명령입니다. 항상 적용 가능성은 다양합니다. 보편적으로 바람직하다고 간주되는 것들은 주석 처리되지 않은 반면, 더 다양한 적합성을 가진 것들은 주석 처리되지만 필요에 따라 사용할 수 있습니다. 이러한 설정은 일반 권장 사항으로 선의로 제공되지만 구현 전에 운영 체제 관리자가 검토해야 합니다. 이는 서버 및 스토리지 노드에 대한 모든 모범 사례, 기본 모범 사례로 간주됩니다. 클라이언트 적합성은 주어진 환경의 구성 및 역할에 따라 달라질 수 있으며, 이러한 경우 서로 다른 응용 프로그램 서버 역할이 권장 설정과 충돌할 수 있으므로 사용하기 전에 신중하게 고려해야 합니다. 이 경우 역할에 필요한 설정이 우선해야 합니다.
Linux: 모든 적절한 설정을 /nsr/nsrrc 파일 - 서비스 시작 시 실행하기 위해 전역 읽기/실행 권한(755)이 있어야 합니다. 비표준 또는 상황 옵션과 함께 기본 표준 항목은 주석 처리되지 않습니다. 관련 줄에 # 접두사를 사용하여 설정 가용성을 변경합니다. 파일을 배포할 위치에 따라 NetWorker Client, 노드 또는 Server와 관련된 파일을 트리밍합니다. 변경한 후에는 서비스를 다시 시작해야 합니다.
### LINUX - For all NetWorker hosts - Clients, Nodes and Server
NSR_KEEPALIVE_WAIT=10
export NSR_KEEPALIVE_WAIT
NSR_EXEC_MAX_AUTH_THREADS=50
export NSR_EXEC_MAX_AUTH_THREADS
# NSR_SOCK_BUF_SIZE=65536 # (262144 for 10 Gb ETH NICs)
# export NSR_SOCK_BUF_SIZE
# NetWorker internal keepalive settings for some, but not all binaries - 4.5 minutes to ensure keepalives are passed before the increasingly common 5 minute router idle socket kill timer
NW_TCP_KEEPIDLE_SECS=270
export NW_TCP_KEEPIDLE_SECS
NW_TCP_KEEPINTVL_SECS=30
export NW_TCP_KEEPINTVL_SECS
NW_TCP_KEEPCNT=10
export NW_TCP_KEEPCNT
# OS-level keepalive values - also set to 4.5 minutes for the same reason
sysctl -w "net.ipv4.tcp_keepalive_intvl=30"
sysctl -w "net.ipv4.tcp_keepalive_probes=10"
sysctl -w "net.ipv4.tcp_keepalive_time=270"
# Set kernel limits to ensure core dump generation
ulimit -Sn 262144
ulimit -Sc unlimited
### For NetWorker Storage Nodes and Server
# Set kernel limits to provide maximum file descriptor availability
ulimit -Hn 262144
ulimit -Hc unlimited
# Globally disable IPv6, if it is not necessary for operation:
# sysctl -w "net.ipv6.conf.all.disable_ipv6=1"
# Disable dynamic TCP window scaling - requires compatible equipment in the data path, as well as ECN
sysctl -w "net.ipv4.tcp_window_scaling=0"
sysctl -w "net.ipv4.tcp_ecn=0"
# Raise connection backlog (hash tables) to the maximum value allowed if desired
# sysctl -w "net.ipv4.tcp_max_syn_backlog=8192"
# sysctl -w "net.core.netdev_max_backlog=8192" # (For 10 Gb Eth use the value = 30000)
# Raise memory size available for TCP buffers as needed
# sysctl -w "net.core.rmem_default=262144"
# sysctl -w "net.core.wmem_default=262144"
# sysctl -w "net.core.rmem_max=16777216"
# sysctl -w "net.core.wmem_max=16777216"
# sysctl -w "net.ipv4.tcp_rmem=8192 524288 16777216"
# sysctl -w "net.ipv4.tcp_wmem=8192 524288 16777216"
# Increase shared memory pool if required - particularly for immediate mode on Storage Nodes
# sysctl -w kernel.shmmax = 2147483648 # - e.g. 2 GB
# sysctl -w kernel.shmall = 2147483648 # - e.g. 2 GB
# Available TCP client ephemeral port range increase from default:
sysctl -w "net.ipv4.ip_local_port_range=10000 64000"
# Enable TCP Time Wait Reuse for very high load servers and nodes to increase socket reuse availability
sysctl -w "net.ipv4.tcp_tw_recycle=0"
sysctl -w "net.ipv4.tcp_tw_reuse=2"
# Lower TIME_WAIT delay to close connections more quickly. This may not be necessary in concert with tw_reuse.
# sysctl -w "net.ipv4.tcp_fin_timeout=30"
# NFS I/O concurrency:
sysctl -w "sunrpc.tcp_slot_table_entries=128"
sysctl -w "sunrpc.udp_slot_table_entries=128"
### For NetWorker Server only
# Settings to increase device resilience for cloud operations or other potentially high-latency devices
# NSR_DEVOP_TIMEOUT=3600
# export NSR_DEVOP_TIMEOUT
# NSR_DEVOP_POLLING_INTERVAL=600
# export NSR_DEVOP_POLLING_INTERVAL
# NSR_DEVOP_INQUIRY_TIMEOUT=900
# export NSR_DEVOP_INQUIRY_TIMEOUT
### Media database tunables
# NSR_TCP_READ_LONG_WAIT=Y
# export NSR_TCP_READ_LONG_WAIT
# NSR_MAX_MEDIADB_RETRY=10
# export NSR_MAX_MEDIADB_RETRY
# MMDB_SQLITE_CONFIGURE_MEMORY=1
# export MMDB_SQLITE_CONFIGURE_MEMORY
# MMDB_SQLITE_PAGECACHE_SIZE=65536
# export MMDB_SQLITE_PAGECACHE_SIZE
# MMDB_SQLITE_PAGE_COUNT=65536
# export MMDB_SQLITE_PAGE_COUNT
# MMDB_SQLITE_HEAP_SIZE=1073741824
# export MMDB_SQLITE_HEAP_SIZE
# MDB_SQLITE_HEAP_MIN_ALLOC_SIZE=128
# export MDB_SQLITE_HEAP_MIN_ALLOC_SIZE
Windows: 이후 /nsr/nsrrc file이 현재 Windows에 존재하지 않는 경우, 변경 사항은 배치 파일을 사용하여 실행해야 합니다. nsrrc.bat 또는 다른 배포 방법. 명령 기반 옵션이 있는 경우 여기에 명령이 제공됩니다. 이러한 변경 사항은 전역적이며 반복적으로 실행할 필요가 없습니다. 리눅스처럼 nsrrc 파일, 기본 표준 항목은 주석 처리되지 않고 비표준 또는 상황 옵션이 주석 처리됩니다. 다음을 사용하여 설정 가용성 변경 REM 접두사를 사용합니다. 파일을 배포할 위치에 따라 NetWorker Client, 노드 또는 Server와 관련된 파일을 트리밍합니다. 변경한 후에는 서비스를 다시 시작해야 합니다.
REM ### WINDOWS - For all NetWorker hosts - Clients, Nodes and Server REM # TCP window size tuning - greater throughput / Data Domain REM reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFD\Parameters /v DefaultSendWindow /t REG_DWORD /d 262144 /f REM reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFD\Parameters /v DefaultReceiveWindow /t REG_DWORD /d 262144 /f REM reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v GlobalMaxTcpWindowSize /t REG_DWORD /d 262144 /f REM reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v TcpWindowSize /t REG_DWORD /d 262144 /f REM # Global keepalive registry settings - 270s to fall below common idle socket timer kills of 300s reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v KeepAliveTime /t REG_DWORD /d 270000 /f reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v KeepAliveInterval /t REG_DWORD /d 10000 /f reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v TcpMaxDataRetransmissions /t REG_DWORD /d 10 /f REM # Global NetWorker keepalive and connectivity variables setx /m NW_TCP_KEEPIDLE_SECS 270 setx /m NW_TCP_KEEPINTVL_SECS 30 setx /m NW_TCP_KEEPCNT 10 setx /m NSR_KEEPALIVE_WAIT 10 setx /m NSR_EXEC_MAX_AUTH_THREADS 50 REM setx /m NSR_SOCK_BUF_SIZE=65536 # (262144 for 10 Gb Eth NICs) REM ### For NetWorker Storage Nodes and Server REM # Standard TCP features - disable in case of disconnections REM netsh interface tcp set global rss=disabled REM netsh interface tcp set global autotuning=disabled REM netsh interface tcp set global ecncapability=disabled REM netsh interface tcp set global timestamps=default REM # Port range availability for TCP client callers netsh int ipv4 set dynamicport tcp start=10000 num=54000 netsh int ipv4 set dynamicport udp start=10000 num=54000 netsh int ipv6 set dynamicport tcp start=10000 num=54000 netsh int ipv6 set dynamicport udp start=10000 num=54000
REM # Global port maximum (deprecated) and TIME_WAIT window REM reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v MaxUserPort /t REG_DWORD /d 65535 /f reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v TcpTimedWaitDelay /t REG_DWORD /d 30 /f
REM # Disable IPv6 if not required
REM reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters /v DisabledComponents /t REG_DWORD /d 0x000000ff /f REM ### For NetWorker Server only REM # Settings to increase device resilience for cloud operations or other potentially high-latency devices REM setx /m NSR_DEVOP_TIMEOUT 3600 REM setx /m NSR_DEVOP_POLLING_INTERVAL 600 REM setx /m NSR_DEVOP_INQUIRY_TIMEOUT 900
REM ### Settings for media database tuning
REM setx /m NSR_TCP_READ_LONG_WAIT Y REM setx /m NSR_MAX_MEDIADB_RETRY 10
REM setx /m MDB_SQLITE_HEAP_MIN_ALLOC_SIZE 128
REM setx /m MMDB_SQLITE_CONFIGURE_MEMORY 1
REM setx /m MMDB_SQLITE_HEAP_SIZE 1073741824
REM setx /m MMDB_SQLITE_PAGE_COUNT 65536
REM setx /m MMDB_SQLITE_PAGECACHE_COUNT 65536
REM setx /m MMDB_SQLITE_TMP path_to_temp_dir