调优
调优时性能指标获取
beegfs-ctl --serverstats --nodetype=storage --perserver --names --interval=3
beegfs-ctl --iostat --interval=3 --nodetype=meta
beegfs-ctl --listtargets --hidenodeid --pools --spaceinfo --nodetype=meta --logenabled --loglevel=5
client tuning
设置 Striping chunk size
其他
echo "tuneFileCacheBufSize = 2097152" >> /etc/beegfs/beegfs-client.conf
sed -i 's/connMaxInternodeNum.*=.*/connMaxInternodeNum = 64/g' /etc/beegfs/beegfs-client.conf
- Update stripe_size
beegfs-ctl --setpattern --chunksize=${stripe_size} --numtargets=4 ${mount_point}
ethtool -G eno2 rx 2047 tx 2047 rx-jumbo 8191
echo "net.ipv4.tcp_timestamps = 0" >> /etc/sysctl.conf
echo "net.ipv4.tcp_window_scaling = 1" >> /etc/sysctl.conf
echo "net.ipv4.tcp_adv_win_scale=1" >> /etc/sysctl.conf
echo "net.ipv4.tcp_low_latency=1" >> /etc/sysctl.conf
echo "net.ipv4.tcp_sack = 1" >> /etc/sysctl.conf
echo "net.core.wmem_max=16777216" >> /etc/sysctl.conf
echo "net.core.rmem_max=16777216" >> /etc/sysctl.conf
echo "net.core.wmem_default=16777216" >> /etc/sysctl.conf
echo "net.core.rmem_default=16777216" >> /etc/sysctl.conf
echo "net.core.optmem_max=16777216" >> /etc/sysctl.conf
echo "net.core.netdev_max_backlog=27000" >> /etc/sysctl.conf
echo "net.ipv4.tcp_rmem = 212992 87380 16777216" >> /etc/sysctl.conf
echo "net.ipv4.tcp_wmem = 212992 65536 16777216" >> /etc/sysctl.conf
/sbin/sysctl -p /etc/sysctl.conf
tuned-adm profile throughput-performance
Storage Server
Metadata Server
echo 5 > /proc/sys/vm/dirty_background_ratio
echo 20 > /proc/sys/vm/dirty_ratio
echo 50 > /proc/sys/vm/vfs_cache_pressure
echo 262144 > /proc/sys/vm/min_free_kbytes
echo 1 > /proc/sys/vm/zone_reclaim_mode
echo always > /sys/kernel/mm/transparent_hugepage/enabled
echo always > /sys/kernel/mm/transparent_hugepage/defrag
devices=(sdb sdc sdd sde)
for dev in "${devices[@]}"
do
echo deadline > /sys/block/${dev}/queue/scheduler
echo 128 > /sys/block/${dev}/queue/nr_requests
echo 128 > /sys/block/${dev}/queue/read_ahead_kb
echo 256 > /sys/block/${dev}/queue/max_sectors_kb
done
echo "net.ipv4.tcp_timestamps = 0" >> /etc/sysctl.conf
echo "net.ipv4.tcp_window_scaling = 1" >> /etc/sysctl.conf
echo "net.ipv4.tcp_adv_win_scale=1" >> /etc/sysctl.conf
echo "net.ipv4.tcp_low_latency=1" >> /etc/sysctl.conf
echo "net.ipv4.tcp_sack = 1" >> /etc/sysctl.conf
echo "net.core.wmem_max=16777216" >> /etc/sysctl.conf
echo "net.core.rmem_max=16777216" >> /etc/sysctl.conf
echo "net.core.wmem_default=16777216" >> /etc/sysctl.conf
echo "net.core.rmem_default=16777216" >> /etc/sysctl.conf
echo "net.core.optmem_max=16777216" >> /etc/sysctl.conf
echo "net.core.netdev_max_backlog=27000" >> /etc/sysctl.conf
echo "net.ipv4.tcp_rmem = 212992 87380 16777216" >> /etc/sysctl.conf
echo "net.ipv4.tcp_wmem = 212992 65536 16777216" >> /etc/sysctl.conf
/sbin/sysctl -p /etc/sysctl.conf
##查看目录详细信息
find /mnt/beegfs -type f | beegfs-ctl --getentryinfo --verbose - > /tmp/entryinfo.txt
使用命令去查找一个node和target的目标文件
beegfs-ctl --find
bfs 指标
statLI - file lookup-stat intent
revalLI - file lookup-revalidate-intent (has been looked up before)
createLI - file lookup-create intent
pftools
mpirun -prefix /usr -host localhost -n 15 /usr/local/bin/../bin/pftool -w 1 -j root52121492021ccb-node1 -r -p /mnt/bfs/ccb/nas_b/ai-platform
测试
Master01 node01 Node02
官方文档:https://doc.beegfs.io/latest/advanced_topics/storage_tuning.html
参考资料: