(In 2.3.2.1, Update 9, and 3.0.0 Beta 2, the memory requirements are significantly reduced (and performance is greatly improved) for collections. All but the very largest environments should work fine with the default settings.)
Earlier I gave the wrong location for the file where Usage Meter’s heap size is set. It is really here:
/etc/init.d/tomcat
export JAVA_OPTS='-Xms512m -Xmx1536m -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256m'
First stop Tomcat:
service tomcat stop
top -u usgmtr
Kill any processes showing, with “k”
q to quit
Change the 1536 to something larger, perhaps 4096 or more for very large environments. You may need to increase the Usage Meter Virtual Machine’s RAM too, to avoid excessive paging, and running out of swap space.
Something else you can do for out of memory errors, if you have multiple vCenter Servers, is turn off parallel collections.
- Edit /usr/local/apache-tomcat-7.0.14/WEB-INF/webapps/um/web.xml
- Change the 5 to a 1:
<context-param> <param-name>maxConcurrentCollections</param-name> <param-value>5</param-value> </context-param>
Start Tomcat:
service tomcat start