Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodetool may try to boot with memory higher than what scylla leaves for other process to run #61

Open
slivne opened this issue Jul 30, 2018 · 0 comments

Comments

@slivne
Copy link
Contributor

slivne commented Jul 30, 2018

scylla may leave for the os (nodetool and everything else)

max(1.5GB, 0.07 * available_memory) * panic_factor of 1.

(according to scylla/seastar@641f07a37d4e40491465a2255d67eb1b451aae08)

this is especially bad for low memory machines and does not align with the memory allocation that nodetool is started with.

To fix this we should:

  1. recommend/insist on enabling swap when we have less then 8GB free.
  2. reduce the memory nodetool is started with (not clear why there is such a high memory requirement for nodetool to begin with) - I think we can change this to 1GB - the min value that can be set in the env.

nodetool uses the code in conf/cassandra-env.sh that has

   # set max heap size based on the following
    # max(min(1/2 ram, 1024MB), min(1/4 ram, 8GB))
    # calculate 1/2 ram and cap to 1024MB
    # calculate 1/4 ram and cap to 8192MB
    # pick the max
    half_system_memory_in_mb=`expr $system_memory_in_mb / 2`
    quarter_system_memory_in_mb=`expr $half_system_memory_in_mb / 2`
    if [ "$half_system_memory_in_mb" -gt "1024" ]
    then
        half_system_memory_in_mb="1024"
    fi
    if [ "$quarter_system_memory_in_mb" -gt "8192" ]
    then
        quarter_system_memory_in_mb="8192"
    fi
    if [ "$half_system_memory_in_mb" -gt "$quarter_system_memory_in_mb" ]
    then
        max_heap_size_in_mb="$half_system_memory_in_mb"
    else
        max_heap_size_in_mb="$quarter_system_memory_in_mb"
    fi
    MAX_HEAP_SIZE="${max_heap_size_in_mb}M"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant