Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month, online, via Jitsi Meet.

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] Some Java questions



Hi Jerry,

JVM performance is a large topic for discussion.

To begin with I'd recommend to read VMWare Best practices paper on how to
run Java within virtual machines:
http://www.vmware.com/files/pdf/techpaper/Enterprise-Java-Applications-on-VMware-Best-Practices-Guide.pdf

Based on my experience with running Java within virtual machines there are
few basic rules


1) Memory allocation within VMs is expensive therefore:

-  In VSphere set VM memory reservation.
-  set  java heap min memory = java heap max memory      -Xmx = -Xms
-  set permament size = max permament size   - XX:PermSize =
-XX:MaxPermSize
      As a rule of tumb I typically set PermSize to 30% of the Java heap
size, but it depends on your app

2) use concurrent mark sweep garbrage collector  -XX:+UseConcMarkSweepGC
(Note: this parameter depends on you app. pattern, but it
was usually helpful for me)

3) I'd not recommend to allocate large java heaps (generally > 4GB) for Sun
(Oracle) JVMs
    I saw increased GC pauses with larger heaps.

    It is better to scale-out by adding few more JVMs rather than than
scale-up by increasing JVM heap

4) Definitely get more familiar with the apps which run on JVM and use cool
Visual monitoring tools for your JVM like VisualGC

Best,
Eugene.



On Thu, Oct 25, 2012 at 9:35 AM, Jerry Feldman <gaf.linux at gmail.com> wrote:

> We have an important client-related Java issue. We are trying to reproduce
> a client's problem, but they are using a very large host (96GB/8CPU) and we
> just were able to upgrade a VM to 4CPUs and 64GB for this project. I would
> like to know if there are any good run-time tuning parameters that my
> coworker can set to use more of the memory. (We are using Java SE
> 1.6.0_14-b08). We are using the released version of our Java code. In this
> case, the issue for the customer is not performance, but we need better
> performance to give us some time to reproduce the problem. Currently
> through vSphere I see the VM only using about 12GB. I want the JVM to be
> able to use as much memory as it needs for the heap.
>
> --
> --
> Jerry Feldman <gaf.linux at gmail.com>
> Boston Linux and Unix
> PGP key id:3BC1EB90
> Key fingerprint: 49E2 C52A FC5A A31F 8D66 C0AF 7CEA 30FC 3BC1 EB90
> _______________________________________________
> Discuss mailing list
> Discuss at blu.org
> http://lists.blu.org/mailman/listinfo/discuss
>



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org