ElasticSearch: Difference between revisions

789 bytes added ,  01:54, 26 November 2023
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 16: Line 16:
idk if we should put this part online but there is some config here too
idk if we should put this part online but there is some config here too
</pre>
</pre>
=== Service ===
Use the default service, except we also make it restart when it dies:
<code>/lib/systemd/system/elasticsearch.service</code>
<syntaxhighlight lang="ini">
[Service]
# Other stuff....
ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet
Restart=always
RestartSec=30
# ...
</syntaxhighlight>


=== Memory ===
=== Memory ===


[https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html the ES docs] say to allocate half your available memory to the heap. At the moment (23-10-26) we are using 2.5G/8G memory at rest. Going to try allocating 3GB and see what happens
[https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html the ES docs] say to allocate half your available memory to the heap. At the moment (23-10-26) we are using 2.5G/8G memory at rest. Going to try allocating 2GB and see what happens
 
'''Notes:'''
* Keep getting OOM, so changing 3GB to 2GB. Search performance seems fine, indexing jobs finish, etc. This will probably be fine for now unless we have some huge spike in users/searchers - jonny, 23-11-25
 


<code>/etc/elasticsearch/jvm.options.d/heap.options</code>
<code>/etc/elasticsearch/jvm.options.d/heap.options</code>
<pre>
<pre>
-Xms3g
-Xms2g
-Xmx3g
-Xmx2g
</pre>
</pre>


== Creds havers ==


 
* [[Jonny]]
 
* [[Lina]]


== References ==
== References ==
Line 47: Line 67:
* [[Search]]
* [[Search]]


== Discord ==
 
== History ==
 
=== Threads ===
 
* Initial enabling with [[Jonny]] and [[Lina]] - https://discord.com/channels/1049136631065628772/1052452072806686751/1167287930742652958
 
=== Discord ===


{{Message
{{Message