á òèé÷ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev ][Date Next ][Thread Prev ][Thread Next ][Date Index ][Thread Index ]
Re: åÝÅ ÒÁÚ Ï ÄÉÓËÏ×ÏÊ ÐÏÄÓÉ ÓÔÅÍÅ
Am 18.08.2011 16:24, schrieb Igor Sysoev:
÷ÓÅÍ ÐÒÉ×ÅÔ,
×ÏÔ ÓÄÅÌÁÌ ÎÅÂÏÌØÛÏÊ ÔÅÓÔ ÉÚ ÔÒ£È raid1 É LVM . ÎÁ ×ÉÒÔÕÁÌØÔÏÊ
ÍÁÛÉÎËÅ.
ôÅÓÔÙ ÐÏËÁÚÙ×ÁÀÔ ÞÔÏ:
- íÏÖÎÏ ÓÄÅÌÁÔØ ÓÔÒÁÊÐÙ × 1í, ÎÕ É ÉÚ ÄÏËÉ ÐÏ LVM ÓÌÅÄÕÅÔ :
StripeSize must be 2^n (n = 2 to 9) for metadata in
LVM1 format. For metadata in LVM2 format, the stripe size may be a
larger power of 2 but must not exceed the physical extent
size.)
- äÉÓËÉ ÉÓÐÏÌØÚÕÀÔÓÑ × ÚÁ×ÉÓÉÍÏÓÔÉ ÏÔ ÔÒÅÂÕÅÍÏÇÏ "ÂÌÏËÁ".
- æÁÊÌÏ×ÙÅ ÓÉÓÔÅÍÙ ÐÏ ÒÁÚÎÏÍÕ ÒÁÂÏÔÁÀÔ É ÁÌÌÏÃÉÒÕÀÔ ÍÅÓÔÏ ÎÁ ÄÉÓËÁÈ
× ÓÔÒÁÊÐÅ.
EXT4 : ôÁË ÎÁÐÒÉÍÅÒ ext4 ÒÁÓÐÏÌÏÖÉÌÁ ÆÁÊÌ ÓÏ ÓÍÅÝÅÎÉÅÍ × 64ë
ÔÏÅÓÔØ ÚÁÐÉÓØ ÏÄÎÏÇÏ ÌÏÇÉÞÅÓËÏÇÏ "ÓÔÒÁÊÐÁ" ÔÒÅÂÕÅÔ ÒÁÂÏÔÙ Ä×ÕÈ
ÆÉÚÉÞÅÓËÉÈ ÓÔÒÁÊÐÏ× , ÞÔÏ ÅÓÔÅÓÔ×ÅÎÎÏ ÐÁÇÕÂÎÏ ÓËÁÖÅÔÓÑ ÎÁ
ÐÒÏÉÚ×ÏÄÉÔÅÌØÎÏÓÔÉ.
XFS: ðÒÁ×ÉÌØÎÏ ÒÁÓÐÏÌÏÖÉÌÁ ÔÅÓÔÏ×ÙÊ ÆÁÊÌ ËÏÔÏÒÙÊ ÐÏÔÏÍ ÐÒÉ
ÚÁÐÉÓÉ ÉÓÐÏÌØÚÏ×ÁÌ ÏÄÉÎ ÆÉÚÉÞÅÓËÉÊ ÓÔÒÁÊÐ ÎÁ ÏÄÉÎ ÚÁÐÉÓÁÎÙÊ
ÌÏÇÉÞÅÓËÉÊ ÓÔÒÁÊÐ.
ðÏÞÅÍÕ Ñ ÉÓÐÏÌØÚÏ×ÁÌ ÚÁÐÉÓØ ×ÍÅÓÔÏ ÞÔÅÎÉÑ ? ÞÔÅÎÉÅ ÐÏÓÔÏÑÎÎÏ
ËÅÛÉÒÕÅÔÓÑ É ÎÅ ×ÉÄÎÁ ÒÁÂÏÔÙ ÆÉÚÉÞÅÓËÉÈ ÄÉÓËÏ×. äÁ É ÅÓÌÉ ÆÁÊÌ ×ÏÔ
ÔÁË ÚÁÐÉÛÅÔÓÑ ÔÏ É ÞÉÔÁÔØÓÑ ÂÕÄÅÔ ÔÁËÖÅ.
úù: ÔÅÓÔÙ Ó btrfs ÐÒÏ×ÅÄÕ ÎÁ×ÅÒÎÏÅ × ÐÏÎÅÄÅÌØÎÉË :-)
÷ÓÅÍ ÈÏÒÏÛÉÈ ×ÙÈÏÄÎÙÈ.
root@debian:~# uname -a
Linux debian 2.6.32-5-openvz-amd64 #1 SMP Tue Jun 14 10:46:15 UTC
2011 x86_64 GNU/Linux
íÏÊ ÒÁÉÄ:
root@debian:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5]
[raid4] [raid10]
md2 : active raid1 sdg1[1] sdf1[0]
8384862 blocks super 1.2 [2/2] [UU]
md1 : active raid1 sdd1[1] sde1[0]
8384862 blocks super 1.2 [2/2] [UU]
md0 : active raid1 sdc1[1] sdb1[0]
8383870 blocks super 1.2 [2/2] [UU]
root@debian:~# vgcreate RAID10 /dev/md0 /dev/md1 /dev/md2
root@debian:~# lvcreate -i 3 --stripesize 1MB -L20GB RAID10
-n testvol
ðÒÉ ÐÏÐÙÔËÅ ÞÔÅÎÉÑ ÂÌÏËÁ × 1í
root@debian:~# dd if=/dev/RAID10/testvol of=/dev/null bs=1M
count=1 skip=3
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.00287735 s, 364 MB/s
ÐÏÌÕÞÁÅÍ Ó ÓÏÓÅÄÎÅÍ ÏËÎÅ :
root@debian:/home/kred# iostat -k 3 | grep md
Linux 2.6.32-5-openvz-amd64 (debian) 08/19/2011
_x86_64_ (1 CPU)
Device: tps kB_read/s kB_wrtn/s kB_read
kB_wrtn
md0 85.33 341.33 0.00 1024
0
md1 0.00 0.00 0.00 0
0
md2 0.00 0.00 0.00 0
0
×ÏÔ ÔÕÔ ÞÔÅÎÉÅ ÎÅÓËÏÌØËÉÈ ÂÌÏËÏ×:
root@debian:~# for i in `seq 1 3 10` ; do dd
if=/dev/RAID10/testvol of=/dev/null bs=1M count=1 skip="$[(i)]" ;
done
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.0192441 s, 54.5 MB/s
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.0200642 s, 52.3 MB/s
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.0192805 s, 54.4 MB/s
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.0179435 s, 58.4 MB/s
ÎÕ É
root@debian:/home/kred# iostat -k 1 | grep md
Linux 2.6.32-5-openvz-amd64 (debian) 08/19/2011
_x86_64_ (1 CPU)
md0 1483.16 5435.43 496.98 41703906
3813132
md1 636.19 2342.28 202.22 17971418
1551548
md2 291.62 1097.28 68.95 8418996
529014
md0 0.00 0.00 0.00 0
0
md1 1024.00 4096.00 0.00 4096
0
md2 0.00 0.00 0.00 0
0
md0 0.00 0.00 0.00 0
0
md1 0.00 0.00 0.00 0
0
md2 0.00 0.00 0.00 0
0
Á ÚÄÅÓØ ÞÉÔÁÀÔÓÑ ÂÌÏËÉ Ó ÄÒÕÇÏÇÏ ÒÁÊÄÁ/ÓÔÒÁÊÐÁ
root@debian:~# for i in `seq 0 3 10` ; do dd
if=/dev/RAID10/testvol of=/dev/null bs=1M count=1 skip="$[(i)]" ;
done
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.0191712 s, 54.7 MB/s
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.0198684 s, 52.8 MB/s
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.0178683 s, 58.7 MB/s
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.0178463 s, 58.8 MB/s
root@debian:/home/kred# iostat -k 1 | grep md
Linux 2.6.32-5-openvz-amd64 (debian) 08/19/2011
_x86_64_ (1 CPU)
md0 1455.64 5334.56 487.76 41703906
3813132
md1 624.51 2299.34 198.47 17975514
1551548
md2 286.21 1076.92 67.67 8418996
529014
md0 0.00 0.00 0.00 0
0
md1 0.00 0.00 0.00 0
0
md2 0.00 0.00 0.00 0
0
md0 0.00 0.00 0.00 0
0
md1 0.00 0.00 0.00 0
0
md2 0.00 0.00 0.00 0
0
md0 1034.34 4137.37 0.00 4096
0
md1 0.00 0.00 0.00 0
0
md2 0.00 0.00 0.00 0
0
ÔÏÞÎÏ ÔÁËÖÅ ÐÒÉ ÞÔÅÎÉÉ ÂÌÏËÏ× ÐÏ 128ëâ
root@debian:~# for i in `seq 0 3 10` ; do dd
if=/dev/RAID10/testvol of=/dev/null bs=128K count=1 skip="$[(i*8)]"
; done
1+0 records in
1+0 records out
131072 bytes (131 kB) copied, 0.00325194 s, 40.3 MB/s
1+0 records in
1+0 records out
131072 bytes (131 kB) copied, 0.00271282 s, 48.3 MB/s
1+0 records in
1+0 records out
131072 bytes (131 kB) copied, 0.00334017 s, 39.2 MB/s
1+0 records in
1+0 records out
131072 bytes (131 kB) copied, 0.00271333 s, 48.3 MB/s
root@debian:/home/kred# iostat -k 1 | grep md
Linux 2.6.32-5-openvz-amd64 (debian) 08/19/2011
_x86_64_ (1 CPU)
md0 1433.38 5253.01 480.25 41708514
3813132
md1 614.90 2263.94 195.41 17975514
1551548
md2 281.80 1060.34 66.63 8418996
529014
md0 0.00 0.00 0.00 0
0
md1 0.00 0.00 0.00 0
0
md2 0.00 0.00 0.00 0
0
md0 128.00 512.00 0.00 512
0
md1 0.00 0.00 0.00 0
0
md2 0.00 0.00 0.00 0
0
md0 0.00 0.00 0.00 0
0
md1 0.00 0.00 0.00 0
0
md2 0.00 0.00 0.00 0
0
äÁÌÅÅ ÔÅÓÔ ÆÁÊÌÏ×ÏÊ ÓÉÓÔÅÍÙ EXT4
root@debian:~# mkfs.ext4 -E stride=256,stripe-width=768
/dev/RAID10/testvol
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=256 blocks, Stripe width=768 blocks
1311184 inodes, 5243904 blocks
262195 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
161 block groups
32768 blocks per group, 32768 fragments per group
8144 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736,
1605632, 2654208,
4096000
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
root@debian:~# mount /dev/RAID10/testvol /mnt/
root@debian:~# cat /dev/zero > /mnt/fileblob
^C
root@debian:~# ls -alh /mnt/
total 2.0G
drwxr-xr-x 3 root root 4.0K Aug 19 08:06 .
drwxr-xr-x 22 root root 4.0K Aug 17 04:06 ..
-rw-r--r-- 1 root root 2.0G Aug 19 08:07 fileblob
drwx------ 2 root root 16K Aug 19 08:04 lost+found
ÔÅÓÔÙ ÐÏËÁÚÁÌÉ ÞÔÏ ÆÁÊÌ ÌÅÖÉÔ ÓÏ ÓÍÅÝÅÎÉÅÍ × 64Ë
root@debian:~# dd of=/mnt/fileblob if=/dev/zero bs=1M
count=1 seek=0
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.00157423 s, 666 MB/s
root@debian:~# dd of=/mnt/fileblob if=/dev/zero bs=1M
count=1 seek=1
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.00153828 s, 682 MB/s
md2 0.00 0.00 0.00 0
0
md0 16.00 0.00 64.00 0
64
md1 240.00 0.00 960.00 0
960
md2 0.00 0.00 0.00 0
0
md0 2.02 0.00 0.00 0
0
md1 18.18 0.00 64.65 0
64
md2 249.49 0.00 989.90 0
980
md0 0.00 0.00 0.00 0
0
ÄÁÌÅÅ ÔÅÓÔØ ÆÁÊÌÏ×ÏÊ ÓÉÓÔÅÍÙ XFS
root@debian:~# mkfs.xfs -d sunit=2048,swidth=6144 -f
/dev/RAID10/testvol
log stripe unit (1048576 bytes) is too large (maximum is 256KiB)
log stripe unit adjusted to 32KiB
meta-data="" isize=256 agcount=16,
agsize=327680 blks
= sectsz=512 attr=2, projid32bit=0
data = bsize=4096 blocks=5242880,
imaxpct=25
= sunit=256 swidth=768 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=8 blks,
lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
root@debian:~# mount /dev/RAID10/testvol /mnt/
root@debian:~# cat /dev/zero > /mnt/fileblob
c^C
root@debian:~# dd of=/mnt/fileblob if=/dev/zero bs=1M
count=1 seek=1
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.00274009 s, 383 MB/s
root@debian:~# dd of=/mnt/fileblob if=/dev/zero bs=1M
count=1 seek=0
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.00291606 s, 360 MB/s
root@debian:~# dd of=/mnt/fileblob if=/dev/zero bs=1M
count=1 seek=6
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.000985776 s, 1.1 GB/s
root@debian:~# dd of=/mnt/fileblob if=/dev/zero bs=1M
count=1 seek=8
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.000930578 s, 1.1 GB/s
root@debian:~# dd of=/mnt/fileblob if=/dev/zero bs=1M
count=1 seek=18
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.000936298 s, 1.1 GB/s
md0 130.00 0.00 1024.00 0
1024
md1 3.00 0.00 32.00 0
32
md2 2.00 0.00 0.00 0
0
md0 1.98 0.00 0.00 0
0
md1 2.97 0.00 31.68 0
32
md2 128.71 0.00 1013.86 0
1024
md0 15.84 0.00 1013.86 0
1024
md1 0.00 0.00 0.00 0
0
md2 0.00 0.00 0.00 0
0
md0 0.00 0.00 0.00 0
0
md1 0.00 0.00 0.00 0
0
md2 16.00 0.00 1024.00 0
1024
md0 16.00 0.00 1024.00 0
1024
md1 0.00 0.00 0.00 0
0
md2 0.00 0.00 0.00 0
0
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru