[Database] Disable read-ahead to reduce thrashing
Needs ReviewPublic

Authored by hurikhan77 on Oct 10 2019, 5:44 PM.

Details

Reviewers
ngraham
bruns
Group Reviewers
Baloo
Summary

Prevent filesystem thrashing in low-mem situations by turning off
read-ahead. Access patterns of baloo are unlikely to benefit from
read-ahead and preserving cache is more valuable than reading ahead
potentially unused data.

In low-memory conditions, the random access patterns of Baloo combined
with read-ahead tend to dominate the cache. Let Baloo be the slow player
here, and leave system cache and memory for interactive performance.

Depends on D24539

CCBUG: 356357

Diff Detail

Repository
R293 Baloo
Branch
fixes/readahead
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17552
Build 17570: arc lint + arc unit
hurikhan77 created this revision.Oct 10 2019, 5:44 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptOct 10 2019, 5:44 PM
Restricted Application added subscribers: Baloo, kde-frameworks-devel. · View Herald Transcript
ngraham added a subscriber: bruns.

@bruns, does this make sense to you?

hurikhan77 updated this revision to Diff 67681.Oct 11 2019, 8:43 AM

Resend diff with arc

hurikhan77 updated this revision to Diff 67684.Oct 11 2019, 8:55 AM
hurikhan77 edited the summary of this revision. (Show Details)

Added depend line according to arc docs

ngraham edited the summary of this revision. (Show Details)Oct 11 2019, 4:34 PM
hurikhan77 added a comment.EditedOct 11 2019, 9:13 PM

Here's a quote:
https://github.com/bmatsuo/lmdb-go/issues/118#issuecomment-325449496

I suspect that we can safely say: The Baloo DB is always bigger than the available RAM (we shouldn't fight with what the desktop needs, so let's say we have maybe 20% of the installed RAM at our disposal which is already a high assumption for typical systems).