Estimate file system space for Elasticsearch to avoid low disk watermark

Hello,

We are running Sonaqube 8.3.1.

We are experiencing error due to low space on disk for the search engine elastic base :

2020.08.06 11:13:32 INFO es[o.e.c.r.a.DiskThresholdMonitor] low disk watermark [85%] exceeded on [zKwFyDNtT4GiOkoHjmtnrQ][sonarqube][/opt/sonarqube-8.3.1/data/es6/nodes/0] free: 223.8mb[10.9%], replicas will not be assigned to this node

We are going to change our filesystem management to avoid this problem. How can we estimate the size needed for the elastic base ?

As this action is not going to be fast, is there a way to recover quickly some space by clearing some data in base (old ones for example) in order to allow our users not to be blocked ?

Thanks.

Hi Loic,

You can use the values in Administration > System to help estimate the disk storage needed for the Elasticsearch index…

  • Search Engine > Store Size will give you a sense of what you are currently using.
  • Search Engine > Index issues - Store Size will give you a sense of the current size of the issues index, which is the one that will grow as you add more code to SonarQube. You can compare this to the number of lines of code currently in the system to the number of lines you expect to get an idea of how much more space you will need.

On top of that, you should add 512MB-1GB for growth.

Additionally, increase sonar.search.javaOpts in conf/sonar.properties to make sure the entire index will fit in memory (this will maximize performance). -Xms and -Xmx should be set to the same value to avoid heap resizes.

And finally, don’t forget to monitor your instance!

Cheers

Brian

Hi @bcipollone,

Thanks for this great answer :+1:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.