views:

233

answers:

1

I was wondering if anyone had any performance options that might work for me. I am using Netbeans 6.1 and Glassfish V2 on my work laptop and the memory requirements are getting a little tiresome. I have 3 gb of ram and I frequently have to kill everything and restart it due to PermGen Space errors.

I've played with the mem sizes as well but nothing seems to really help.

A: 

Is there a way for you to monitor glassfish through JConsole? JConsole will show you how much PermGen space (as well as other spaces) is being used. Using this information can help you tweak your startup parameters.

This page http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp lists a few and I know I've seen more, esp. when it comes to setting permgen sizes.

You might also want to look at how your webapp(s) are allocating things that go into permgen space. Maybe the problem is there rather than in NB/GF combo.

Finally, is it possible for you to upgrade to NB 6.7? I know it's difficult to change your app server for development, esp. if you deploy to that version of the app server in production (I've experience problems there too). But changing the IDE could help too.

I know this is not an "answer", but I hope it helps.

Andy Gherna
I know it's poor taste to comment on my own post, but some meta information on where I'm coming from. My development machine has 4GB of RAM. I can leave Tomcat/NB running most of the day and I've occasionally had to restart both due to memory problems. As it turned out, the problems were with my web application not shutting down properly. When I fixed that problem, everything was running smooth as silk again.
Andy Gherna
We are using the Netbeans 6.1 Glassfish ESB package, and I have had problems upgrading just the IDE. I tried it once and spent the next day trying to work out package differences. In the end I just went back to 6.1. I have not tried JConsole but will look into it. I am not sure about the WebApp. It is rather large and contains a lot of XML configuration files, but I apparently need to look into how things are allocated in PermGen, because I can't answer that question.The laptop I am using has 3gb of ram, and the problem only occurs on repeated deployments, for instance during debugging.
Casey
Depending on the JDK you run, you could do some profiling. See here: http://java.sun.com/javase/6/webnotes/trouble/other/matrix6-Unix.html
Andy Gherna

related questions