全球主机交流论坛

标题: 关于硬盘测试的结果 [打印本页]

作者: boloverr    时间: 2010-11-4 18:00
标题: 关于硬盘测试的结果
我分别用

dd if=/dev/zero of=test bs=64k count=16k conv=fsync

dd if=/dev/zero of=test bs=64k count=4k oflag=dsync

两条命令测试了下两个不用的VPS的硬盘速度,  (一个是美国的VPS ,另外一个是国内的)

架构我也不清楚了,。

得到的结果是 第一条命令 两个VPS 的结果差不多,  都是 50多MB/s

不过第二条解决差距就大了,

美国的VPS 测试为  27.8MB/S

而国内的这款才 1.3MB/S

这。。。。
作者: 小夜    时间: 2010-11-4 18:12
坐等高手来说明。
作者: zhouzhijun    时间: 2010-11-4 18:13
标题: 回复 1# 的帖子
请问一下,这两个命令啥意思?
作者: boloverr    时间: 2010-11-4 18:14
是不是因为架构不同的原因
作者: boloverr    时间: 2010-11-4 18:15
那个美国VPS 是HELLOHOST买的


国内的这个可能是 Hyper-V

[ 本帖最后由 boloverr 于 2010-11-4 18:18 编辑 ]
作者: zrdlrofmine    时间: 2010-11-4 18:31


hyper-v装linux其实比较杯具
作者: pcu84424    时间: 2010-11-4 18:32
我现在用这个114 和 17MB ,算杯具吗?大家晒晒自己的啊
作者: greensnow    时间: 2010-11-4 18:54
可以理解为1是写入一个大文件的速度,2是写入很多个小文件的速度,
拷贝大量小文件的时候比较慢大家在windows应该有体验的吧
作者: cnx    时间: 2010-11-4 19:00
标题: 回复 8# 的帖子
嗯,所以如果文件较多的话,就要压缩了。
作者: boloverr    时间: 2010-11-4 20:41
那第二个测试的结果相差很大应该和什么有关
作者: leven    时间: 2010-11-4 20:45
磁盘的随机读写能力。
作者: landi    时间: 2010-11-4 22:17
用第一条命令测吧,不会有人在Web server上开dsync吧?
作者: liheyuan    时间: 2010-11-5 00:48
首先这个只能代表连续存储。
然后帮大家G了一下:
dsync是同步I/O,相对于异步来说会慢。
作者: liheyuan    时间: 2010-11-5 00:49
理解基本是正确的,先来原文:
For devices initialized on UNIX operating system files, the dsync setting controls whether or not writes to those files are buffered. When the dsync setting is on, Adaptive Server opens a database device file using the UNIX dsync flag. The dsync flag ensures that writes to the device file occur directly on the physical storage media, and Adaptive Server can recover data on the device in the event of a system failure.

When dsync is off (false), writes to the device file may be buffered by the UNIX file system, and the recovery of data on the device cannot be ensured. Turn off dsync only when data integrity is not required, or when the System Administrator requires performance and behavior similar to earlier Adaptive Server versions.

generally dsync is set to off for tempdb devices which is not required during recovery.

Note:The dsync setting is ignored for devices initialized on raw partitions, and for devices initialized on Windows files. In both cases, writes to the database device take place directly to the physical media.
作者: liheyuan    时间: 2010-11-5 00:53
对于Unix操作系统的文件来说,dsync控制被写入的文件是否被缓存(buffered)。如果dsync打开,打开数据库的连接可以使用dsync 标记。dstnc标记(打开)确保写入设备的文件直接被写入物理设备(而不经过buffer,以保证同步),XXXX。
如果dsync关闭,写入文件将会被buffer。恢复的数据可能不可信(因为可能断电时候部分在buffer里)。仅当数据集成不重要,或者系统需要高性能的时候,才建议关闭dsync。

概括:加dsync就不使用缓存了,是个测试测试I/O的好参数。




欢迎光临 全球主机交流论坛 (https://loc.wget.at/) Powered by Discuz! X3.4