OPNsense Forum

English Forums => Zenarmor (Sensei) => Topic started by: ArminF on September 22, 2020, 05:40:33 pm

Title: (SOLVED) 4GB+ heap Size for Elasticsearch
Post by: ArminF on September 22, 2020, 05:40:33 pm
Hello,
would extending the heap size help sensei to run smoother?
From another product this helped me a lot.

And if yes can you tell me where to set this on opnsense?
jvm.option - but here i found several.

thanks
armin
Title: Re: 4GB+ heap Size for Elasticsearch
Post by: mb on September 22, 2020, 05:46:45 pm
Hi @Armin,

Yes, that should help. Can you try /usr/local/etc/elasticsearch/jvm.options file?
Title: Re: 4GB+ heap Size for Elasticsearch
Post by: ArminF on September 22, 2020, 06:03:17 pm
Hello,
thank you for your swift answer!

i did change the file and restarted elasticsearch through the web gui

Sensei is set to Small II (50 Devices)

root@opnsense:~ # top | grep java
PID USERNAME    THR PRI NICE   SIZE    RES STATE    C   TIME    WCPU COMMAND
54544 elasticsea   77  52    0  4058M  2339M uwait    5   0:31   0.20% java

How much would be the max here or would a bigger value make sense at all?


Title: Re: 4GB+ heap Size for Elasticsearch
Post by: mb on September 22, 2020, 06:16:48 pm
Hi @armin, my pleasure.

For 50 devices, I think that's ok. Elastic will claim more memory only if it needs to.

For a side note, for Elastisearch, cpu performance is also important. This is because of the inverted indexes which are mainly used for aggregations. These are cpu intensive.

Below is a good tutorial on this:

https://medium.com/@abhidrona/elasticsearch-deployment-best-practices-d6c1323b25d7
Title: Re: 4GB+ heap Size for Elasticsearch
Post by: ArminF on September 22, 2020, 07:01:24 pm
Thanks again!

Funny thing is that medium was blocked by Sensei as i disabled it on the app blocker :-S
I will check your article but for my home environment i think i will have enough CPU power. intel i7 4 Cores HT
Just wanted to waste some of 32 GB RAM :)
Title: Re: 4GB+ heap Size for Elasticsearch
Post by: mb on September 23, 2020, 12:43:59 am
:) Got it. All welcome.