LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-21-2016, 09:13 PM   #1
road hazard
Member
 
Registered: Nov 2015
Posts: 241

Rep: Reputation: Disabled
Question MDADM speed is garbage all of a sudden


I've been playing around with MDADM and RAID 6 lately. I created and deleted the array about a dozen times as I was playing around with different options but when I re-created it tonight, I noticed that things were a little slow. Before, I was able to copy from my internal SSD to the array and averaged about 120MB/s. Tonight, I'm getting about 10MB/s. ????? Could of sworn I did everything the same. I tried the default 512K chunk size then took it down to 64K and same results. Crap speed.

cat /proc/mdstat returns this:

md0 : active raid6 sdh[5] sdg[4] sdf[3] sde[2] sdd[1] sdc[0]
624637952 blocks super 1.2 level 6, 512k chunk, algorithm 2 [6/6] [UUUUUU]
bitmap: 1/2 pages [4KB], 65536KB chunk

unused devices: <none>

Any suggestions?

Some things I noticed that were a little different. When the array was being created tonight, I got an error about how the GPT is not valid but the backup was OK and will be used. I'm going to delete the array again and will wait to see if somebody can hopefully offer up some step-by-step instructions to see if I can get back to square one. (100+MB/s)
 
Old 07-23-2016, 07:54 AM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Did you create the RAID on raw devices or you partitioned your drives beforehand?
 
Old 07-23-2016, 08:03 AM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
To me, your bitmap looks wonky - 1/2 pages seems small. Mine is currently 0/22 pages, (raid 5, 3 partitions 3 TB each).
 
Old 07-29-2016, 08:45 AM   #4
road hazard
Member
 
Registered: Nov 2015
Posts: 241

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
Did you create the RAID on raw devices or you partitioned your drives beforehand?
Sorry for the delayed response. I created the RAID on raw devices.
 
Old 07-29-2016, 09:04 AM   #5
road hazard
Member
 
Registered: Nov 2015
Posts: 241

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
To me, your bitmap looks wonky - 1/2 pages seems small. Mine is currently 0/22 pages, (raid 5, 3 partitions 3 TB each).
Is there an optimal setting for bitmap? Ultimately, this setup will have 6, 4TB drives in RAID 6. Another question, can this bitmap setting be changed on the fly or will I have to delete the array and make that change when it's created?
 
Old 07-29-2016, 09:51 AM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by road hazard View Post
Is there an optimal setting for bitmap? Ultimately, this setup will have 6, 4TB drives in RAID 6. Another question, can this bitmap setting be changed on the fly or will I have to delete the array and make that change when it's created?
Not sure how this goes, but usually the bitmap is internal and gets created/allocated during creation. If things were added/modified piecemeal then it may be a bit off. The bitmap itself is used during recovery (recovery only needs to process the flagged blocks) - but from what I can find, if it is too small it forces excess writes to the bitmap, which can translate into slow writes (as the bitmap may get updated multiple times for each write).

The following commands are SUPPOSED to remove the internal bitmap, then allocate it again:
Code:
mdadm -G --bitmap=none <md-device> (remove the bitmap)
mdadm -G --bitmap=internal --bitmap-chunk=N <md-device> (creates internal bitmap, and uses the given chunk size)
where N is the size of bitmap chunk. You can try leaving out the --bitmap-chunk to see if mdadm allocates based on the storage size. The default is 64MB, but the manpage also says "or larger if necessary to fit the bitmap into the available space".
 
  


Reply

Tags
mdadm, slow



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Garbage, absolute garbage. orasis General 16 12-27-2014 03:57 PM
[SOLVED] Sudden loss of graphics speed. business_kid Linux - Hardware 12 11-10-2012 09:09 AM
[SOLVED] Attempts to work around a mdadm bug/ mdadm cannot get exclusive access to /dev/md127 Sereph Linux - Newbie 1 08-16-2011 03:21 AM
MDADM screws up the LVM partitions? Can't mount the LVMs after mdadm stopped alirezan1 Linux - Newbie 3 11-18-2008 04:42 PM
unable to load MDADM module BUT mdadm works?!?!?! alirezan1 Linux - Software 2 09-08-2008 07:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration