NGINX的缓存最佳实践
全新的硬盘
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
[root@main ~]# for s in {a..c} > do > echo "/dev/sd$s"; > smartctl --all /dev/sd$s | grep Power_On_Hours > done /dev/sda 9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 1 /dev/sdb 9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 1 /dev/sdc 9 Power_On_Hours_and_Msec 0x0032 051 051 000 Old_age Always - 43429h+54m+43.880s # 读写速度测试 Raid0 [root@main cache]# ls lost+found [root@main cache]# dd if=/dev/zero of=testfile bs=1G count=1 oflag=dsync && rm -rf testfile 1+0 records in 1+0 records out 1073741824 bytes (1.1 GB, 1.0 GiB) copied, 4.35152 s, 247 MB/s [root@main cache]# dd if=/dev/zero of=testfile bs=512 count=1000 oflag=direct && rm -rf testfile 1000+0 records in 1000+0 records out 512000 bytes (512 kB, 500 KiB) copied, 0.193716 s, 2.6 MB/s [root@main cache]# |
然后开始部署缓存