You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Thomas Wolf <tj...@gmail.com> on 2022/12/05 20:20:51 UTC
Why is max heap under NB different than outside it?
I was running my J2SE application inside of NB and with a large data set ran out of heap space. I don’t specify a -Xmx arg for my app and I was curious why with 32GB of physical memory that should happen. I ran the application again and, from the command-line, did
jinfo -flag MaxHeapSize xxx (xxx is my app’s process id)
to see how much heap the JVM decided to allocate. It returned
-XX:MaxHeapSize=4294967296
Weird - that’s 1/8th of my physical memory. If memory served, Java was supposed to use up to 1/4th physical memory for max heap size. So I ran the application again - this time straight from the command-line rather than from inside NB. And outside of NB, jinfo reported the expected 8GB of heap:
-XX:MaxHeapSize=8589934592
Does anyone know why that is?
Although I doubt it matters, I’m running on macOS 13.1, NB 13, with NB and my app both using JDK/JRE 17.
thanks,
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Why is max heap under NB different than outside it?
Posted by Thomas Wolf <tj...@gmail.com>.
Never mind - the stupid bug struck hard (long time ago I must’ve set the 4GB as a VM option in the configuration I was using).
Sorry about the noise.
tom
> On Dec 5, 2022, at 3:20 PM, Thomas Wolf <tj...@gmail.com> wrote:
>
>
> I was running my J2SE application inside of NB and with a large data set ran out of heap space. I don’t specify a -Xmx arg for my app and I was curious why with 32GB of physical memory that should happen. I ran the application again and, from the command-line, did
> jinfo -flag MaxHeapSize xxx (xxx is my app’s process id)
> to see how much heap the JVM decided to allocate. It returned
> -XX:MaxHeapSize=4294967296
> Weird - that’s 1/8th of my physical memory. If memory served, Java was supposed to use up to 1/4th physical memory for max heap size. So I ran the application again - this time straight from the command-line rather than from inside NB. And outside of NB, jinfo reported the expected 8GB of heap:
> -XX:MaxHeapSize=8589934592
>
> Does anyone know why that is?
>
> Although I doubt it matters, I’m running on macOS 13.1, NB 13, with NB and my app both using JDK/JRE 17.
>
> thanks,
> Tom
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists