
The supposed memory improvements that Segment Heap brings to Chrome on Windows 10 2004 are at the cost of increased CPU usage, Google found in their tests. The Chromium team has disabled the Segment Heap feature in Chrome 85 for now.
Google Chrome uses more memory because of its architecture, everyone, including the Chromium team knows about that.
Recently Microsoft claimed with Windows 10 May 2020 Update, by using Segment Heap, Microsoft Edge can reduce memory consumption by 27%.
Google found opting into Windows Segment Heap over Legacy Heap On Windows 10 version 2004 or later builds, ” could save hundreds of MB in the browser and Network service utility processes, among others on some machines. Actual results will vary widely, with the greatest savings on many-core machines.”
Google has gone ahead and enabled Segment Heap in Chrome Canary recently.
But further tests by the company led to the discovery of “performance regression with Windows Segment hep.”
With commit https://chromium-review.googlesource.com/c/chromium/src/+/2163163 landed, Windows >= 10.0.19041.0 (Windows 10 version 2004 and later) will opt chrome.exe into using the segment heap instead of the legacy heap. But which led to performance regression for WebXPRT3, Speedometer2, and JetStream2.
Microsoft employee suggests either Memory or CPU usage will be impacted. In this case, memory improvements coming with increased CPU usage and suggests two options to overcome the issue.
1) Reduce the amount of transient heap allocations the browser makes. This will require significant changes across the entire browser codebase.
2) Improve the performance of the Segment heap itself. This can only be addressed by the Windows team and we are investigating our options.
Chromium’s bruce notes in the thread that “M85 already has a number of other optimizations and landing this change (simultaneous (memory) improvement and (performance) regression) at the same time makes the comparison even more difficult.”
“Although I have heard encouraging things about memory savings from lab tests I don’t see any way for us to leave this enabled until we have clean telemetry data and lab tests on 20H1, neither of which will be happening in time for M85. So, the plan is to disable this for M85 (thus giving us another telemetry data point) and reconsider in the future.”
The CPU cost (10% slowdown on speedometer 2.0, 13% increase in CPU/power consumption) is too great for us too keep” Brue concluded.
A few hours back Segment Heap has been disabled by default.
There’s some concern that the cost of the Segment heap doesn’t justify its cost (see crbug.com/1102281). This CL disable it by default and put this feature behind a GN flag to let us keep experimenting with it
Related articles:
Chrome 79: Google tests Tab Freeze feature
Google Chrome adds Back-Forward Cache feature to Canary
Why you Shouldn’t Use Chrome Canary SyzyASan Build?
Google Chrome to unload heavy ads that use most of the system resources