Re: [PATCH v5 00/12] md: align bio to io_opt for better performance
"John Stoffel" <[email protected]>
| Newsgroups | gmane.linux.raid |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "Yu" == Yu Kuai <[email protected]> writes: > This patchset optimizes MD RAID performance by aligning bios to the > optimal I/O size before splitting. When I/O is aligned to io_opt, > raid5 can perform full stripe writes without needing to read extra > data for parity calculation, significantly improving bandwidth. > Patch 1: Fix a bug in raid5_run() error handling > Patches 2-4: Cleanup - merge boolean fields into mddev_flags > Patches 5-6: Preparation - use mempool for stripe_request_ctx and > ensure max_sectors >= io_opt > Patches 7-8: Core - add bio alignment infrastructure > Patches 9-11: Enable bio alignment for raid5, raid10, and raid0 > Patch 12: Fix abnormal io_opt from member disks > Performance improvement on 32-disk raid5 with 64kb chunk: > dd if=/dev/zero of=/dev/md0 bs=100M oflag=direct > Before: 782 MB/s > After: 1.1 GB/s My only comment is how is performance impacted at other block sizes? And smaller RAID5 arrays? What about RAID6? And more importantly, are random disk writes impacted? It's great that you have gotten streaming direct writes faster, but have other writes slowed down for the common case? > Changes in v5: > - Add patch 1 to fix raid5_run() returning success when log_init() fails > - Patch 12: Fix stale commit message (remove mention of MD_STACK_IO_OPT flag) > Changes in v4: > - Patch 12: Simplify by checking rdev_is_mddev() first, remove > MD_STACK_IO_OPT flag > Changes in v3: > - Patch 5: Remove unnecessary NULL check before mempool_destroy() > - Patch 7: Use sector_div() instead of roundup()/rounddown() to fix > 64-bit division issue on 32-bit platforms > Changes in v2: > - Fix mempool in patch 5 > - Add prep cleanup patches, 2-4 > - Add patch 12 to fix abnormal io_opt > - Add Link tags to patches > Yu Kuai (12): > md/raid5: fix raid5_run() to return error when log_init() fails > md: merge mddev has_superblock into mddev_flags > md: merge mddev faillast_dev into mddev_flags > md: merge mddev serialize_policy into mddev_flags > md/raid5: use mempool to allocate stripe_request_ctx > md/raid5: make sure max_sectors is not less than io_opt > md: support to align bio to limits > md: add a helper md_config_align_limits() > md/raid5: align bio to io_opt > md/raid10: align bio to io_opt > md/raid0: align bio to io_opt > md: fix abnormal io_opt from member disks > drivers/md/md-bitmap.c | 4 +- > drivers/md/md.c | 118 +++++++++++++++++++++++++++++++++++------ > drivers/md/md.h | 30 +++++++++-- > drivers/md/raid0.c | 6 ++- > drivers/md/raid1-10.c | 5 -- > drivers/md/raid1.c | 13 ++--- > drivers/md/raid10.c | 10 ++-- > drivers/md/raid5.c | 95 +++++++++++++++++++++++---------- > drivers/md/raid5.h | 3 ++ > 9 files changed, 217 insertions(+), 67 deletions(-) > -- > 2.51.0