2

I have got ubuntu server 12.04 with software raid0 intel sata3 ssd(2*480GB). raid is used for postgresql database. There is 51% of raid space is free.

After postgres shutdown, "dd" command shows performance about 10mb/sec. uptime is 2 weeks.

after system reboot raid works fine again and "dd" shows about 700-800mb/sec.

cat /proc/mdstat

md127 : active raid0 sdd1[0] sdc1[1]
  937700352 blocks super 1.2 512k chunks

Why performance degrades with large uptime?

mdadm version - 3.2.5

  • Are you using dd to access the disk directly, or are you going through the filesystem by reading/writing a file? – Andrew Henle Apr 27 '15 at 23:08
  • trough filesystem. "dd if=/dev/zero of=/media/raid/output bs=8k count=100k" – user1941407 Apr 28 '15 at 7:11
  • Is read performance also slow? If so, how fast can you read from the disk? Something like dd if=/dev/sda of=/dev/null bs=8k count=100k, where if= is the path to your SSD RAID device. – Andrew Henle Apr 28 '15 at 12:39
  • after reboot it works fine. now read from disk is 400mb/sec, read from array is 800mb/sec. I will test it with performance degrade later. – user1941407 Apr 28 '15 at 15:15
  • Next time you have degradation, check the contents of /proc/mdstat to make sure your raid isn't degraded and rebuilding. – Chad Smith Apr 29 '15 at 5:08
3

I would recommend that you check your logs (/var/log/*) for messages like "NCQ disabled due to excessive errors", this and similar messages (try to look for anything with "ata" in it too) indicate that you are having errors on your SATA links and these may cause Linux to disable NCQ and then you'll get a very bad performance.

I've written a longer version a while ago at my blog: http://blog.disksurvey.org/blog/2013/10/28/ncq-disabled/

The errors may come from the disk itself or from the links, you can try to replace the cables. The blog post indicates some other things that can be done to alleviate this issue.

| improve this answer | |
0

Not quite exactly what the OP was looking for but the use of dd isn't a best practice in my opinion.

DD is on the whole just much better used for imaging disks than benchmarking. Use Fio.

sudo dnf install fio or sudo apt-get install fio

4k random test

fio --filename=/dev/sdx --direct=1 --rw=randrw --refill_buffers --norandommap --randrepeat=0 --ioengine=libaio --bs=4k --rwmixread=100 --iodepth=16 --numjobs=16 --runtime=60 --group_reporting --name=4ktest

8k mixed test

fio --filename=/dev/sdx --direct=1 --rw=randrw --refill_buffers --norandommap --randrepeat=0 --ioengine=libaio --bs=8k --rwmixread=70 --iodepth=16 --numjobs=16 --runtime=60 --group_reporting --name=8k7030test

taken from: http://www.storagereview.com/fio_flexible_i_o_tester_synthetic_benchmark

once you are sure your raw disks are performing as they should, create the raid-0 unit via madam and then before partitioning test them again but this time instead of /dev/sd{x} pass in whatever you called your raid array, once satisfied, create your partitions aligning as needed and test that, then once good there, format and mount and test that.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.