Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 34

Thread: How to change memory and other JVM settings for STS

  1. #11
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default

    Quote Originally Posted by Martin Lippert View Post
    Hey!
    I don't know the exact details about how to calculate the exact maximum possible memory settings for a JVM, but according to this:
    http://www.oracle.com/technetwork/ja...#gc_heap_32bit
    it seems at least reasonable to get something between 1.4GB and 1.6GB when running a 32bit JVM.
    HTH,
    Martin
    I also found an interesting discussion at stackoverflow: Maximum Java heap size of a 32-bit JVM on a 64-bit OS which makes some comparisons to 32bit on 64bit systems. It's just too bad Apple never made a 64bit JVM for the G5.

    Anyway, it seems that on 32bit Mac OS X the maximum heap space is about 1590 MiB, making my 1516m as close as I can wish. However, for some reason certain lower values won't instantiate STS.

    Is "1516m" about 1516 MiB or is it something else in this context?

    I also checked the used resources of STS in Activity Monitor which states that about 588 MB is in use with about 2.5GB of virtual memory (150MB private virtual memory).

    Anyone can suggest the best source for practical JVM knowledge?
    Last edited by MiB; Dec 5th, 2011 at 10:48 AM.

  2. #12
    Join Date
    Jul 2010
    Posts
    28

    Default

    What about my 4G memory on win7 64bit os
    Quote Originally Posted by Martin Lippert View Post
    Here is what I am using quite successfully on my 8GB OSX machine:

    Code:
    -vmargs
    -Dosgi.requiredJavaVersion=1.5
    -Xmn128m
    -Xss1m
    -XX:+AggressiveOpts
    -XX:+UseConcMarkSweepGC
    -XX:PermSize=64M
    -XX:MaxPermSize=712M
    -XX:+HeapDumpOnOutOfMemoryError
    -XX:CompileThreshold=200
    -XX:+UseCompressedOops
    -Xverify:none
    -XX:+UseBiasedLocking
    -XX:+UseFastAccessorMethods
    -Xms768m 
    -Xmx1280m
    -XstartOnFirstThread
    -Dorg.eclipse.swt.internal.carbon.smallFonts

  3. #13
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,637

    Default

    Hi!

    If you run a 64bit JDK and a 64bit STS, you can use an even higher max heap limit, if you want (-Xmx2048m, for example), but I would take care of not using too high settings for the max heap to avoid virtual memory swapping on your machine (slows down everything).

    HTH,
    Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

  4. #14
    Join Date
    Jul 2010
    Posts
    28

    Default

    thanks Martin,I user 64bit jdk and 64bit STS On my 64bit win7,I just set 256m ,but my laptop become very slowly ,so i want to get some optimization here

  5. #15
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,637

    Default

    You can enable the heap monitor in STS to see what the current heap size is that STS is using (Preferences -> General), but I would recommend to use something around 1024m as -Xmx in your case.

    HTH,
    Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

  6. #16
    Join Date
    Jul 2010
    Posts
    28

    Default

    -XX:+UseParallelGC
    -server
    Above parameters can affect the tomcat or other jsp container speed?
    I am not familiar with above parameters

  7. #17
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,637

    Default

    Hi!

    Just as a side note: If you set JVM settings in sts.ini, they are not affecting your Tomcat or tc Server. Those settings (and this thread) are for the JVM that run your IDE (Eclipse/STS).

    And I have no personal data to share what the best settings for tc Server or Tomcat are. You should ask those questions in the Tomcat and/or tc Server forums. I guess there are a lot more people more familiar with settings for Tomcat and tc Server.

    Regarding STS: I would not use -server (this switches the internal JVM incremental compiler technology to the server-side variant, giving you better performance when you have long-running processes), but if you have multiple cores, I would use -XX:+UseParallelGC (which improves garbage collection speed due to parallel execution within the GC)

    HTH,
    Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

  8. #18
    Join Date
    Jul 2010
    Posts
    28

    Default

    thanks,Martin, I'll try some new resolution for my case,and then share my experience here.

  9. #19
    Join Date
    Jul 2010
    Posts
    28

    Default

    Sorry,I spent two days on transforming my myeclipse projects to STS,but failure,I google and google again,I give up STS.

  10. #20
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,637

    Default

    Hey!

    Can you let us know what exactly the problem is?

    Cheers,
    -Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •