Skip to content

Commit

Permalink
Merge pull request #248 from FalkorDB/244-memory-limit-for-startup-tier
Browse files Browse the repository at this point in the history
added set memory limit  by user and added missing instance sizes
  • Loading branch information
MuhammadQadora authored Feb 12, 2025
2 parents e0bc7ce + 084ba19 commit 2150396
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions falkordb-cluster/cluster-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,17 @@ 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"
["e2-custom-8-16384"]="13GB"
["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"
Expand Down
8 changes: 6 additions & 2 deletions falkordb-node/node-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -214,20 +214,24 @@ 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"
["e2-custom-8-16384"]="13GB"
["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
Expand Down
1 change: 1 addition & 0 deletions omnistrate.startup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2150396

Please sign in to comment.