全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 4341|回复: 14
打印 上一主题 下一主题

关于硬盘测试的结果

[复制链接]
跳转到指定楼层
1#
发表于 2010-11-4 18:00:20 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
我分别用

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

这。。。。
15#
发表于 2010-11-5 00:53:52 | 只看该作者
对于Unix操作系统的文件来说,dsync控制被写入的文件是否被缓存(buffered)。如果dsync打开,打开数据库的连接可以使用dsync 标记。dstnc标记(打开)确保写入设备的文件直接被写入物理设备(而不经过buffer,以保证同步),XXXX。
如果dsync关闭,写入文件将会被buffer。恢复的数据可能不可信(因为可能断电时候部分在buffer里)。仅当数据集成不重要,或者系统需要高性能的时候,才建议关闭dsync。

概括:加dsync就不使用缓存了,是个测试测试I/O的好参数。
14#
发表于 2010-11-5 00:49:59 | 只看该作者
理解基本是正确的,先来原文:
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.
13#
发表于 2010-11-5 00:48:09 | 只看该作者
首先这个只能代表连续存储。
然后帮大家G了一下:
dsync是同步I/O,相对于异步来说会慢。
12#
发表于 2010-11-4 22:17:46 | 只看该作者
用第一条命令测吧,不会有人在Web server上开dsync吧?
11#
发表于 2010-11-4 20:45:55 | 只看该作者
磁盘的随机读写能力。
10#
 楼主| 发表于 2010-11-4 20:41:19 | 只看该作者
那第二个测试的结果相差很大应该和什么有关
9#
发表于 2010-11-4 19:00:20 | 只看该作者

回复 8# 的帖子

嗯,所以如果文件较多的话,就要压缩了。
8#
发表于 2010-11-4 18:54:10 | 只看该作者
可以理解为1是写入一个大文件的速度,2是写入很多个小文件的速度,
拷贝大量小文件的时候比较慢大家在windows应该有体验的吧
7#
发表于 2010-11-4 18:32:52 | 只看该作者
我现在用这个114 和 17MB ,算杯具吗?大家晒晒自己的啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-11-12 21:34 , Processed in 0.084158 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表