Fixed the subject to be more accurate.

On 10/07/2018 11:31 AM, Eirik Bakke wrote:
TL;DR: I would increase Xmx to 50% of system memory by default.

Right now NetBeans calculates it's default heap size on 20% of the system 
memory, but cap it on 1Gb.
It's worse than that--this is the _maximum_ heap size, not the default (at 
least on MacOS on Linux).

I ran on the default for years, but eventually started setting a much higher 
limit in netbeans.conf. This improved NetBeans performance greatly, and got rid 
of some very annoying errors where some NetBeans-invoked maven process would 
run out of memory.

I'd say put the maximum at 50% of system memory. The JVM won't actually use 
that much unless it needs it. And even if it uses it all, it can still be 
swapped out by the OS if other processes needs it. Swapping is probably better 
than constantly running the garbage collector to reclaim space (though Java 
performance tuning experts might chime in on this latter theory).

Photoshop, for comparison, uses up to 70% of system memory by default (a setting in 
Preferences->Performance->Memory Usage). I frequently run both Photoshop and 
NetBeans concurrently and have no issues, even though both are configured to use up 
to 70% and 50% of system memory, respectively. (This was the case both on my old 
MacBook Air with 8GB RAM and on my newer Lenovo Windows 10 machine with 16GB RAM.)

-- Eirik

-----Original Message-----
From: Laszlo Kishalmi <[email protected]>
Sent: Saturday, October 6, 2018 6:51 PM
To: [email protected]
Subject: NetBeand Default HeapSize

Hi there,

Right now NetBeans calculates it's default heap size on 20% of the system 
memory, but cap it on 1Gb.

Is it usually enough? Most of my machines have 16Gb ram and one of the first 
things I do is to set the heap limit to 2Gb or more. I thing the
20 % is good, but we might move the cap to 2,3 or 4 Gb, so we do not need to 
meddle with netbeans.conf.

What's your Opinion?




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to