NetBeans4.0B2 GC revisited: lots of fun

So I have been playing around with NetBeans 4.0B2. Quite impressive, effective, fast, right-to-the point IDE. I am just missing a VI key binding ;-)

I wanted to share with everybody my findings just in case you want to consider using them.

Garbage Collection Tuning

I didn't like the default [NETBEANS]/etc/netbeans.conf so I commented out the line starting with "netbeans_default_options" and I used another one:

netbeans_default_options = -J-XX:MaxGCPauseMillis=100 
  -J-XX:GCTimeRatio=99 -J-Xms48m -J-XX:PermSize=32m 
	-J-Dcom.sun.management.jmxremote

(Note that this is just a single line).

Garbage Collection Ergonomics: comfortable ;-)

The MaxGCPauseMillis and GCTimeRatio are new in JDK5.0. This is known as Garbage Collection Ergonomics and is used to avoid having to tune the GC yourself.

Quite comfortable. The fact is that I am surprised it does a very good job at tuning the GC. Little human intervention needed ;-)

PermSize

NetBeans 4.0B2 uses quite a bit of memory for class information. This memory is stored in the "Permanent Generation" space, so I just gave it around 32m. This avoids lots of full generations (specially at startup) and gives NetBeans some more life.

Management: Cooool

Now this is cool. If I set the "-Dcom.sun.management.jmxremote" on the command line I can monitor the JVM using the "jconsole" tool. I just write "jconsole" and the full thing starts playing.

Of course this is a time consunming thing: having to monitor the JVM all the time, but it is interesting because I can see how memory consumption evolves and what each thread is doing. Looking at this I've found that NetBeans guys are smart enough to use BlockingQueues for inter-threading communication. That's a best practice I'll be talking around soon, that avoids for instance having to use all those SwingWorkers all the time. Keep tuned for that. Have fun meanwhile.

Comentarios:

Enviar un comentario:
Los comentarios han sido deshabilitados.
About

swinger

Search

Archives
« abril 2014
lunmarmiéjueviesábdom
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Hoy