Our team encountered very bad performance of GoodData.CN in docker container.
Here is our setup:
$ cat docker-compose.yml
In htop output, I can see the following:
So the CPU is not overloaded and there is a lot of memory available. May be there is a way to fine-tune the software so that it could use more resources and run faster? For example, I can see that many java processes are limited to use 256m memory only.
Best regards, Nick.
Best answer by Robert Moucha
it is possible to use the JAVA_OPTS environment variable to tune JVM settings, e.g. heap memory using -Xmx parameter.
The default value (256MiB) is set intentionally low to consume fewer resources on users’ laptops.
Keep in mind that this variable is currently used for multiple components of GoodData CN CE so changing this setting will affect all Java applications running within the container. We plan to address this limitation in future versions of the image.
There are 6 services affected by JAVA_OPTS, so if you have 16GiB RAM in your server, you could safely allocate up to 2GiB JVM heap to every service (provided no other services are running aside from the GoodData CN container). Don’t forget to preserve the other JVM settings:
-e JAVA_OPTS=-Xmx1g -Xms128m -XX:+UseStringDeduplication -XX:+ExplicitGCInvokesConcurrent -XX:+ParallelRefProcEnabled
Performance tuning of any application is a complex task and there’s no “one size fits all” setting that could be recommended to all users. It highly depends on multiple factors, like data source DB size, logical model complexity, number of concurrent users, and so on.
However, we’d like to hear if you face a specific performance issue.