Skip to content

Commit 555bf4c

Browse files
committed
Document using xpack.ml.use_auto_machine_memory_percent setting in docker getting started (#114009)
If xpack.ml.use_auto_machine_memory_percent is not explicitly set to true then the default value (false) means ML will only use 30% of the available memory making it impractical to run the ELSER model. This is useful for users wanting to get started with semantic search.The single node docker instructions have been updated with a command that gives the container enough memory to run the ELSER model and enables xpack.ml.use_auto_machine_memory_percent. For the multi-node guide the docker compose file is updated to enable the ml setting for every node in the cluster.
1 parent 79efa7f commit 555bf4c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

docs/reference/setup/install/docker.asciidoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ docker run --name es01 --net elastic -p 9200:9200 -it -m 1GB {docker-image}
8686
TIP: Use the `-m` flag to set a memory limit for the container. This removes the
8787
need to <<docker-set-heap-size,manually set the JVM size>>.
8888
+
89+
90+
{ml-cap} features such as <<semantic-search-elser, semantic search with ELSER>>
91+
require a larger container with more than 1GB of memory.
92+
If you intend to use the {ml} capabilities, then start the container with this command:
93+
+
94+
[source,sh,subs="attributes"]
95+
----
96+
docker run --name es01 --net elastic -p 9200:9200 -it -m 6GB -e "xpack.ml.use_auto_machine_memory_percent=true" {docker-image}
97+
----
8998
The command prints the `elastic` user password and an enrollment token for {kib}.
9099

91100
. Copy the generated `elastic` password and enrollment token. These credentials

docs/reference/setup/install/docker/docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ services:
9090
- xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crt
9191
- xpack.security.transport.ssl.verification_mode=certificate
9292
- xpack.license.self_generated.type=${LICENSE}
93+
- xpack.ml.use_auto_machine_memory_percent=true
9394
mem_limit: ${MEM_LIMIT}
9495
ulimits:
9596
memlock:
@@ -130,6 +131,7 @@ services:
130131
- xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crt
131132
- xpack.security.transport.ssl.verification_mode=certificate
132133
- xpack.license.self_generated.type=${LICENSE}
134+
- xpack.ml.use_auto_machine_memory_percent=true
133135
mem_limit: ${MEM_LIMIT}
134136
ulimits:
135137
memlock:
@@ -170,6 +172,7 @@ services:
170172
- xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crt
171173
- xpack.security.transport.ssl.verification_mode=certificate
172174
- xpack.license.self_generated.type=${LICENSE}
175+
- xpack.ml.use_auto_machine_memory_percent=true
173176
mem_limit: ${MEM_LIMIT}
174177
ulimits:
175178
memlock:

0 commit comments

Comments
 (0)