我尝试在本地私有云环境中部署 PieCloudDB 数据库集群,其中 6 台服务器配置如下:
CPU:128core,2GHz
Memory:1024GB
Data Disks:12*1.92TB SATA SSD
目前我们在使用过程中偶尔会遇到网络相关的错误,怀疑可能是内核参数配置的问题。您能推荐一些最佳参数设置吗?
根据您的配置,考虑到您部署在私有云环境中运行PieCloudDB数据库,您可以使用以下内核参数设置。这些参数设置涉及与系统信号量、网络和内存相关的修改。您可以直接将以下参数写入所有主机上的
/etc/sysctl.conf
文件中并执行sysctl -p
以应用更改。
kernel.shmmax = 5000000000000
kernel.shmmni = 32768
kernel.shmall = 40000000000
kernel.sem = 1000 32768000 1000 32768
kernel.msgmnb = 1048576
kernel.msgmax = 1048576
kernel.msgmni = 32768
net.core.netdev_max_backlog = 80000
net.core.rmem_default = 2097152
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.core.optmem_max = 16777216
net.core.netdev_budget = 1200
net.core.somaxconn = 65535
net.ipv4.tcp_rmem = 8192 87380 16777216
net.ipv4.tcp_wmem = 8192 87380 16777216
net.ipv4.tcp_low_latency = 1
net.ipv4.tcp_adv_win_scale = 1
net.ipv4.tcp_max_syn_backlog = 30000
net.ipv4.tcp_max_tw_buckets = 2000000
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_fin_timeout = 5
net.ipv4.tcp_mtu_probing = 1
net.ipv4.tcp_keepalive_time = 600
net.ipv4.tcp_keepalive_probes=10
net.ipv4.tcp_keepalive_intvl=30
vm.overcommit_memory = 0
vm.swappiness = 0
vm.vfs_cache_pressure = 10
fs.file-max = 4194303
fs.aio-max-nr = 1048576
fs.inotify.max_queued_events = 16384
fs.inotify.max_user_instances = 512
fs.inotify.max_user_watches = 65536