Chinaunix首页 | 论坛 | 博客
  • 博客访问: 843674
  • 博文数量: 63
  • 博客积分: 1317
  • 博客等级: 中尉
  • 技术积分: 686
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-30 22:07
文章分类

全部博文(63)

文章存档

2015年(4)

2014年(1)

2013年(1)

2012年(2)

2011年(54)

2010年(1)

我的朋友

分类: 服务器与存储

2011-03-08 10:50:40

      周日去中关村买了一个硬盘底座和一块1T的硬盘,计划打造一个放在家里的数据仓库。硬盘底座是阿克西斯的,带eSATA和USB口,只能插入一块SATA硬盘,最大支持容量2T,价格85元。硬盘是西部数据的绿盘,1T,350元。所谓的黑盘、蓝盘、绿盘就是指的西部数据硬盘上贴的那张纸,是黑色、蓝色、或绿色。
黑盘:高性能、大缓存、速度快。 适合:企业,吞吐量大的服务器使用。
蓝盘:性价整体比较平衡 适合:存放数据和一般使用
绿盘:环保型、静音、发热低、省电、性能一般 转速在5400-7200间自动调整 适合:当作下载盘

1、连接

硬盘底座只能支持SATA硬盘,数据接口有eSATA和USB2.0两种,还有一个电源口。连接非常简单。现在的笔记本基本上都带有eSATA接口,所以最好用eSATA口,毕竟速度快啊(eSATAII理论上可以达到300Mbps的传输速度)。按照先连接数据线,后连接电源线的顺序,将硬盘和线接好。
接口 速率(MbitPS) 速率(MbyetePS)
USB1.0 12 1.5
USB2.0 480 60
USB3.0 4800 600
IDE 1064 133
SATA1.0 1200 150
SATA2.0 2400 300
IEEE1394a 400 50
IEEE1394b 800 100
eSATA 1.5Gb/S 1200 150
eSATA 3Gb/S 2400 300
2、测试传输性能

测试环境:ThinkPad SL410(T5870/2G/250G)

wzwself:/root# fdisk -l
Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xeb9bbb7e

先用eSATA线连接,写入性能测试:

wzwself:/root# dd if=/dev/zero of=/dev/sdd bs=1M count=10000
10000 0 records in
10000 0 records out
10485760000 bytes (10 GB) copied, 111.234 s, 94.3 MB/s

wzwself:/root# dd if=/dev/zero of=/dev/sdd bs=1k count=1000000
1000000 0 records in
1000000 0 records out
1024000000 bytes (1.0 GB) copied, 57.2335 s, 17.9 MB/s
#因为/dev/zero是一个伪设备,它只产生空字符流,对它不会产生IO,所以,IO都会集中在of文件中,of文件只用于写,所以这个命令相当于测试磁盘的写能力。

读性能测试
wzwself:/data/tools/system# dd if=/dev/sdd of=/dev/null bs=1M count=10000
10000 0 records in
10000 0 records out
10485760000 bytes (10 GB) copied, 100.271 s, 105 MB/s

wzwself:/data/tools/system# dd if=/dev/sdd of=/dev/null bs=1K count=1000000
1000000 0 records in
1000000 0 records out
1024000000 bytes (1.0 GB) copied, 9.98482 s, 103 MB/s
#因为/dev/sdd是一个物理盘,对它的读取会产生IO,/dev/null是伪设备,相当于黑洞,of到该设备不会产生IO,所以,这个命令的IO只发生在这块硬盘上,也相当于测试磁盘的读能力。

读写测试

对硬盘执行dd命令以后,会覆盖掉原来的分区表信息,表现就是执行fdisk -l 命令时会出现下面的提示:
Disk /dev/sdd doesn't contain a valid partition table
解决方法:重新分区表,步骤如下:
wzwself:/root# fdisk /dev/sdd
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x9d49a5d3.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): w

wzwself:/root# partprobe

(dd默认bs大小512bit)
wzwself:/root# dd if=/testext3/lelexp_win7_qj.iso of=/dev/testvg/testddlv
5389044 0 records in
5389044 0 records out
2759190528 bytes (2.8 GB) copied, 245.44 s, 11.2 MB/s

wzwself:/root# dd if=/testext4/lelexp_win7_qj.iso of=/dev/testvg/testddlv
5389044 0 records in
5389044 0 records out
2759190528 bytes (2.8 GB) copied, 218.755 s, 12.6 MB/s

通过测试表明,连续写入时,bs大小对写入性能影响很大(对应于大文件写入或大量小文件写入),但是bs大小对读性能并没有什么影响。ext4文件系统比ext3文件系统稍微快些,有约10%的性能提升。

USB2.0接口,写入性能测试

wzwself:/root# dd if=/dev/zero of=/dev/sde bs=1M count=10000

10000 0 records in
10000 0 records out
10485760000 bytes (10 GB) copied, 372.04 s, 28.2 MB/s

wzwself:/root# dd if=/dev/zero of=/dev/sde bs=1K count=1000000
1000000 0 records in
1000000 0 records out
1024000000 bytes (1.0 GB) copied, 178.469 s, 5.7 MB/s

读性能测试

wzwself:/root# dd if=/dev/sde of=/dev/null bs=1M count=10000
10000 0 records in
10000 0 records out
10485760000 bytes (10 GB) copied, 336.636 s, 31.1 MB/s

wzwself:/root# dd if=/dev/sde of=/dev/null bs=1k count=1000000
1000000 0 records in
1000000 0 records out
1024000000 bytes (1.0 GB) copied, 33.3456 s, 30.7 MB/s

读写性能测试

wzwself:/root# dd if=/testext3/lelexp_win7_qj.iso of=/dev/tvg/testdlv
5389044 0 records in
5389044 0 records out
2759190528 bytes (2.8 GB) copied, 750.606 s, 3.7 MB/s

wzwself:/root# dd if=/testext4/lelexp_win7_qj.iso of=/dev/tvg/testdlv
5389044 0 records in
5389044 0 records out
2759190528 bytes (2.8 GB) copied, 753.002 s, 3.7 MB/s

测试结果清楚的表明,USB2.0与eSATA接口的速度差距。

以上测试数据仅供参考,测试过程中偶尔有其他操作,会有写影响测试结果。



阅读(2114) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~