我正在使用由其他人设置和configuration的AWS EC2 Ubuntu实例(即,我无权访问pipe理控制台)。 这个实例主要用于下载文件并同步到一个S3桶,我已经使用shell脚本自动化了。 但是,我不知道实例types或networking性能,所以我不能优化下载。 例如,我需要知道该实例可以同时下载多less个。 我如何确定AWS EC2实例types和networking性能(即下载/上传速度)?
从实例执行curl http://169.254.169.254/latest/meta-data/instance-type
将为您提供EC2实例元数据服务的实例types。
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html
您可以使用iperf( https://github.com/esnet/iperf ),但最好是有一个第二台服务器(如果可能的话,从目标networking),以获得切合实际的结果。
如果你有正确的回购,你可以使用apt(apt-get install iperf)
有很多可以使用该工具运行的testing。
login到AWSpipe理控制台,转到EC2,find您的实例并查看“实例types”列。
亚马逊文档告诉您如何基于AWS对networking性能进行基准testing
启用回购
sudo yum --enablerepo=epel install iperf iperf3
安装iperf
sudo apt-get update sudo apt-get upgrade sudo apt-get install git gcc make git clone https://github.com/esnet/iperf cd iperf ./configure sudo make sudo make install # optionally run "make clean" to free up disk space # by removing artifacts in the build tree. sudo make clean sudo ldconfig
configuration监听器
sudo iperf3 -s -p 80
运行testing
sudo iperf3 -c 10.0.2.176 -i 1 -t 60 -V -p 80