Skip to content

Commit 7ad9e3a

Browse files
tytydracoDhineshCool
authored andcommitted
mm: Disable readahead by default
An article from 2014 (old but relevant) discussed the impact of readahead on flash storage and its effects on SQLine and DBMS performance. What was discovered was that turning off readahead could improve performance and power consumption by 70% (sequential; 60% for random). https://www.semanticscholar.org/paper/Revisiting-read-ahead-efficiency-for-raw-NAND-flash-Olivier-Boukhobza/297f3d189dcd9b099f8f6b5fbc7e304db395a683 Signed-off-by: Tyler Nijmeh <tylernij@gmail.com>
1 parent ac573b2 commit 7ad9e3a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/linux/mm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2161,8 +2161,8 @@ int write_one_page(struct page *page, int wait);
21612161
void task_dirty_inc(struct task_struct *tsk);
21622162

21632163
/* readahead.c */
2164-
#define VM_MAX_READAHEAD 128 /* kbytes */
2165-
#define VM_MIN_READAHEAD 16 /* kbytes (includes current page) */
2164+
#define VM_MAX_READAHEAD 0 /* kbytes */
2165+
#define VM_MIN_READAHEAD 0 /* kbytes (includes current page) */
21662166

21672167
int force_page_cache_readahead(struct address_space *mapping, struct file *filp,
21682168
pgoff_t offset, unsigned long nr_to_read);

0 commit comments

Comments
 (0)