mac开启iperf3测速(网络,磁盘)

date
Mar 17, 2022
slug
tip-mac-iperf3
status
Published
summary
小技巧
tags
tip
type
Post

Problem & Summary

  • memory-to-memory performance access a network

Solution

安装

# mac
brew install iperf3

网络

# 服务器端
iperf3 -s  # at default port
iperf3 -s -p 5003 # at port 

------------------------------------

# 客户端
iperf3 -c server_ip

# Run a 45 second tests, giving results every 1 second
iperf3 -c remotehost -i 1 -t 45

磁盘

# Memory to Disk (磁盘写测速)

# 服务器端
iperf3 -s -F /target_disk/file # at default port
# 客户端
iperf3 -c server_ip -i1 -t 45 # 本地就写localhost / 时间久一点数字更有意义


# Disk to Memory (磁盘读测速)
# 服务器端
iperf3 -s # at default port
# 客户端
iperf3 -c server_ip -F /target_disk/file # 本地读


# 
# Note that if you run the test a second time the file will be cached, so you need to use a different file, or do this (as root):
sync; echo 3 > /proc/sys/vm/drop_caches 
# The tests will run till the end of the file, or till the end of the test duration, whichever comes first.

Screenshots

 

© Ying Bun 2021 - 2022