[ 
https://issues.apache.org/jira/browse/CASSANDRA-16436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17467696#comment-17467696
 ] 

Paulo Motta commented on CASSANDRA-16436:
-----------------------------------------

Thanks. I added some minor follow-up review changes on [this 
PR|https://github.com/subkanthi/cassandra/pull/1/files] to your branch. Let me 
know what do you think.

I tested the patch locally on a docker image and got the expected message when 
there is a high read_ahead_kb setting:
{noformat}
WARN  [main] 2022-01-02 19:54:25,030 StartupChecks.java:358 - Detected high 
'/sys/block/vda/queue/read_ahead_kb' setting of 4096 for device '/dev/vda1' of 
data directory '/opt/cassandra/data/data'. It is recommended to set this value 
to 8(KB) on SSDs or 64(KB) on HDDs to prevent excessive IO usage and page cache 
churn on read-intensive workloads.
{noformat}

I checked the warning is not print when the read_ahead_kb setting is below 
128KB. 

Final patch and CI:
|[trunk|https://github.com/apache/cassandra/compare/trunk...pauloricardomg:subkanthi/16436-trunk-rebased]|[tests|https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/1342/]|

> Add startup check for large read_ahead_kb setting
> -------------------------------------------------
>
>                 Key: CASSANDRA-16436
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16436
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Local/Startup and Shutdown
>            Reporter: Paulo Motta
>            Assignee: Kanthi Subramanian
>            Priority: Normal
>              Labels: AdventCalendar2021, lhf
>
> A well known production tuning recommendation is to dial back the 
> {{read_ahead_kb}} Linux setting from the default of 4096 in most 
> distributions as this can cause high IO usage and cache churn on 
> read-intensive workloads.
> We should add a startup warning to detect when a high {{read_ahead_kb}} is 
> used and recommend the user to dial back to a reasonable value, which varies 
> according to the workload but a general guideline is to tune this to 8kb.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to