You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Edward Kuns (JIRA)" <ji...@apache.org> on 2017/01/18 03:48:27 UTC

[jira] [Created] (CASSANDRA-13131) Update Cassandra service script to optionally protected it against the oom-killer

Edward Kuns created CASSANDRA-13131:
---------------------------------------

             Summary: Update Cassandra service script to optionally protected it against the oom-killer
                 Key: CASSANDRA-13131
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13131
             Project: Cassandra
          Issue Type: Improvement
          Components: Lifecycle
            Reporter: Edward Kuns
            Priority: Minor


The Cassandra startup script for RedHat currently makes no attempt to optionally adjust the oom-killer tuning.  It would be helpful if the startup scripts were modified to optionally echo a value to the special /proc file {{oom_score_adj}}.  It could be triggered by an optional value that could be set in {{/etc/default/$NAME}}.  Maybe something like the below where only a couple surrounding lines from {{/etc/init.d/cassandra}} are included for context:

{noformat}
        [ $retval -eq 0 ] && touch $lock_file
        [ $retval -eq 0 -a ! -z "$OOM_SCORE_ADJ" ] && echo $OOM_SCORE_ADJ > /proc/$(cat $pid_file)/oom_score_adj
        echo "OK"
{noformat}

Of course, it could be cleaned up to avoid the duplication of checking the retval twice.  

This would make it trivial for those running Cassandra to protect it from the oom-killer, if they chose, by simply modifying one line of a configuration file, as opposed to modifying a script and re-modifying the script every time an upgrade is applied.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)