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 2021/10/20 16:54:02 UTC

NB taking up 200% CPU checking for external changes :-(

I have NB 12.4, but I have noticed the same behavior on previous NBs as
well:

Most of the time, my MacBook Pro is quiet as can be.  But every now and
then (every other day?), I’d be surfing the web or reading the mail when my
fans start spinning up - often getting to their max speed *and staying
there*.  Usually, I’m not doing anything CPU intensive at all and when I
look at the Activity Monitor, it’s always Netbeans taking 100-200% of the
CPU.  And *always*, when open the Netbeans window, there at the bottom
would be a message indicating that NB is checking (or waiting? can’t
remember the exact wording) for external changes.  I assume that’s the NB
feature that checks to see if any project-related source was modified
outside the IDE?   This has got to be a bug - there’s no way something like
that should be a heavy load on a CPU.

Is there something I can do when I next observe this behavior to help track
down this bug?  I think I’ve had this happen for at least a year.  If there
isn’t - is there a way to globally turn it off?

I’m on macOS 12.0.1 (Monterey) running NB with OpenJDK 17, but as I said,
this has happened on earlier NB and earlier versions of Java.  My computer
is standalone - i.e. no corporate network, not networked file systems.
Just the laptop and a wireless connection to the Internet (via Starlink
and, before that, via Verizon LTE).

Thanks for any suggestions,
Tom

Re: NB taking up 200% CPU checking for external changes :-(

Posted by "Mark A. Flacy" <mf...@verizon.net.INVALID>.
Mr. Kishalmi had much better advice.  Do what he said instead of the below.

-- 
Mark A. Flacy
mflacy@verizon.net

On Wednesday, October 20, 2021 2:28:44 PM CDT Mark A. Flacy wrote:
> Greetings,
> 
> The next step would be to run some tool such as jconsole or jvisualvm on the
> same machine to see what is going on in your netbeans  instance.
> 
> At least you will find out what thread is creating trouble.
> 
> --
> Mark A. Flacy
> mflacy@verizon.net
> 
> On Wednesday, October 20, 2021 1:57:03 PM CDT Thomas Wolf wrote:
> >  Hi Mark,
> > 
> > I think this CPU abuse happens independent of project size or resources. 
> > I
> > already had modified my netbeans.conf to give it plenty of heap (2-4gb),
> > but I’m not even running anything  ‘large’ - when this happens, there are
> > always only two projects open in the IDE - one is a library project with
> > just a couple dozen java files and a J2SE project with less than 100
> > source
> > files.  Downright puny!  A few years back I was working on a  project with
> > 5000 java files and NB never even broke a sweat.  This bug with external
> > changes causing NB a tizzy has been around for awhile.  I think there was
> > a
> > way to turn external checking off, but I can’t seem to find it right now.
> > Plus the disadvantage would be that when I do occasionally externally
> > inject changes (eg copying an image file into the project source tree), NB
> > might not react appropriately. :-(
> > 
> > Anyway, any further suggestions, let me know.  Much appreciated.
> > 
> > Tom
> > 
> > p.s. has anyone noticed that macOS Monterey now no longer has an
> > “Anywhere”
> > option in System Settings->Security & Privacy->General->Allow apps
> > downloaded from ??? Annoying as hell.  It’s already refused to run half a
> > dozen things I downloaded and wanted to run - have to manually give an
> > exception :-(  Does anyone know of a way to turn this off?  I haven’t
> > tried
> > downloading a new version of NB lately, but macOS won’t run that either, I
> > don’t think, without manual exception.
> > 
> > 
> > 
> > On Oct 20, 2021 at 1:18:58 PM, Mark A. Flacy <mf...@verizon.net.invalid>
> > 
> > wrote:
> > > Greetings,
> > > 
> > > How many projects are in your projects panel?
> > > 
> > > If you haven't modified (God, I hate this)
> > > "/Applications/NetBeans/Apache\
> > > NetBeans\
> > > 12.4.app/Contents/Resources/NetBeans/netbeans/etc/netbeans.conf"
> > > to allow a larger heap than the paltry default, you may be observing the
> > > JVM performing the garbage collection of death dance which you'll see in
> > > any java application that is operating at the edge of getting an OOM
> > > error.
> > > 
> > > 
> > > 
> > > I have a MacBook Pro for work (32GB RAM) and I have changed the
> > > *netbeans_default_options* in the above file to have the additional flag
> > > of "-J-Xmx16384m" as well as setting *netbeans_jdkhome* to point to
> > > something sane.
> > > 
> > > HTH.
> > > 
> > > 
> > > --
> > > 
> > > Mark A. Flacy
> > > 
> > > mflacy@verizon.net
> > > 
> > > On Wednesday, October 20, 2021 11:54:02 AM CDT Thomas Wolf wrote:
> > > > I have NB 12.4, but I have noticed the same behavior on previous NBs
> > > > as
> > > > 
> > > > well:
> > > > 
> > > > 
> > > > 
> > > > Most of the time, my MacBook Pro is quiet as can be.  But every now
> > > > and
> > > > 
> > > > then (every other day?), I’d be surfing the web or reading the mail
> > > > when
> > > 
> > > my
> > > 
> > > > fans start spinning up - often getting to their max speed *and staying
> > > > 
> > > > there*.  Usually, I’m not doing anything CPU intensive at all and when
> > > > I
> > > > 
> > > > look at the Activity Monitor, it’s always Netbeans taking 100-200% of
> > > > the
> > > > 
> > > > CPU.  And *always*, when open the Netbeans window, there at the bottom
> > > > 
> > > > would be a message indicating that NB is checking (or waiting? can’t
> > > > 
> > > > remember the exact wording) for external changes.  I assume that’s the
> > > > NB
> > > > 
> > > > feature that checks to see if any project-related source was modified
> > > > 
> > > > outside the IDE?   This has got to be a bug - there’s no way something
> > > 
> > > like
> > > 
> > > > that should be a heavy load on a CPU.
> > > > 
> > > > 
> > > > 
> > > > Is there something I can do when I next observe this behavior to help
> > > 
> > > track
> > > 
> > > > down this bug?  I think I’ve had this happen for at least a year.  If
> > > 
> > > there
> > > 
> > > > isn’t - is there a way to globally turn it off?
> > > > 
> > > > 
> > > > 
> > > > I’m on macOS 12.0.1 (Monterey) running NB with OpenJDK 17, but as I
> > > > said,
> > > > 
> > > > this has happened on earlier NB and earlier versions of Java.  My
> > > 
> > > computer
> > > 
> > > > is standalone - i.e. no corporate network, not networked file systems.
> > > > 
> > > > Just the laptop and a wireless connection to the Internet (via
> > > > Starlink
> > > > 
> > > > and, before that, via Verizon LTE).
> > > > 
> > > > 
> > > > 
> > > > Thanks for any suggestions,
> > > > 
> > > > 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





---------------------------------------------------------------------
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: NB taking up 200% CPU checking for external changes :-(

Posted by "Mark A. Flacy" <mf...@verizon.net.INVALID>.
Greetings,

The next step would be to run some tool such as jconsole or jvisualvm on the 
same machine to see what is going on in your netbeans  instance.

At least you will find out what thread is creating trouble. 

-- 
Mark A. Flacy
mflacy@verizon.net

On Wednesday, October 20, 2021 1:57:03 PM CDT Thomas Wolf wrote:
>  Hi Mark,
> I think this CPU abuse happens independent of project size or resources.  I
> already had modified my netbeans.conf to give it plenty of heap (2-4gb),
> but I’m not even running anything  ‘large’ - when this happens, there are
> always only two projects open in the IDE - one is a library project with
> just a couple dozen java files and a J2SE project with less than 100 source
> files.  Downright puny!  A few years back I was working on a  project with
> 5000 java files and NB never even broke a sweat.  This bug with external
> changes causing NB a tizzy has been around for awhile.  I think there was a
> way to turn external checking off, but I can’t seem to find it right now.
> Plus the disadvantage would be that when I do occasionally externally
> inject changes (eg copying an image file into the project source tree), NB
> might not react appropriately. :-(
> 
> Anyway, any further suggestions, let me know.  Much appreciated.
> 
> Tom
> 
> p.s. has anyone noticed that macOS Monterey now no longer has an “Anywhere”
> option in System Settings->Security & Privacy->General->Allow apps
> downloaded from ??? Annoying as hell.  It’s already refused to run half a
> dozen things I downloaded and wanted to run - have to manually give an
> exception :-(  Does anyone know of a way to turn this off?  I haven’t tried
> downloading a new version of NB lately, but macOS won’t run that either, I
> don’t think, without manual exception.
> 
> 
> 
> On Oct 20, 2021 at 1:18:58 PM, Mark A. Flacy <mf...@verizon.net.invalid>
> 
> wrote:
> > Greetings,
> > 
> > How many projects are in your projects panel?
> > 
> > If you haven't modified (God, I hate this) "/Applications/NetBeans/Apache\
> > NetBeans\ 12.4.app/Contents/Resources/NetBeans/netbeans/etc/netbeans.conf"
> > to allow a larger heap than the paltry default, you may be observing the
> > JVM performing the garbage collection of death dance which you'll see in
> > any java application that is operating at the edge of getting an OOM
> > error.
> > 
> > 
> > 
> > I have a MacBook Pro for work (32GB RAM) and I have changed the
> > *netbeans_default_options* in the above file to have the additional flag
> > of "-J-Xmx16384m" as well as setting *netbeans_jdkhome* to point to
> > something sane.
> > 
> > HTH.
> > 
> > 
> > --
> > 
> > Mark A. Flacy
> > 
> > mflacy@verizon.net
> > 
> > On Wednesday, October 20, 2021 11:54:02 AM CDT Thomas Wolf wrote:
> > > I have NB 12.4, but I have noticed the same behavior on previous NBs as
> > > 
> > > well:
> > > 
> > > 
> > > 
> > > Most of the time, my MacBook Pro is quiet as can be.  But every now and
> > > 
> > > then (every other day?), I’d be surfing the web or reading the mail when
> > 
> > my
> > 
> > > fans start spinning up - often getting to their max speed *and staying
> > > 
> > > there*.  Usually, I’m not doing anything CPU intensive at all and when I
> > > 
> > > look at the Activity Monitor, it’s always Netbeans taking 100-200% of
> > > the
> > > 
> > > CPU.  And *always*, when open the Netbeans window, there at the bottom
> > > 
> > > would be a message indicating that NB is checking (or waiting? can’t
> > > 
> > > remember the exact wording) for external changes.  I assume that’s the
> > > NB
> > > 
> > > feature that checks to see if any project-related source was modified
> > > 
> > > outside the IDE?   This has got to be a bug - there’s no way something
> > 
> > like
> > 
> > > that should be a heavy load on a CPU.
> > > 
> > > 
> > > 
> > > Is there something I can do when I next observe this behavior to help
> > 
> > track
> > 
> > > down this bug?  I think I’ve had this happen for at least a year.  If
> > 
> > there
> > 
> > > isn’t - is there a way to globally turn it off?
> > > 
> > > 
> > > 
> > > I’m on macOS 12.0.1 (Monterey) running NB with OpenJDK 17, but as I
> > > said,
> > > 
> > > this has happened on earlier NB and earlier versions of Java.  My
> > 
> > computer
> > 
> > > is standalone - i.e. no corporate network, not networked file systems.
> > > 
> > > Just the laptop and a wireless connection to the Internet (via Starlink
> > > 
> > > and, before that, via Verizon LTE).
> > > 
> > > 
> > > 
> > > Thanks for any suggestions,
> > > 
> > > 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: NB taking up 200% CPU checking for external changes :-(

Posted by Thomas Wolf <tj...@gmail.com>.
 Hi Mark,
I think this CPU abuse happens independent of project size or resources.  I
already had modified my netbeans.conf to give it plenty of heap (2-4gb),
but I’m not even running anything  ‘large’ - when this happens, there are
always only two projects open in the IDE - one is a library project with
just a couple dozen java files and a J2SE project with less than 100 source
files.  Downright puny!  A few years back I was working on a  project with
5000 java files and NB never even broke a sweat.  This bug with external
changes causing NB a tizzy has been around for awhile.  I think there was a
way to turn external checking off, but I can’t seem to find it right now.
Plus the disadvantage would be that when I do occasionally externally
inject changes (eg copying an image file into the project source tree), NB
might not react appropriately. :-(

Anyway, any further suggestions, let me know.  Much appreciated.

Tom

p.s. has anyone noticed that macOS Monterey now no longer has an “Anywhere”
option in System Settings->Security & Privacy->General->Allow apps
downloaded from ??? Annoying as hell.  It’s already refused to run half a
dozen things I downloaded and wanted to run - have to manually give an
exception :-(  Does anyone know of a way to turn this off?  I haven’t tried
downloading a new version of NB lately, but macOS won’t run that either, I
don’t think, without manual exception.



On Oct 20, 2021 at 1:18:58 PM, Mark A. Flacy <mf...@verizon.net.invalid>
wrote:

> Greetings,
>
> How many projects are in your projects panel?
>
> If you haven't modified (God, I hate this) "/Applications/NetBeans/Apache\
> NetBeans\ 12.4.app/Contents/Resources/NetBeans/netbeans/etc/netbeans.conf"
> to allow a larger heap than the paltry default, you may be observing the
> JVM performing the garbage collection of death dance which you'll see in
> any java application that is operating at the edge of getting an OOM error.
>
>
>
> I have a MacBook Pro for work (32GB RAM) and I have changed the
> *netbeans_default_options* in the above file to have the additional flag
> of "-J-Xmx16384m" as well as setting *netbeans_jdkhome* to point to
> something sane.
>
> HTH.
>
>
> --
>
> Mark A. Flacy
>
> mflacy@verizon.net
>
>
> On Wednesday, October 20, 2021 11:54:02 AM CDT Thomas Wolf wrote:
>
> > I have NB 12.4, but I have noticed the same behavior on previous NBs as
>
> > well:
>
> >
>
> > Most of the time, my MacBook Pro is quiet as can be.  But every now and
>
> > then (every other day?), I’d be surfing the web or reading the mail when
> my
>
> > fans start spinning up - often getting to their max speed *and staying
>
> > there*.  Usually, I’m not doing anything CPU intensive at all and when I
>
> > look at the Activity Monitor, it’s always Netbeans taking 100-200% of the
>
> > CPU.  And *always*, when open the Netbeans window, there at the bottom
>
> > would be a message indicating that NB is checking (or waiting? can’t
>
> > remember the exact wording) for external changes.  I assume that’s the NB
>
> > feature that checks to see if any project-related source was modified
>
> > outside the IDE?   This has got to be a bug - there’s no way something
> like
>
> > that should be a heavy load on a CPU.
>
> >
>
> > Is there something I can do when I next observe this behavior to help
> track
>
> > down this bug?  I think I’ve had this happen for at least a year.  If
> there
>
> > isn’t - is there a way to globally turn it off?
>
> >
>
> > I’m on macOS 12.0.1 (Monterey) running NB with OpenJDK 17, but as I said,
>
> > this has happened on earlier NB and earlier versions of Java.  My
> computer
>
> > is standalone - i.e. no corporate network, not networked file systems.
>
> > Just the laptop and a wireless connection to the Internet (via Starlink
>
> > and, before that, via Verizon LTE).
>
> >
>
> > Thanks for any suggestions,
>
> > Tom
>
>
>

Re: NB taking up 200% CPU checking for external changes :-(

Posted by "Mark A. Flacy" <mf...@verizon.net.INVALID>.
Greetings, 

How many projects are in your projects panel?

If you haven't modified (God, I hate this) "/Applications/NetBeans/Apache\ NetBeans\ 
12.4.app/Contents/Resources/NetBeans/netbeans/etc/netbeans.conf" to allow a larger heap 
than the paltry default, you may be observing the JVM performing the garbage collection of 
death dance which you'll see in any java application that is operating at the edge of getting 
an OOM error.


I have a MacBook Pro for work (32GB RAM) and I have changed the 
*netbeans_default_options* in the above file to have the additional flag of "-J-Xmx16384m" 
as well as setting *netbeans_jdkhome* to point to something sane.

HTH.

-- 
Mark A. Flacy
mflacy@verizon.net

On Wednesday, October 20, 2021 11:54:02 AM CDT Thomas Wolf wrote:
> I have NB 12.4, but I have noticed the same behavior on previous NBs as
> well:
> 
> Most of the time, my MacBook Pro is quiet as can be.  But every now and
> then (every other day?), I’d be surfing the web or reading the mail when my
> fans start spinning up - often getting to their max speed *and staying
> there*.  Usually, I’m not doing anything CPU intensive at all and when I
> look at the Activity Monitor, it’s always Netbeans taking 100-200% of the
> CPU.  And *always*, when open the Netbeans window, there at the bottom
> would be a message indicating that NB is checking (or waiting? can’t
> remember the exact wording) for external changes.  I assume that’s the NB
> feature that checks to see if any project-related source was modified
> outside the IDE?   This has got to be a bug - there’s no way something like
> that should be a heavy load on a CPU.
> 
> Is there something I can do when I next observe this behavior to help track
> down this bug?  I think I’ve had this happen for at least a year.  If there
> isn’t - is there a way to globally turn it off?
> 
> I’m on macOS 12.0.1 (Monterey) running NB with OpenJDK 17, but as I said,
> this has happened on earlier NB and earlier versions of Java.  My computer
> is standalone - i.e. no corporate network, not networked file systems.
> Just the laptop and a wireless connection to the Internet (via Starlink
> and, before that, via Verizon LTE).
> 
> Thanks for any suggestions,
> Tom



Re: NB taking up 200% CPU checking for external changes :-(

Posted by James Ostrowick <ja...@ostrowick.co.za>.
I’ll happily upvote this issue. It’s been happening for a long time and is present on 12.5 as well. 

I’m virtually at the point on giving up because of this problem and switching to another IDE 

Sent from my iPhone

> On 20 Oct 2021, at 18:54, Thomas Wolf <tj...@gmail.com> wrote:
> 
> 
> I have NB 12.4, but I have noticed the same behavior on previous NBs as well:
> 
> Most of the time, my MacBook Pro is quiet as can be.  But every now and then (every other day?), I’d be surfing the web or reading the mail when my fans start spinning up - often getting to their max speed *and staying there*.  Usually, I’m not doing anything CPU intensive at all and when I look at the Activity Monitor, it’s always Netbeans taking 100-200% of the CPU.  And *always*, when open the Netbeans window, there at the bottom would be a message indicating that NB is checking (or waiting? can’t remember the exact wording) for external changes.  I assume that’s the NB feature that checks to see if any project-related source was modified outside the IDE?   This has got to be a bug - there’s no way something like that should be a heavy load on a CPU.
> 
> Is there something I can do when I next observe this behavior to help track down this bug?  I think I’ve had this happen for at least a year.  If there isn’t - is there a way to globally turn it off?
> 
> I’m on macOS 12.0.1 (Monterey) running NB with OpenJDK 17, but as I said, this has happened on earlier NB and earlier versions of Java.  My computer is standalone - i.e. no corporate network, not networked file systems.  Just the laptop and a wireless connection to the Internet (via Starlink and, before that, via Verizon LTE).
> 
> Thanks for any suggestions,
> 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: NB taking up 200% CPU checking for external changes :-(

Posted by Laszlo Kishalmi <la...@gmail.com>.
There is a Profile the IDE button next to the Memory Gauge. Start 
profiling when the CPU usage spikes, let it run for a minute or so, then 
stop the profiling. You will see what is happening behind the scenes. 
That data can be exported as well, just zip that, create an issue in the 
JIRA and attach the report, so developers can analyze that as well.


On 10/20/21 09:54, Thomas Wolf wrote:
> I have NB 12.4, but I have noticed the same behavior on previous NBs 
> as well:
>
> Most of the time, my MacBook Pro is quiet as can be.  But every now 
> and then (every other day?), I’d be surfing the web or reading the 
> mail when my fans start spinning up - often getting to their max speed 
> *and staying there*. Usually, I’m not doing anything CPU intensive at 
> all and when I look at the Activity Monitor, it’s always Netbeans 
> taking 100-200% of the CPU.  And *always*, when open the Netbeans 
> window, there at the bottom would be a message indicating that NB is 
> checking (or waiting? can’t remember the exact wording) for external 
> changes.  I assume that’s the NB feature that checks to see if any 
> project-related source was modified outside the IDE?   This has got to 
> be a bug - there’s no way something like that should be a heavy load 
> on a CPU.
>
> Is there something I can do when I next observe this behavior to help 
> track down this bug?  I think I’ve had this happen for at least a 
> year.  If there isn’t - is there a way to globally turn it off?
>
> I’m on macOS 12.0.1 (Monterey) running NB with OpenJDK 17, but as I 
> said, this has happened on earlier NB and earlier versions of Java.  
> My computer is standalone - i.e. no corporate network, not networked 
> file systems.  Just the laptop and a wireless connection to the 
> Internet (via Starlink and, before that, via Verizon LTE).
>
> Thanks for any suggestions,
> 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