I don't know why, but I have big trouble with speed of my raid.
I have 4x WD RE4 7200RPM 500GB. Size of RAID 5 is 1000GB. 1 of HDDs is Spare.
Problem is here:
Every 1,0s: cat /proc/mdstat Mon Dec 31 10:01:11 2012
Personalities : [raid1] [raid6] [raid5] [raid4]
md1 : active raid5 sdc2[0] sdb2[3](S) sdd2[2] sde2[1]
974812160 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
[=>...................] check = 9.0% (44241152/487406080) finish=6696.5min speed=1102K/sec
md0 : active raid1 sdc1[0] sdb1[3](S) sdd1[2] sde1[1]
975860 blocks super 1.2 [3/3] [UUU]
unused devices: <none>
I started this checking at 2:00 AM and I thought it could be already done. It isn't. When it was new (2 months ago) it tooks only about 150 - 300minutes to check raid.
vmstat 1 shows:
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
2 1 0 168108 278152 6649192 0 0 385 705 0 1 47 13 33 7
1 1 0 168092 278152 6649236 0 0 0 1564 24426 42090 28 11 46 16
3 1 0 173424 278152 6649236 0 0 0 1204 23750 41592 30 7 48 15
1 2 0 173416 278160 6649228 0 0 24 592 23131 41252 25 5 47 23
2 1 0 173424 278160 6649260 0 0 0 2340 24750 42888 29 8 45 18
1 1 0 172928 278176 6649244 0 0 0 1408 23818 41362 30 8 42 21
1 0 0 172696 278176 6649304 0 0 0 471 23144 40932 25 7 58 10
1 0 0 172488 278176 6649304 0 0 0 275 26299 45241 27 17 52 5
1 2 0 172612 278184 6649304 0 0 0 1806 24572 41288 40 6 44 9
5 2 0 172752 278200 6649328 0 0 0 780 23541 41308 28 6 33 33
Iostat 1 shows:
Linux 2.6.32-5-amd64 () 31.12.2012 _x86_64_ (4 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
47,02 0,34 12,94 6,95 0,00 32,74
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 7,68 17,48 3428,36 112980468 22156867512
sdb 0,00 0,00 0,00 748 2208
sdc 70,20 3506,35 1574,01 22660920204 10172547974
sdd 70,32 3528,74 1551,86 22805657128 10029430470
sde 71,11 3548,29 1538,53 22931965117 9943244782
md0 0,00 0,01 0,00 55936 5416
md1 356,51 3276,98 2594,09 21178557866 16765170392
avg-cpu: %user %nice %system %iowait %steal %idle
24,88 0,00 6,47 18,41 0,00 50,25
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0,00 0,00 0,00 0 0
sdb 0,00 0,00 0,00 0 0
sdc 164,00 80,00 2792,00 80 2792
sdd 116,00 1072,00 1248,00 1072 1248
sde 138,00 0,00 1864,00 0 1864
md0 0,00 0,00 0,00 0 0
md1 369,00 0,00 2952,00 0 2952
avg-cpu: %user %nice %system %iowait %steal %idle
30,71 0,00 6,88 14,50 0,00 47,91
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0,00 0,00 0,00 0 0
sdb 0,00 0,00 0,00 0 0
sdc 187,00 1040,00 1944,00 1040 1944
sdd 286,00 64,00 4616,00 64 4616
sde 231,00 1024,00 3056,00 1024 3056
md0 0,00 0,00 0,00 0 0
md1 601,00 0,00 4808,00 0 4808
avg-cpu: %user %nice %system %iowait %steal %idle
22,03 0,00 6,68 3,71 0,00 67,57
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0,00 0,00 0,00 0 0
sdb 0,00 0,00 0,00 0 0
sdc 30,00 8,00 716,00 8 716
sdd 10,00 40,00 44,00 40 44
sde 33,00 0,00 740,00 0 740
md0 0,00 0,00 0,00 0 0
md1 92,00 0,00 736,00 0 736
Let me give you following questions:
1) Is there problem in full capacity of my raid? (total size 916GB, used 505G, free 365G). 2) Is there problem with " 512k chunk" ?
3) Is EXT3 optimal for SW RAID 5?
4) Is there any possibility, how to increase speed of my SW raid 5?
5) Is it possible to add next disk to my RAID to be not spare, to increase speed of raid only?
6) How much CPU TIME consumes SW Raid 5? in top it shows me only: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 422 root 20 0 0 0 0 S 1 0.0 1743:38 md1_raid5 Server uptime is 74 days (since changing them for the old one).
TOP shows:
top - 10:18:43 up 74 days, 19:21, 3 users, load average: 2.33, 2.86, 2.94
Tasks: 147 total, 2 running, 145 sleeping, 0 stopped, 0 zombie
Cpu(s): 22.6%us, 6.9%sy, 0.0%ni, 52.9%id, 17.1%wa, 0.1%hi, 0.4%si, 0.0%st
Mem: 24743684k total, 24598984k used, 144700k free, 270604k buffers
Swap: 0k total, 0k used, 0k free, 6664872k cached
I think, there is too high avarage load. But why?I don't see anything consuming too much CPU.
Power TOP Shows following:
Wakeups-from-idle per second : 6122,7 interval: 10,0s
Top causes for wakeups:
74,0% (17652,4) kvm : sys_timer_settime (posix_timer_fn)
15,0% (3579,6) <kernel IPI> : Rescheduling interrupts
5,5% (1319,6) kvm : apic_reg_write (kvm_timer_fn)
1,8% (422,4) <interrupt> : ahci
1,0% (248,2) events/0 : flush_to_ldisc (delayed_work_timer_fn)
0,7% (178,6) worldserver : __mod_timer (process_timeout)
0,6% (153,4) <interrupt> : eth0
0,5% (118,4) <interrupt> : pata_atiixp
0,2% ( 43,6) kvm : __kvm_migrate_timers (kvm_timer_fn)
0,1% ( 20,0) md1_raid5 : __mod_timer (blk_unplug_timeout)
0,0% ( 11,2) authserver : __mod_timer (process_timeout)
