In this recipe, you will learn how to configure Marathon to improve its performance.
Before you begin, you should capture Marathon metrics to see whether presented actions give the desired effect.
Marathon has many configuration options that could change its performance. It's written in Scala so it runs on JVM, which has even more options.
Most of the default settings are good enough even for big installations. However, there is a small set that should be changed.
You can gain better performance by changing Marathon's JVM options, especially to give it more memory and change the Garbage Collection algorithm. Tuning JVM is out of the scope of this book, so we will show only the basic methods. The following code will set Marathon to use 2 GB of memory and change the Garbage Collector to G1:
echo 'JAVA_OPTS=" -mx2g -ms2g -XX:+UseG1GC -XX:MetaspaceSize=100M"' >> /etc/default/marathon
The next thing that has an impact on performance is how many tasks...