PROBLEM: [RAID5 BUG] the reading rate after writing is lower than reading rate before writing in raid5.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Maintainer:
  Sorry to disturb you. I heard you are the maintainer of RAID5 from NeilBrown.
  [1. ] I found the reading rate after writing is lower than reading rate before writing .
  [2. ] The following is what I found about the performance of RAID5. It seems as a bug about RAID5. All of my experiments are based on Kernel 3.16.4 Ubuntu 14.04.
        First, I make a raid5 device using the COMMAND “mdadm –C /dev/md5 –l5 –n8 –assume-clean /dev/sd[bcdefghi]”.
        Then, using dd for the first reading: dd if=/dev/md5 of=/dev/null bs=1M count=30000. Record the reading rate as A .
        Then, using dd for writing: dd if=/dev/zero of=/dev/md5 bs=1M count=30000.
        Then, using dd for the second reading: dd if=/dev/md5 of=/dev/null bs=1M count=30000. Record the reading rate as B.
         I found after writing the rate of B for the second reading is lower than A.

         [3. ]The analysis is, when the first reading, the variable conf->empty_inactive_list_nr in function md_raid5_congested is zero, then md_raid5_congested will return zero and the readahead in reading is using page_cache_async_readahead.
  Void page_cache_async_readahead(){
           /*
           * Defer asynchronous read-ahead on IO congestion.
           */
           If(bdi_read_congested(mapping->backing_dev_info))
                     Return;
           /* do read-ahead */
           ondemand_readahead(mapping, ra, filp, true, offset, req_size);
  }
         In Raid5, the bdi_read_congested will finally call md_raid5_congested.
         But after writing, the variable conf->empty_inactive_list_nr is not zero, then for the second reading, when call page_cache_async_readahead, it will return at the bid_read_congested. It doesn’t do the real readahead and every read will be a page_cache_sync_readahead. So it results that the second reading rate B is lower than the first reading A.

  [4. ]I think the variable conf->empty_inactive_list_nr should be balance after reading or writing. But the result is that it break the balance(the value is not zero) after writing, and each writing will make the variable conf->empty_inactive_list_nr bigger. But I don’t find what makes the variable non-zero after writing. If you solve this problem or have some discoveries, please let me know. Thank you very much.


Best Regards!
VicWang | Beijing,China
+8618516890121


保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.
��.n��������+%������w��{.n�����{����w��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux