Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-13131

Update Cassandra service script to optionally protected it against the oom-killer

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Fix Version/s: None
    • Labels:
      None

      Description

      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:

              [ $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"
      

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ekuns Edward Kuns
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: