OS/2, eCS & ArcaOS - Technical > Internet

FF 45.x and CPU spikes

(1/3) > >>

Dariusz Piatkowski:
So if there is one complaint I have here about FF (ignoring the other blatant problems such as inability to view certain sites) it is that certain sites which do render correctly cause the CPU to spike and stay at the consistent 25-40% level across all the cores on my machine.

I have been able to track this down to specific sites, for example GMAIL is one. So long as the browser window (tab) that has GMAIL opened is focused on the spikes continue. Even after I switch to a different window (I run the XPager here, so a total of 9 virtual Desktops) the CPU spikes continue UNLESS I first open a new TAB in the same browser window that has the GMAIL tab and leave that as the last focused tab.

So for the most part I ignore it, let the spikes continue and just live with it.

However, a little over a month ago I was testing the 3.23.14 ACPI release on the AOS Testers list and found some weird stuff, specifically it was no longer possible to shut OFF a particular CPU core b/c the ACPI Power Manager would continually overwrite that change and effectively bring the core back on-line (that causes me a problem here, but that's a different story).

I logged an issue for this, the root cause has not been identified so far, but I priodically check the status of the ticket.

Well, I was out there last night and spotted another issue that was logged regarding the msg passing delays that are being seen, see https://mantis.arcanoae.com/view.php?id=3019. In that update a suggestion was made that the /NOHLT option produces a different result, a better performing one.

I was curious, so I tried it out. To my suprise here is what I found (see attached screenshot): the normal FF usage shows the spikes, but the instant FF is no longer the foreground application with focus the spikes go away. This is very different from the symptoms I described at the start of my post. The result actually is that the minute I am done looking at my GMAIL and switch to another window, another application, the spikes completely go away.

Doug Bissett:

--- Quote ---So if there is one complaint I have here about FF (ignoring the other blatant problems such as inability to view certain sites) it is that certain sites which do render correctly cause the CPU to spike and stay at the consistent 25-40% level across all the cores on my machine.
--- End quote ---

I see that a lot. I have determined that it is the web site trying to force advertising on you. I use a HOSTS file to block a lot of that stuff, and it is pretty effective, but the web page authors seem to have discovered that they need to keep on retrying, constantly, until it works. That produces "spikes". When you go to a site, like GMail, they try to force as much advertising as possible, and most of it seems to consist of full length movies, which also causes spikes. Don't blame Firefox for that.


--- Quote ---However, a little over a month ago I was testing the 3.23.14 ACPI release on the AOS Testers list and found some weird stuff, specifically it was no longer possible to shut OFF a particular CPU core b/c the ACPI Power Manager would continually overwrite that change and effectively bring the core back on-line (that causes me a problem here, but that's a different story).
--- End quote ---

That has always been the case. You must use the parameter in CONFIG.SYS (and reboot to activate it). Trying to use the command will turn off one, or more, processors, but as soon at ACPI decides it needs more power (usually very quickly), it will turn them back on for you.

Andreas Schnellbacher:
I have tried Dmitry's test app and it results in 2 ... 11 s. Now I remember that there are delays of a few s when opening NewView. It doesn't matter if it's started via the help manager or directly.

BTW: I've always thought that this may caused by another defect on my SSD. The first time I used the entire disk and copied data to it, I noticed problems with one partition. Reformatting that partition had cured that, but other problems occurred. After that, I had to ignore that one. No other problems since then. New SSDs are waiting to be used, but I also need time to do that.

Edit: Apparently the delays were caused by corrupt ini entries. Handles reached 6 blocks. After checkini and cleanini I'm back to 2 blocks and the delays seem to be gone. Have to try Dmitry's test app again.

Edit: Dmitry's test app gives now better results: 2 ... 5 s. (Ini handles were reduced from 6 to 2 blocks.)

Dave Yeo:
There's a few things that cause CPU spikes.
Some gifs are bad. This is a by product of not supporting drawing during vsync blanks like other OS's do. This can be shown by changing the value of layers.offmainthreadcomposition.frame-rate;-1 to zero or a positive number in about:config (requires a browser restart). Of course that makes drawing slow.
Some JavaScript also does this, I use DDG for search, sometimes the page doesn't finish loading and the CPU stays busy. Possibly what Doug sees is related.
Occasionally here, I get high CPU usage after a long uptime, this doesn't go away until I revert to a backup of my profile. No idea what causes this. I did seem to fix it last time by killing the browser and restarting, needs more testing.
There also seems to be problems with the HPET https://en.wikipedia.org/wiki/High_Precision_Event_Timer. Different MBs implement it differently and there was a long discussion about our ACPI not handling correctly vs the OS/4 kernels handling. David claimed it worked well, Bitwise claimed otherwise. It seems to be better here then it was. Here is a test, http://www.gus.biysk.ru/os4/test/timerTest.html
Probably other issues as well.

Dariusz Piatkowski:
Hi Doug,


--- Quote from: Doug Bissett on October 05, 2020, 06:13:21 pm ---I see that a lot. I have determined that it is the web site trying to force advertising on you. I use a HOSTS file to block a lot of that stuff, and it is pretty effective, but the web page authors seem to have discovered that they need to keep on retrying, constantly, until it works. That produces "spikes". When you go to a site, like GMail, they try to force as much advertising as possible, and most of it seems to consist of full length movies, which also causes spikes. Don't blame Firefox for that.
--- End quote ---

Yeah, I agree with you, which is the reason why I've been relying on the modified HOSTS file for a few years now, NoScript for at least a couple years, and most recently (about 6 months ago I would say) I deployed uBlock. So yeah, as best as I can tell I think I have the hatches pretty much locked down here...LOL!

I suspect the symptoms I'm seeing are primarily caused by the FF issues Dave highligted in his post. I know that killing off certainly web page images using the uBlock add-on gives you a bit more control. However, certain scripts that run in the back-end can be difficult to kill, and at times they flat-out break the site functionality.


--- Quote from: Doug Bissett on October 05, 2020, 06:13:21 pm ---...

--- Quote ---However, a little over a month ago I was testing the 3.23.14 ACPI release on the AOS Testers list and found some weird stuff, specifically it was no longer possible to shut OFF a particular CPU core b/c the ACPI Power Manager would continually overwrite that change and effectively bring the core back on-line (that causes me a problem here, but that's a different story).
--- End quote ---

That has always been the case. You must use the parameter in CONFIG.SYS (and reboot to activate it). Trying to use the command will turn off one, or more, processors, but as soon at ACPI decides it needs more power (usually very quickly), it will turn them back on for you.

--- End quote ---

Ahh, now this I want to specifically comment on, because what you state is simply NOT quite the case.

Until the 3.23.14 TEST3 version was out, it was possible to run the ACPI drivers with the Power Manager in DISABLED status, which gave you control over actual CPU core status. You could bring any of them down or up as needed. I know, I have relied on this approach basically since going live with SMP and using the ACPI driver set. In fact, strangely enough, even if you had Power Manager ENABLED I still could control the CPU core activation. So I suspect that the previous versions of ACPI drivers wasn't quite able to manage/control something else in my hardware.

Like you, I expected that when the Power Manger is ENABLED the ACPI driver would completely control the CPU cores. However, when DISABLED the ACPI driver should NOT touch the CPU cures.

However, I reported my issue when TEST3 was out and never heard back. Eventually when the 3.23.14 was officially released the previously working functionality completely went away.

Again, keep in mind that when the Power Manager is DISABLED (OFF status) the ACPI driver should NOT be making any changes to the CPU cores.

Navigation

[0] Message Index

[#] Next page

Go to full version