<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>臭皮匠 &#187; dd</title>
	<atom:link href="http://guogoul.com/tag/dd/feed/" rel="self" type="application/rss+xml" />
	<link>http://guogoul.com</link>
	<description></description>
	<lastBuildDate>Fri, 29 Oct 2010 00:24:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>dd用于磁盘读写性能测试</title>
		<link>http://guogoul.com/2009/11/04/dd/</link>
		<comments>http://guogoul.com/2009/11/04/dd/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 15:02:26 +0000</pubDate>
		<dc:creator>shanfeng</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[disk]]></category>

		<guid isPermaLink="false">http://guogoul.com/?p=224</guid>
		<description><![CDATA[dd是一个linux下的文件复制和转换程序。除非告诉dd命运去进行某种转换操作，否则它只是进行从输入文件到输出文件的复制工作。不过现在dd更多的用来进行磁盘性能的测试，而不是原始用于copy的意图。
/dev/null：回收站、无底洞. 你可以输入任何东西它不会吃撑着（这种能力吃自助比较合适）
/dev/zero：用于产生字符，会产生无尽的0字符
以下转换自网络(http://www.xclinux.cn/?p=777):不知是否原创，copy过来自己备忘！
1.测试磁盘写能力
time dd if=/dev/zero of=/test.dbf bs=8k count=300000
因为/dev/zero是一个伪设备，它只产生空字符流，对它不会产生IO，所以，IO都会集中在of文件中，of文件只用于写，所以这个命令相当于测试磁盘的写能力。
2.测试磁盘读能力
time dd if=/dev/sdb1 of=/dev/null bs=8k
因为/dev/sdb1是一个物理分区，对它的读取会产生IO，/dev/null是伪设备，相当于黑洞，of到该设备不会产生IO，所以，这个命令的IO只发生在/dev/sdb1上，也相当于测试磁盘的读能力。
3. 测试同时读写能力
time dd if=/dev/sdb1 of=/test1.dbf bs=8k
这个命令下，一个是物理分区，一个是实际的文件，对它们的读写都会产生IO（对/dev/sdb1是读，对/test1.dbf是写），假设他们都在一个磁盘中，这个命令就相当于测试磁盘的同时读写能力。
]]></description>
		<wfw:commentRss>http://guogoul.com/2009/11/04/dd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

