简体   繁体   中英

Set the heap size of java with Garbage collection enabled

I am running JVM in a ubuntu ec2 instance which runs only solr and nothing else. Now I wanna configure the Heap size of the JVM which is running. The problem is I am not using Sun Jdk I am using the following versions and settings

java version "1.7.0_25"
OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.12.04.2)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

How do I reset the heap size to my requirements.Also I want to enable the garbage collection. How can I do it. I am not running tomcat6.

Kindly Help me

This article has some useful information on tuning the heap size for a server application. As for "enabling" garbage collection, it's always turned on on a regular VM; the only ones that don't have it are for tiny embedded applications like JavaCard.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM