This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 46935 - Adjust initial memory settings for NetBeans 4.0
Summary: Adjust initial memory settings for NetBeans 4.0
Status: RESOLVED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: _ rkubacki
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2004-08-05 13:12 UTC by _ rkubacki
Modified: 2004-11-23 17:05 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2004-08-05 13:12:46 UTC
Our current setting is -Xms24m -Xmx160 and no perm
size with a hope to decrease mx to 128m. It means
that during the start with two small projects and
3 files opened in editor there are 3 full GC
taking and perm area is resized to 18176kB. Total
time spent in GC is >2.5s, most of it is in FCG
(1.3s).

- When I set only perm size (-J-Xms24m -J-Xmx160m
-J-XX:PermSize=32m) it eliminates two FCG cycles
so IDE spents 1.6-1.7s in GC (0.4-0.5 in one FGC).

- When I increase heap size (-J-Xms36m -J-Xmx160m)
it eliminates one FCG cycles so IDE spents ~1.9s
in GC (0.8-0.9 in one FGC).

- With -J-Xms36m -J-Xmx160m -J-XX:PermSize=24m I
see no FGC and 1-1.1s in GC.

- More agresive -J-Xms40m -J-Xmx160m
-J-XX:PermSize=32m gives again 0 FGC but time
spent in GC is a bit higher 1.2-1.3s. I guess that
this is because each GC is more expensive on
larger heap.

So every full GC takes roughly 0.4s and we have
two caused by perm area resizing and one because
ms24m is not sufficient now. IMO we should
increase -Xms. We've rejected -XX:PermSize in the
past as there can be problems on different JVMs
than from Sun (I shared this opinion). But
according to
http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/invocation.html#invocation_api_functions
we can ask JVM to ignore unrecognized options in
our Windows launcher. Apple's JVM runs with this
option (at least on Milos' machine, don't know if
it has any effect). IBM VM and JRockit will refuse
to start on Linux. Blackdown accepts the option.

All the measurements are from my dell laptop, dev
build from Aug 3, JDK1.5.0b61, linux fedora core 2.
Comment 1 _ rkubacki 2004-08-05 13:16:48 UTC
Either we can add -XX:PermSize into netbeans.conf or put it into
windows launcher only.
Comment 2 Antonin Nebuzelsky 2004-08-05 14:40:54 UTC
I measured the effect of this tuning on complex startup.

* Dell Precision 220, PIII 800MHz, 512MB RAM
* W2K, jdk 1.4.2_04
* trunk build 200408041800
* jEdit project open and 5 java files open in editor

1) -J-Xms24m -J-Xmx128m -J-Xverify:none

     23.7s, 23.7s, 23.5s

2) -J-Xms36m -J-Xmx128m -J-XX:PermSize=24m -J-Xverify:none

     21.5s, 21.5s, 21.3s
Comment 3 Antonin Nebuzelsky 2004-08-05 14:44:27 UTC
So, I vote for it...
Comment 4 Antonin Nebuzelsky 2004-09-13 10:00:45 UTC
> We've rejected -XX:PermSize in the past as there can be problems
> on different JVMs than from Sun (I shared this opinion). But
> according to ... we can ask JVM to ignore unrecognized options in
> our Windows launcher.

Not doable for Beta 2 I guess. Only increasing Xms for beta 2 (see
issue 48918).

But for FCS can we push it to the windows launcher?
Comment 5 _ rkubacki 2004-09-15 12:28:05 UTC
-Xms32m is commited to trunk (not beta2)

Another possibility is to use adaptive sizing of heap with
-XX:+UseAdaptiveSizePolicy (optionaly with -XX:MaxGCPauseMillis=nnn
and -XX:GCTimeRatio=nnn)
Comment 6 Antonin Nebuzelsky 2004-09-15 13:36:35 UTC
> -Xms32m is commited to trunk (not beta2)

In Beta 2 as well (see issue 48918)
Comment 7 _ rkubacki 2004-11-23 17:05:39 UTC
Adjusted to -Xms32m -Xmx128m

Neither permsize nor the ergonomics are user.