I need to see how my application react if I limit it to use a specific amount of memory and CPU. I am wondering how can I limit the resources for my application that is running on Tomcat and Eclipse?
I know I can use following parameters but not sure how to limit, Perm, Heap and overall Memory, and specifically CPU
-Xms1024m
Set the minimum available memory for the JVM to 1024 Megabyte
-Xmx1800m
Set the maximum available memory for the JVM to 1800 Megabyte. The Java application cannot use more heap memory then defined via this parameter.