diff --git a/falkordb-cluster/cluster-entrypoint.sh b/falkordb-cluster/cluster-entrypoint.sh index 0e121c4..0f9cab0 100755 --- a/falkordb-cluster/cluster-entrypoint.sh +++ b/falkordb-cluster/cluster-entrypoint.sh @@ -295,6 +295,8 @@ get_default_memory_limit() { set_memory_limit() { declare -A memory_limit_instance_type_map memory_limit_instance_type_map=( + ["e2-standard-2"]="6GB" + ["e2-standard-4"]="14GB" ["e2-custom-small-1024"]="100MB" ["e2-medium"]="2GB" ["e2-custom-4-8192"]="6GB" @@ -302,6 +304,8 @@ set_memory_limit() { ["e2-custom-16-32768"]="30GB" ["e2-custom-32-65536"]="62GB" ["t2.medium"]="2GB" + ["m6i.large"]="6GB" + ["m6i.xlarge"]="14GB" ["c6i.xlarge"]="6GB" ["c6i.2xlarge"]="13GB" ["c6i.4xlarge"]="30GB" diff --git a/falkordb-node/node-entrypoint.sh b/falkordb-node/node-entrypoint.sh index 0a62db1..32640d5 100755 --- a/falkordb-node/node-entrypoint.sh +++ b/falkordb-node/node-entrypoint.sh @@ -214,6 +214,8 @@ get_memory_limit() { declare -A memory_limit_instance_type_map memory_limit_instance_type_map=( + ["e2-standard-2"]="6GB" + ["e2-standard-4"]="14GB" ["e2-custom-small-1024"]="100MB" ["e2-medium"]="2GB" ["e2-custom-4-8192"]="6GB" @@ -221,13 +223,15 @@ get_memory_limit() { ["e2-custom-16-32768"]="30GB" ["e2-custom-32-65536"]="62GB" ["t2.medium"]="2GB" + ["m6i.large"]="6GB" + ["m6i.xlarge"]="14GB" ["c6i.xlarge"]="6GB" ["c6i.2xlarge"]="13GB" ["c6i.4xlarge"]="30GB" ["c6i.8xlarge"]="62GB" ) - - if [[ -z $INSTANCE_TYPE ]]; then + + if [[ -z $INSTANCE_TYPE && -z $MEMORY_LIMIT ]]; then echo "INSTANCE_TYPE is not set" MEMORY_LIMIT=$(get_default_memory_limit) fi diff --git a/omnistrate.startup.yaml b/omnistrate.startup.yaml index 7111a50..1b7de70 100644 --- a/omnistrate.startup.yaml +++ b/omnistrate.startup.yaml @@ -471,6 +471,7 @@ services: - TLS=$var.enableTLS - FALKORDB_USER=$var.falkordbUser - DATA_DIR=/data + - MEMORY_LIMIT=$var.memoryRequestsAndLimits - ROOT_CA_PATH=/etc/ssl/certs/GlobalSign_Root_CA.pem - PERSISTENCE_RDB_CONFIG_INPUT=$var.RDBPersistenceConfig - PERSISTENCE_AOF_CONFIG=$var.AOFPersistenceConfig