Do not use multiple processes

Brave uses over a dozen different processes. Right now, for example, it shows 17 processes on my System Monitor. Two of them using about 100MiB memory, one 88, one 79, etc. Right now they use little of CPU.

In this way, I have difficulty assessing the overall resource usage by Brave. Normally, if I suspect my system is low on memory, I sort processes by memory and see who are the greediest. With brave spreading its usage over multiple processes, it would not pop up even if it is the greediest.

Actually, I would like to switch from Firefox as my main browser, and Brave appears very attractive. However, this inability to assess its overall resource usage stops me.

Please consider merging all processes into one, different threads.

Brave version:
[Version 1.1.23 Chromium: 79.0.3945.88 (Official Build) (64-bit)]

OS: Ubuntu 18.04.

I’m not affiliated with Brave or Chrome, but I think I can help explain the rationale behind one-process-per-tab.

But first I should mention that OS-reported statistics can be very misleading when looking at multiple processes with IPC shared memory. My understanding is that IPC shared memory is heavily utilized by the tab processes and yet the operating system reports the single block of shared memory over and over by each process that uses it. So you can’t necessarily add up the memory usage of each tab process and expect an accurate representation of the total memory usage. For that reason [and perhaps other reasons] Chrome (and by extension, Brave) provides a built-in task manager that shows a more accurate memory usage readout. In case you didn’t know, Brave is built on top of the same codebase [Chromium] as Chrome, so on a fundamental architectural level, what’s true for Chrome is often also true for Brave. So the one-process-per-tab method originates from Chrome.

That being said, the reason Brave/Chrome spawns a new process for each tab rather than housing all tabs within a single multi-threaded process is that if one thread dies, they all die. That means it would be impossible to force-kill a single tab if it were to freeze. Additionally, if a single thread segfaults (i.e. crashes), it causes the entire process to segfault. Putting each tab in its own process isolates them from each other, generally limits crashes to a single tab, and enables the browser as a whole to better orchestrate cleanup after failures since tab-crashes don’t bring down the browser.

2 Likes

Thanks for your explanations!
I find them quite satisfactory. Indeed, if Firefox crashes, it crashes all.
And I did not realize Chromium, Brave and Chrome had their own task managers; that can resolve my hesitations.

However, what bothers me, is your mention of Chrome. I generally mistrust Google, and for this reason I avoid using their successful products such as Chrome and Gmail. This includes Chrome even though it is open source, since I am concerned that unfriendly code may be hidden in such huge codebase.

I understand that Chrome was created by forking Chromium many years ago.

I find your language on this point (“Brave is built on top of the same codebase [Chromium] as Chrome”) unclear as to the relation of Brave to Chrome.

Could you please clarify?

Many thanks.

1 Like

Hi. Both Google Chrome and Brave are built on the same basic structure: open-source Chromium.

This article shares your issues with Google, and it may help to further clarify:

1 Like

You may also want to read this one too @byoussin Brave, Chromium, Google, and your data

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.