0

Suppose there 3 apps deployed on one jvm A,B and C. Can I assign 5 Gb to app A alone ? In our case we are using WebLogic application server on Linux.

trincot
  • 317,000
  • 35
  • 244
  • 286
Srivi
  • 211
  • 1
  • 4
  • 11
  • what kind of your application web application or desktop app? if a web app what server you are using? If your application run in a Server, mean a web application you can set this configuration in your Server – Youcef LAIDANI Feb 08 '17 at 19:00
  • 1
    1. what kind of applications? In servlet container, JEE? 2. Read about docker. Not so simple, but with strong resources control – Jacek Cz Feb 08 '17 at 19:01
  • Possible duplicate of [Why have one JVM per application?](http://stackoverflow.com/questions/13539132/why-have-one-jvm-per-application) – Keith Feb 08 '17 at 19:03
  • We are using WebLogic App Server – Srivi Feb 08 '17 at 19:59
  • No. There is only one heap in a JVM. – user207421 Feb 08 '17 at 21:36

1 Answers1

0

I think you're stuck, unless you try some dark voodoo that gets into the JVM internals. I wouldn't suggest going down that path unless you absolutely, positively must.

In any event, here's what WebLogic provides in terms of heap space (warning: it's generally the same fundamental concepts as CLI launched apps)

https://blogs.oracle.com/imc/entry/weblogic_server_performance_and_tuning

Each WebLogic Server instance runs in its own dedicated Java Virtual Machine (JVM) which is their runtime environment. Every Admin Server in any domain executes within a JVM. The same also applies for Managed Servers. WebLogic Server can be used for a wide variety of applications and services which uses the same runtime environment and resources. Oracle WebLogic ships with 2 different JVM, HotSpot and JRocket but you can choose which JVM you want to use.

JVM is designed to optimize itself however it also provides some startup options to make small changes. There are default values for its memory and garbage collection. In real world, you will not want to stick with the default values provided by the JVM rather want to customize these values based on your applications which can produce large gains in performance by making small changes with the JVM parameters. We can tell the garbage collector how to delete garbage and we can also tell JVM how much space to allocate for each generation (of java Objects) or for heap. Remember during the garbage collection no other process is executed within the JVM or runtime, which is called STOP THE WORLD which can affect the overall throughput.

Each JVM has its own memory segment called Heap Memory which is the storage for java Objects. These objects can be grouped based on their age like young generation (recently created objects) or old generation (surviving objects that have lived to some extent), etc. A java object is considered garbage when it can no longer be reached from anywhere in the running program. Each generation has its own memory segment within the heap. When this segment gets full, garbage collector deletes all the objects that are marked as garbage to create space. When the old generation space gets full, the JVM performs a major collection to remove the unused objects and reclaim their space. A major garbage collect takes a significant amount of time and can affect system performance.

It then goes on to describe the specific parameters to toggle for heap space.

Keith
  • 3,079
  • 2
  • 17
  • 26