apache / apache/bookkeeper

journalRemoveFromPageCache default value probably we should set to false?

Open
#2,984 2 comments 0 reactions 0 assignees View on GitHub
type/bug
Dominant language
Java
Stars
2k
Forks
976
Avg merge
6d 15h
Merged PRs (30d)
7

Description

**BUG REPORT**

***Describe the bug***
The configuration is as follows:
journalDirectories=/data1/bk-journal
ledgerDirectories=/data2/bk-data,/data3/bk-data,/data4/bk-data
data1\data2\data3\data4 are all physical disks.
Online, we found that when read miss cache(At this time, data2~4 disks will have more reads.). At this time, the flush time of data1 increases:
![image](https://user-images.githubusercontent.com/19296967/148904736-b857ea97-2df2-4206-b4dc-96ba1f42ee9b.png)
![image](https://user-images.githubusercontent.com/19296967/148908664-7db68cd6-c637-43aa-97c9-b67b1e8c53ba.png)

The indicator bookie_journal_JOURNAL_SYNC is mainly for the time-consuming statistics of the method org.apache.bookkeeper.bookie.JournalChannel#forceWrite:
![image](https://user-images.githubusercontent.com/19296967/148906642-006db3fd-5aac-4b6e-85f1-30ab9613aee2.png)

Since the journal disk is independent, the bc.forceWrite time-consuming should not be affected. So I suspect that NativeIO.bestEffortRemoveFromPageCache takes time to increase. I'm not particularly sure, but I have a guess: Due to a large amount of disk data being read, the pagecache is affected, which leads to an increase in the time required to call the bestEffortRemoveFromPageCache method here?

So in order to prevent reads from affecting writes, should the default value of journalRemoveFromPageCache be set to false?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.