March 3rd, 2016

一:使用文件构建swap
dd if=/dev/zero of=/home/test/swap bs=1M count=1024
mkswap /home/test/swap
swapon /home/test/swap  来扩充swap .
swapoff /home/test/swap 来卸载文件

二:测试Linux磁盘读写速度

测试磁盘的IO写速度time dd if=/dev/zero of=/test.dbf bs=8k count=300000
测试磁盘的IO读速度time dd if=/home/test of=/dev/null bs=8k
磁盘读写速度hdparm -Tt /dev/sda

Leave a Reply

Your email address will not be published. Required fields are marked *

*