Skip to content

Commit a7ba1f4

Browse files
authored
πŸ› Optimize Elasticsearch Startup Parameters and Monitoring Parameters
2 parents efcaff0 + f3741ac commit a7ba1f4

File tree

3 files changed

+25
-8
lines changed

3 files changed

+25
-8
lines changed

β€Ždocker/.env.exampleβ€Ž

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ NLTK_DATA=/opt/models/nltk_data
2626
ELASTICSEARCH_HOST=http://nexent-elasticsearch:9200
2727
ELASTIC_PASSWORD=nexent@2025
2828

29+
# Elasticsearch Memory Configuration
30+
ES_JAVA_OPTS="-Xms1g -Xmx1g"
31+
32+
# Elasticsearch Disk Watermark Configuration
33+
ES_DISK_WATERMARK_LOW=85%
34+
ES_DISK_WATERMARK_HIGH=90%
35+
ES_DISK_WATERMARK_FLOOD_STAGE=95%
36+
2937
# Main Services
3038
ELASTICSEARCH_SERVICE=http://nexent:5010/api
3139
NEXENT_MCP_SERVER=http://nexent:5011
@@ -124,3 +132,12 @@ QUEUES=process_q,forward_q
124132
WORKER_NAME=
125133
WORKER_CONCURRENCY=4
126134

135+
136+
# Telemetry and Monitoring Configuration
137+
ENABLE_TELEMETRY=false
138+
SERVICE_NAME=nexent-backend
139+
JAEGER_ENDPOINT=http://localhost:14268/api/traces
140+
PROMETHEUS_PORT=8000
141+
TELEMETRY_SAMPLE_RATE=1.0
142+
LLM_SLOW_REQUEST_THRESHOLD_SECONDS=5.0
143+
LLM_SLOW_TOKEN_RATE_THRESHOLD=10.0

β€Ždocker/docker-compose.prod.ymlβ€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ services:
2323
xpack.security.http.ssl.enabled: "false"
2424
xpack.security.transport.ssl.enabled: "false"
2525
# JVM memory settings
26-
ES_JAVA_OPTS: -Xms1g -Xmx1g
26+
ES_JAVA_OPTS: ${ES_JAVA_OPTS}
2727
# Node name
2828
node.name: es01
2929
# Memory lock setting
3030
bootstrap.memory_lock: "false"
3131
# Disk watermark settings
32-
cluster.routing.allocation.disk.watermark.low: "5gb"
33-
cluster.routing.allocation.disk.watermark.high: "3gb"
34-
cluster.routing.allocation.disk.watermark.flood_stage: "2gb"
32+
cluster.routing.allocation.disk.watermark.low: "${ES_DISK_WATERMARK_LOW}"
33+
cluster.routing.allocation.disk.watermark.high: "${ES_DISK_WATERMARK_HIGH}"
34+
cluster.routing.allocation.disk.watermark.flood_stage: "${ES_DISK_WATERMARK_FLOOD_STAGE}"
3535
volumes:
3636
- ${ROOT_DIR}/elasticsearch:/usr/share/elasticsearch/data
3737
networks:

β€Ždocker/docker-compose.ymlβ€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ services:
2323
xpack.security.http.ssl.enabled: "false"
2424
xpack.security.transport.ssl.enabled: "false"
2525
# JVM memory settings
26-
ES_JAVA_OPTS: -Xms1g -Xmx1g
26+
ES_JAVA_OPTS: ${ES_JAVA_OPTS}
2727
# Node name
2828
node.name: es01
2929
# Memory lock setting
3030
bootstrap.memory_lock: "false"
3131
# Disk watermark settings
32-
cluster.routing.allocation.disk.watermark.low: "5gb"
33-
cluster.routing.allocation.disk.watermark.high: "3gb"
34-
cluster.routing.allocation.disk.watermark.flood_stage: "2gb"
32+
cluster.routing.allocation.disk.watermark.low: "${ES_DISK_WATERMARK_LOW}"
33+
cluster.routing.allocation.disk.watermark.high: "${ES_DISK_WATERMARK_HIGH}"
34+
cluster.routing.allocation.disk.watermark.flood_stage: "${ES_DISK_WATERMARK_FLOOD_STAGE}"
3535
volumes:
3636
- ${ROOT_DIR}/elasticsearch:/usr/share/elasticsearch/data
3737
ports:

0 commit comments

Comments
Β (0)