Re: Regarding Chromium memory reduction

18 views
Skip to first unread message

Kentaro Hara

unread,
Jun 13, 2022, 11:55:48 PM6/13/22
to Hyojin Song, memory-dev, 성항동
Hi Hyojin

Thanks for reaching out! Let me cc @memory-dev since our memory reduction efforts are distributed to many teams.

1. Has your team recently considered to reduce Chrmoium memory usage other than V8 area? (e.g. media, DOM, WASM)
- If some item makes sense for us, we're willing to provide a meaningful opinion or participate it if you're okay.

Our memory reduction efforts are distributed to many areas. We launched PartitionAlloc to all platforms, parkable strings to compress JavaScript source strings, auto-disable accessibility features, memory pressure signals for the editing undo stack and many others I'm not aware of :)
 
- LGE has several experience on the memory reduction efforts from which we have oure ow techniques. (e.g. bg app/media resources mgr.)

If you have any specific idea for memory reductions, we want to learn more and help you upstream changes that make sense. Feel free to propose on memory-dev@.

2. Is there any testing tool or method for detecting memory regression on Chromium upstream? (esp. for arm based)
- We can basically use several sanitizer tools for the purpose, but I just wonder additional methods performed in Chromium upstream.
- I expect there would be several consideration on how to detect the memory regression while fixing several hw spec and platform version.

We normally use memory benchmarks in System Health. Also we regularly monitor {Browser,Renderer,Total}.PrivateMemoryFootprint in UMA (the data is only viewable in Google) and make sure that newly added features don't regress memory unexpectedly.



On Tue, Jun 14, 2022 at 8:38 AM Hyojin Song <hyojin...@lge.com> wrote:

Hi Haraken,


I'm working in LG Electronics. I've presented a couple of BlinkOn lightning talks before (spatial navigation, memory for webOS), so I met you at that time. :)

As always, we're trying to reduce the memory usages on webOS's Chromium (e.g. 1GB RAM for TV), but it's been affected by Chromium upstream changes.

Hence, I would like to understand the recent activity or consideration for better memory footprint in Chromium upstream these days.


If you don't mind, could you kindly answer the following question?


1. Has your team recently considered to reduce Chrmoium memory usage other than V8 area? (e.g. media, DOM, WASM)

- If some item makes sense for us, we're willing to provide a meaningful opinion or participate it if you're okay.

- LGE has several experience on the memory reduction efforts from which we have oure ow techniques. (e.g. bg app/media resources mgr.)


2. Is there any testing tool or method for detecting memory regression on Chromium upstream? (esp. for arm based)

- We can basically use several sanitizer tools for the purpose, but I just wonder additional methods performed in Chromium upstream.

- I expect there would be several consideration on how to detect the memory regression while fixing several hw spec and platform version.


For your information, I share the previous webOS memory consideration slides presented at BlinkOn 13. (Nov 2020)


Memory consideration for low-end devices with webOS platform

https://docs.google.com/presentation/d/1vhmaWwdvcVY_JaY-me4gZJb-DZjAUVWmuTqCZ_MsTq0/edit#slide=id.ga73e92fd78_0_28


Thanks,

Hyojin




--
Kentaro Hara, Tokyo

Bartek Nowierski

unread,
Jun 14, 2022, 6:59:01 AM6/14/22
to Hyojin Song, memory-dev, 성항동, Benoit Lize, Kentaro Hara
We launched PartitionAlloc to all platforms
Speaking of PartitionAlloc, Benoit added code here and here that makes it use less memory on low-memory devices. It might be worthwhile to check if these get triggered on your devices.


Bartek


--
You received this message because you are subscribed to the Google Groups "memory-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to memory-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/memory-dev/CABg10jx6PBSHHmr6zZ1ePwMR8iti7Pv2TnUXrsqa_F3DvaJnTA%40mail.gmail.com.

Hyojin Song

unread,
Jun 14, 2022, 10:40:04 PM6/14/22
to Bartek Nowierski, Kentaro Hara, Benoit Lize, 성항동, memory-dev

Hi Bartek, Kentaro,


Thanks a lot for sharing meaningful information! It would be quite helpful for us.


Most of LGE memory features might be downstream (webOS specific), but we will try to briefly introduce parts of them via @memory-dev soon.

Regarding the less memory options on PartitionAlloc, we will check and share the result. :)


I have a last question.


We used to encounter some issue such as Oilpan or PartitionAlloc in webOS, but seems difficult to report it to upstream due to non-official platform.

If we can reproduce it with one of the official targets (ARM based), we can report it. I'm not sure but the candidates might be Linux, Chrome OS and Fuchsia.

Is there any ARM based official platform in Chromium as a verification target? I wonder Memory team has considered ARM device for new memory features.

(e.g. https://chromium.googlesource.com/chromium/src/+/main/docs/linux/chromium_arm.md)


Thanks,

Hyojin


p.s. If Raspberry Pi4 (well-known target for general developers) can be one of the official targets in Chromium, it would be best for us. :)

https://www.webosose.org/docs/guides/setup/building-webos-ose/


---------- Original Message ----------

From : "Bartek Nowierski" <bar...@chromium.org>
To : 송효진 책임연구원(hyojin22.song)
Cc : "memory-dev" <memor...@chromium.org>, 성항동 TP Leader(eric.seong), "Benoit Lize" <li...@chromium.org>, "Kentaro Hara" <har...@chromium.org>
Date : 2022/06/14 19:59:02 [GMT+09:00]
Subject : Re: Regarding Chromium memory reduction


Bartek Nowierski

unread,
Jun 15, 2022, 12:50:39 AM6/15/22
to Hyojin Song, Kentaro Hara, Benoit Lize, 성항동, memory-dev
Hi,

We definitely support ARM for macOS and Android. I don't know enough about Linux ARM to tell. If something looks like an ARM-specific bug and doesn't look like an OS-specific bug, do report. Good chances it affects the supported platforms too.

The whole discussion about platforms made me wonder if you're even enabling PartitionAlloc-as-malloc. We are intercepting malloc calls and route them to PartitionAlloc on Windows, Linux, macOS, Android and ChromeOS (and soon iOS), and each platform does it differently. Chances are you may not have it enabled...


Bartek

Hyojin Song

unread,
Jun 15, 2022, 1:55:04 AM6/15/22
to Bartek Nowierski, Kentaro Hara, Benoit Lize, 성항동, memory-dev

Hi,


Last year, the following patch has affected the memory usage on a webOS App, so I've recognized that webOS Chromium runs with PartitionAlloc in 2022.


[PartitionAlloc] Disable PartitionAlloc-Everywhere on Linux

https://chromium-review.googlesource.com/c/chromium/src/+/2874396


webOS Chromium follows is_linux as true, so most of updates in Chromium upstream are applied to webOS Chromium as well.


Thanks,

Hyojin


---------- Original Message ----------

From : "Bartek Nowierski" <bar...@chromium.org>
To : 송효진 책임연구원(hyojin22.song)

Cc : "Kentaro Hara" <har...@chromium.org>, "Benoit Lize" <li...@chromium.org>, 성항동 TP Leader(eric.seong), "memory-dev" <memor...@chromium.org>
Date : 2022/06/15 13:50:40 [GMT+09:00]

Bartek Nowierski

unread,
Jun 15, 2022, 2:42:51 AM6/15/22
to Hyojin Song, Kentaro Hara, Benoit Lize, 성항동, memory-dev
Hi, yes, that's a clear sign it's working properly!

Reply all
Reply to author
Forward
0 new messages