Appendix A. JVM tuning
This appendix discusses ways to increase the performance of nondistributed Mahout-based applications by tuning the settings of the JVM. It’s not a guide to tuning Hadoop, which is a large topic in its own right. This tuning is relevant to nondistributed aspects of Mahout, which are almost entirely the recommender engine implementations. While the settings here are likely beneficial to any Java-based server process, the advice is specifically directed to those running nondistributed Mahout-based recommender engines.
When using a data set of substantial size—perhaps ten million preferences and up—it’ll be well worth tuning the JVM settings for performance. It’s mostly the heap-related (memory-related) settings that are important. Optimal settings depend on the operating system, available resources, architecture, and JVM, but the following JVM flag settings will establish a good starting point.
The flags listed in table A.1 are valid on all known Java 6 JVMs, which Mahout requires, with the exception of -XX:NewRatio, as explained in the table.