Announcement Announcement Module
No announcement yet.
How can I make grails.bat not use 1 Gig of memory Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • How can I make grails.bat not use 1 Gig of memory

    I'm working on several boxs with Grails. Most are beefy development machines but one only has 2Gig of memory.
    It's WinXP so most things work fine on it but it really wasn't meant for development.

    I notice this memory usage
    (1) WinXP Startup (600-800Meg used)
    (2) start STS (Springsource Tool Suite 2.9.1) (total mem goes to 1.41GB used)
    (3) start grails.bat (cmd line) (total mem goes to 2.43GB used)

    Since this one machine only has 2 Gig the OS starts swapping and STS starts to slow down, so I exit grails.bat to fix it.

    I looked at grails.bat which calls startGrails.bat which checks to see if GRAILS_OPT is set and if it is it uses it, if it's not it uses:
    set GRAILS_OPTS=-server -Xmx768M -Xms768M -XX:PermSize=256m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8

    I found through some experimenting that by removing the -Xmx768M and -Xms768M options it spikes temporarily but comes back down so my total memory use is 1.8G (which is a lot better than 2.4G).

    (Q) Is there another way to do this that will work better?

    (Q) If I'm using STS does it take less memory if I just run grails command line from within STS?