Skip to content

Commit

Permalink
[VectorSearch] Update opensearch and update cluster configuration for…
Browse files Browse the repository at this point in the history
… memory management
  • Loading branch information
PierreGauthier committed May 24, 2024
1 parent ec82325 commit 95b824a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
4 changes: 3 additions & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
# https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
ARG PHP_VERSION=8.1
ARG CADDY_VERSION=2.6.4
ARG OPENSEARCH2_VERSION=2.13.0
# On opensearch update, check a fix for this issue has been released : https://github.com/opensearch-project/ml-commons/issues/2308
# and if so, check if we can re-enable test on multiple model and remove the configuration of the memory_threshold of the cluster.
ARG OPENSEARCH2_VERSION=2.14.0
ARG ELASTIC7_VERSION=7.16.3
ARG ELASTIC8_VERSION=8.10.4
# ARG XDEBUG_VERSION=3.1.2
Expand Down
36 changes: 20 additions & 16 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,17 @@ services:
target: gally_opensearch2
# restart: unless-stopped
environment:
- cluster.name=os-docker-cluster # Search cluster name
- node.name=opensearch-node-data # Name the node that will run in this container
- bootstrap.memory_lock=true # Disable JVM heap memory swapping
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # Set min and max JVM heap sizes to at least 50% of system RAM
- cluster.routing.allocation.disk.threshold_enabled=false # Avoid ES going read-only because low disk space availability
- "DISABLE_SECURITY_PLUGIN=true" # Disable security plugin
- plugins.ml_commons.allow_registering_model_via_url=true
- discovery.seed_hosts=search # Nodes to look for when discovering the cluster
- "OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g" # Set min and max JVM heap sizes to at least 50% of system RAM
- "DISABLE_SECURITY_PLUGIN=true" # Disable security plugin
- cluster.name=os-docker-cluster # Search cluster name
- cluster.routing.allocation.disk.threshold_enabled=false # Avoid ES going read-only because low disk space availability
- cluster.initial_cluster_manager_nodes=opensearch-node-data # Nodes eligible to serve as cluster manager
- node.name=opensearch-node-data # Name the node that will run in this container
- bootstrap.memory_lock=true # Disable JVM heap memory swapping
- discovery.seed_hosts=search # Nodes to look for when discovering the cluster
- plugins.ml_commons.allow_registering_model_via_url=true
- plugins.ml_commons.native_memory_threshold=100 # Prevent memory issue after multiple deploy (https://github.com/opensearch-project/ml-commons/issues/2308)
- plugins.ml_commons.jvm_heap_memory_threshold=100 # Prevent memory issue after multiple deploy (https://github.com/opensearch-project/ml-commons/issues/2308)
volumes:
- os2_data:/usr/share/opensearch/data:rw
ulimits:
Expand All @@ -160,16 +162,18 @@ services:
target: gally_opensearch2
# restart: unless-stopped
environment:
- cluster.name=os-docker-cluster # Search cluster name
- node.name=opensearch-node-ml # Name the node that will run in this container
- bootstrap.memory_lock=true # Disable JVM heap memory swapping
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # Set min and max JVM heap sizes to at least 50% of system RAM
- "OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g" # Set min and max JVM heap sizes to at least 50% of system RAM
- "DISABLE_SECURITY_PLUGIN=true" # Disable security plugin
- cluster.name=os-docker-cluster # Search cluster name
- cluster.routing.allocation.disk.threshold_enabled=false # Avoid ES going read-only because low disk space availability
- "DISABLE_SECURITY_PLUGIN=true" # Disable security plugin
- node.roles=ml
- plugins.ml_commons.allow_registering_model_via_url=true
- discovery.seed_hosts=search # Nodes to look for when discovering the cluster
- cluster.initial_cluster_manager_nodes=opensearch-node-data # Nodes eligible to serve as cluster manager
- node.name=opensearch-node-ml # Name the node that will run in this container
- node.roles=ml # Define this node as an ml node
- bootstrap.memory_lock=true # Disable JVM heap memory swapping
- discovery.seed_hosts=search # Nodes to look for when discovering the cluster
- plugins.ml_commons.allow_registering_model_via_url=true
- plugins.ml_commons.native_memory_threshold=100 # Prevent memory issue after multiple deploy (https://github.com/opensearch-project/ml-commons/issues/2308)
- plugins.ml_commons.jvm_heap_memory_threshold=100 # Prevent memory issue after multiple deploy (https://github.com/opensearch-project/ml-commons/issues/2308)
ulimits:
memlock:
soft: -1
Expand Down

0 comments on commit 95b824a

Please sign in to comment.