[LU-9618] Connect readahead to prep_partial_page to improve small (< 1 page) write performance Created: 07/Jun/17  Updated: 30/Aug/19  Resolved: 20/Jan/18

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.11.0

Type: Bug Priority: Minor
Reporter: Patrick Farrell (Inactive) Assignee: Patrick Farrell (Inactive)
Resolution: Fixed Votes: 0
Labels: patch

Issue Links:
Related
is related to LU-11140 unassume cl page upon write error Resolved
is related to LU-8964 use parallel I/O to improve performan... Resolved
is related to LU-12718 Readahead can trigger an assertion fa... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

When writing to a region of a file less than file size (either an already existing file or a shared file with multiple writers), writes of less than one page in size must first read in that page.

This results in extremely poor performance. For the random I/O case, there's no easy improvements available, but the sequential case can benefit enormously by using readahead to bring in those pages.

This can be done by using the normal read code w/readahead from the ll_prepare_partial_page function. This works well in the sequential case (3-10x performance improvement) and has no effect on the random case.

Patch & benchmark #s forthcoming shortly.



 Comments   
Comment by Gerrit Updater [ 09/Jun/17 ]

Patrick Farrell (paf@cray.com) uploaded a new patch: https://review.whamcloud.com/27544
Subject: LU-9618 clio: Use readahead for partial page write
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 1b9d2d4a523fc7d02245864942246fef7b92e3c5

Comment by Gerrit Updater [ 20/Jan/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/27544/
Subject: LU-9618 clio: Use readahead for partial page write
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: b7d38ece00135e74a627a9702d6dadff10c3c89d

Comment by Peter Jones [ 20/Jan/18 ]

Patrick

As you will have seen this has landed to master. I saw your most recent musings in gerrit and wondered if you are ok with this or would prefer this reverted while you think some more?

Peter

Comment by Patrick Farrell (Inactive) [ 20/Jan/18 ]

Ah, no, it's fine. It's just a little complicated - LU-8964 removes the readahead code in Lustre, which this patch uses. Once LU-8964 lands, either as part of that landing or later, the code from this patch will have to be modified to use the kernel readahead infrastructure so we can keep this feature. My musing was about how best to do that. (But we can't make that change to this patch until LU-8964 lands.)

Does that make sense? It's probably on Dmitry to fix it as part of landing LU-8964 now, but I can help too as desired.

Short version:
This patch introduces an additional user of code LU-8964 will remove. So the code this patch changed will have to be modified when LU-8964 lands. My musing was on how to do that.

Comment by Peter Jones [ 20/Jan/18 ]

ok sounds good. Your review of the LU-8964 patch would be much appreciated.

Comment by Gerrit Updater [ 25/Jan/18 ]

Minh Diep (minh.diep@intel.com) uploaded a new patch: https://review.whamcloud.com/31012
Subject: LU-9618 clio: Use readahead for partial page write
Project: fs/lustre-release
Branch: b2_10
Current Patch Set: 1
Commit: bf77ac10092f22bfbae5873cc3c87425ccb8444c

Generated at Sat Feb 10 02:27:46 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.