Whamcloud - gitweb
LU-14134 osd-ldiskfs: reduce credits for new writing 26/40626/12
authorWang Shilong <wshilong@ddn.com>
Thu, 12 Nov 2020 09:38:15 +0000 (17:38 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 3 Dec 2020 07:27:35 +0000 (07:27 +0000)
commit0271b17b80a82c132076a839385d3d8d8344c849
tree2dbfc4676ffd875eb88bcbf208651af21e48cbd9
parent596f74c122f5edb0d45c4edf1b2aea4f741f7027
LU-14134 osd-ldiskfs: reduce credits for new writing

For new writing, Lustre reserve credits in worst cases,
eg for 1M write, we need reserve more than 500 credits.

This means we need much more journal space than data
blocks for each new writing thus a large journal needed
to reach good performance.

This patch try to improve the case by allowing transaction
to be restarted, only reserve few extent credits during
declare phase. Before every block allocation, one extent
insertion credits must be guaranteed, otherwise transaction
will be restarted.

A simple dd test of following in 10G device shows credits
removed from 260+ to 7 credits:

 $ dd if=/dev/zero of=data bs=1M count=1 oflag=direct

Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: Ide541cbd72d8d4aa286eb8b84ca5ce09c3b5f8b6
Reviewed-on: https://review.whamcloud.com/40626
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ofd/ofd_io.c
lustre/osd-ldiskfs/osd_io.c