Extreme CPU and RAM usage spike when typing into text fields
Categories
(Core :: Performance, defect)
Tracking
()
People
(Reporter: timon, Unassigned, NeedInfo)
Details
Attachments
(1 file)
11.91 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0
Steps to reproduce:
The bug seems to occur the most extreme on mastodon.social
I just need to start to type a new post.
This happens to a lesser degree elsewhere too when typing.
Loading multiple websites causes similar issues.
Actual results:
CPU usage of both Firefox and the Windows Kernel sky rocket and RAM usage increases by few GB. See attached picture of how it looks during typing, before it was sitting at 0.5% CPU utilization and 8.2GB then it jumped to 13.1% and 12GB RAM usage while system process spiked to 30.7% from previously 0.7% CPU utilization.
Looking at a system trace with WPA the Kernel spends a huge amount of time zeroing pages. There is a known issue in the Windows 10 kernel around this which seems to have occurred in Chrome as well at some point:
https://randomascii.wordpress.com/2022/07/11/slower-memory-zeroing-through-parallelism/
Expected results:
No 10-30x increase in CPU usage from typing into text fields or loading websites and no jump in RAM usage from typing.
Ok the insane memory increase on mastodon.social can be faulted towards an extension.
What remains is that whenever a lot of memory is allocated and subsequently released (like when several websites load) it causes the Windows Kernel to also have this huge CPU spike due to clearing a lot of tiny pages and spending a lot of time in a spinlock. That was not there in the past, did something changed in the way memory is handled in the past versions?
Updated•26 days ago
|
Comment 2•23 days ago
|
||
This bug was moved into the Performance component.
:timon, could you make sure the following information is on this bug?
- For slowness or high CPU usage, capture a profile with http://profiler.firefox.com/, upload it and share the link here.
- For memory usage issues, capture a memory dump from
about:memory
and attach it to this bug. - Troubleshooting information: Go to
about:support
, click "Copy raw data to clipboard", paste it into a file, save it, and attach the file here.
If the requested information is already in the bug, please confirm it is recent.
Thank you.
Description
•