比较来自世界各地的卖家的域名和 IT 服务价格

如何获得块大小 4k 从汤姆读书时 md raid1

我想配置配置 raid01 (raid1, 由两者组成 raid0) 与其中一个卷 raid0 具有既定的状态,主要用于录制,以便所有阅读操作都转到另一个 (也就是说,一个 - 磁盘,其他 - 闪光). 但是,所有这些计划都面临着直接阅读的问题 raid0 它是正确的 64 kb磁盘上 (块大小), 但是当我添加时 raid1 地面 raid0, 所有的读数都只下降 4 KB,因此生产力是可怕的。 我假设这是由于这一事实 md (或者在堆栈中的东西) 决定 4k - 这是错误的详细程度,因此它在此金额中读取,但这只是一个假设。 无论如何,我真的需要找到一种解决方法。

要查看它,我使用 raid1 只有一个方面只有简单起见,即 它是用的

mdadm --create /dev/md2 -l 1 -n 2 /dev/md1 "missing"

另一个有趣的一点是 dd bs = 512K 在阵列中 raid0 md1 显示64K阅读 md1 以及它的所有组成部分,而我预期 iostat 展示 md1, 拥有 512 读取操作的CB及其组成光盘 - 64 KB。 Dd bs = 512K 的 md2 显示4k阅读一切。 我计算块的大小,只划分MB / 与之 tps, 什么 = MB. / 交易。

这就是所有细节。

[root@pe-r910 ~]# mdadm --detail /dev/md2
/dev/md2:
Version : 1.2
Creation Time : Tue Jul 26 23:13:59 2011
Raid Level : raid1
Array Size : 1998196216 (1905.63 GiB 2046.15 GB)
Used Dev Size : 1998196216 (1905.63 GiB 2046.15 GB)
Raid Devices : 2
Total Devices : 1
Persistence : Superblock is persistent

Update Time : Thu Jul 28 08:29:35 2011
State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0

Name : pe-r910.ingres.prv:2 (local to host pe-r910.ingres.prv)
UUID : 299ea821:756847a0:4db591e4:38769641
Events : 160

Number Major Minor RaidDevice State
0 9 1 0 active sync /dev/md1
1 0 0 1 removed

[root@pe-r910 ~]# mdadm --detail /dev/md1
/dev/md1:
Version : 1.2
Creation Time : Tue Jul 26 01:05:05 2011
Raid Level : raid0
Array Size : 1998197376 (1905.63 GiB 2046.15 GB)
Raid Devices : 14
Total Devices : 14
Persistence : Superblock is persistent

Update Time : Tue Jul 26 01:05:05 2011
State : clean
Active Devices : 14
Working Devices : 14
Failed Devices : 0
Spare Devices : 0

Chunk Size : 64K

Name : pe-r910.ingres.prv:1 (local to host pe-r910.ingres.prv)
UUID : 735bd502:62ed0509:08c33e15:19ae4f6b
Events : 0

Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
1 8 33 1 active sync /dev/sdc1
2 8 49 2 active sync /dev/sdd1
3 8 65 3 active sync /dev/sde1
4 8 81 4 active sync /dev/sdf1
5 8 97 5 active sync /dev/sdg1
6 8 113 6 active sync /dev/sdh1
7 8 129 7 active sync /dev/sdi1
8 8 145 8 active sync /dev/sdj1
9 8 161 9 active sync /dev/sdk1
10 8 177 10 active sync /dev/sdl1
11 8 193 11 active sync /dev/sdm1
12 8 209 12 active sync /dev/sdn1
13 8 225 13 active sync /dev/sdo1
[root@pe-r910 ~]# dd if=/dev/md1 bs=512K count=10000 iflag=nonblock,direct of=/dev/null
10000+0 records in
10000+0 records out
5242880000 bytes (5.2 GB) copied, 3.45236 s, 1.5 GB/s
[root@pe-r910 ~]# dd if=/dev/md2 bs=512K count=10000 iflag=nonblock,direct of=/dev/null
10000+0 records in
10000+0 records out
5242880000 bytes (5.2 GB) copied, 6.81182 s, 770 MB/s
[root@pe-r910 ~]#

更新:它看起来像是一个问题 md 在 md. 如果我做 raid1 在磁盘上,其读取速度与磁盘相同。 所以我想我可以重新配置它 raid10 (放 raid1, 转变为 radi0) 反而 raid01 (2 raid0, 转变为 raid1).
已邀请:

董宝中

赞同来自:

使用 --chunk = 64k 或者 --chunk = 128k 创建设备时。 真实块大小,请参阅规范 / 测试磁盘。

不幸的是,创造后没有可能改变它。

还有一个可以影响的频段缓存侧的参数

请参阅这篇文章
http://www.amiryan.org/2009/04 ... slow/

董宝中

赞同来自:

这可能是显而易见的,但你试图指定 --chunk = 64k 创建设备时?

要回复问题请先登录注册