NetWorker: Prácticas recomendadas para la configuración de redes
Summary: El objetivo de este artículo es proporcionar una base simple para los ajustes de redes estándar y deseables para los hosts de NetWorker.
Symptoms
- Errores relacionados con las redes o la conectividad de host, incluidos, entre otros, los siguientes:
- Fallas de respaldos que parecen haber completado la transferencia de datos real
- Agotamiento generalizado de los recursos o colapso de las comunicaciones
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
Keepalives: Todos los sockets creados por un proceso de llamada de NetWorker para conectarse a un proceso de demonio de escucha y estos pueden interrumpirse si los dispositivos de red intentan recuperar recursos los dejan inactivos durante demasiado tiempo. Por lo general, esto requiere que las conexiones persistentes estén habilitadas para el servidor y los nodos de NetWorker de manera predeterminada, y los clientes que experimentan problemas. NetWorker tiene su propio manejo de keepalive interno para algunos binarios (pero no todos). El sistema operativo también tiene conexiones persistentes que deben activarse de manera predeterminada.
Disponibilidad de puertos: Cada conector que NetWorker se propone establecer requiere un puerto en el rango efímero desde el cual comunicarse, pero este rango está limitado de manera predeterminada en todos los sistemas operativos y se debe abrir en la mayor medida posible para no limitar artificialmente las comunicaciones. Con nsrauth habilitado de manera predeterminada, la cantidad de puertos necesarios para un único socket deseado será de al menos 3 y cada falla podría volver a intentarlo rápidamente, dejando los puertos en TIME_WAIT hasta que la conexión se realice correctamente. Por este motivo, se debe elevar el número máximo disponible de puertos, con TIME_WAIT estados idealmente reducidos.
Otros sockets de ejecución prolongada también se pueden reforzar con variables de software internas específicas que permiten una mayor resistencia o mejoran el almacenamiento en búfer.
Resolution
Los siguientes son los ajustes recomendados habituales por sistema operativo y clase de host, junto con sus comandos de implementación. Siempre, la aplicabilidad varía; Los que se consideran universalmente deseables no se comentan, mientras que los que tienen una idoneidad más variable se comentan, pero están disponibles para su uso cuando se necesite. Estos ajustes se proporcionan de buena fe como recomendaciones generales, pero los administradores del sistema operativo deben revisarlos antes de la implementación. Estas se consideran las prácticas recomendadas predeterminadas recomendadas en todos los casos para servidores y nodos de almacenamiento. La idoneidad del cliente puede variar según la configuración y la función en un entorno determinado y, en tales casos, se debe considerar cuidadosamente antes de usarla, ya que las diferentes funciones del servidor de aplicaciones pueden entrar en conflicto con la configuración recomendada; en estos casos, la configuración requerida por la función debe tener prioridad.
Linux: Todas las configuraciones apropiadas se deben ingresar en el /nsr/nsrrc archivo, que debe tener permisos globales de lectura/ejecución (755) para que se ejecute al inicio del servicio. Las entradas estándar predeterminadas no están comentadas y se comentan las opciones no estándar o circunstanciales. Cambie la disponibilidad de los ajustes utilizando el prefijo # en las líneas pertinentes. Recorte el archivo según corresponda para los clientes, nodos o servidores de NetWorker, según la ubicación donde implementará el archivo. Será necesario reiniciar el servicio después de realizar los cambios.
### 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: Dado que el /nsr/nsrrc El archivo no existe actualmente para Windows, los cambios deben ejecutarse mediante un archivo por lotes, p. ej. nsrrc.bat u otro método de implementación. Aquí se proporcionan comandos cuando existe una opción controlada por comandos. Estos cambios son globales y no es necesario que se ejecuten repetidamente. Al igual que el de Linux nsrrc archivo, las entradas estándar predeterminadas no están comentadas, con las opciones no estándar o circunstanciales comentadas. Cambie la disponibilidad de los ajustes mediante REM prefijo en las líneas pertinentes. Recorte el archivo según corresponda para los clientes, nodos o servidores de NetWorker, según la ubicación donde implementará el archivo. Será necesario reiniciar el servicio después de realizar los cambios.
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