Issue with Tab Hibernation
Are there any known issues with Tab Hibernation on macOS? I ask because I noticed that when Vivaldi is running, the amount of RAM that it and all of its processes consume almost never goes down. It just balloons and balloons despite any tabs that I hibernate. I decided to test this issue by opening up the Vivaldi Task Manager and Activity Monitor. When I hibernate a tab in Vivaldi, the process disappears from the Task Manager built into Chromium. However, Activity Monitor in macOS shows the process as active and it is still utilizing all of the RAM that it was before hibernation. (Also, whenever you re-activate a previously hibernated tab, it still utilizes the old process.) The resources are simply not freed at all. The only way to get RAM usage down to a more manageable level is to restart the browser.
I use Vivaldi at work on a Windows 10 PC, so I did the same test. When I hibernated a tab, the process disappears everywhere, including the Windows Task Manager. The RAM was also freed up. And, when re-activating the hibernated tab, it spawns a new process as I would expect.
Is this a known issue, or is this an issue for anyone else? I've always complained about the huge amounts of RAM Vivaldi uses despite all of my constant efforts at keeping it lower, and I think this might be why.
@Shrinra No, I can't confirm this. I just did a test with the same setup, and the processes disappear both from activity monitor and task manager.
However, you neither stated your operating system version, nor your Vivaldi version. I'm on osx 10.11.6 and snapshot 1.11.915.3.
You are right. I forgot to mention those key pieces of info. I am on Vivaldi 1.10.867.48 and my OS is macOS Sierra (10.12.5).
Now we need someone who uses the stable version on Sierra to confirm this. Or you could try the snapshot version and see if this fixes it. Although I haven't read anything about it.
I've been doing a little research on this and I think it might actually be a problem (at least, for some people). Take a look at this. Apparently it is a known issue that goes back as far as 1.6 and was still present on 1.9.
I might try installing the latest 1.11 Snapshot. Can I install it alongside Stable and run them both side-by-side?
@Shrinra I would do a standalone install.
Wow...that was really cool! It completely solves the issue of not being able to easily have two installations on Vivaldi on my Mac, each with a separate profile. I did not know how to do that.
Anyways, I tested the 1.11 Snapshot, and from what little testing I did, my tabs hibernated properly with macOS showing that all of the processes in question were terminated.
I can't be sure what the issue is. After all, my test was on a completely different version of Vivaldi with a new, fresh profile, and no extensions installed. It's possible that the issue was a bug that was resolved in 1.11, but couldn't it also be the result of an old, crusty profile or a badly behaved extension? My profile goes back to the early Technical Preview days, so I suppose that's always a possibility.
I'm not sure though. Maybe I will wait until 1.11 is officially out and see what happens after I upgrade my Stable build to that.
You can try with a fresh profile. Just quit Vivaldi, rename your default folder (eg default123), and restart Vivaldi -- this will create a new profile. Info
I have more to report on this issue. It has even got weirder. Yesterday, I restarted Vivaldi (because the memory footprint had gotten unbearably large again) and then immediately took a look at the inbuilt Task Manager. All that I saw was a process for the existing tab I was on, a process for all of my extensions, and both the "Browser" and Vivaldi app processes. This is all normal and is to be expected.
But, I noticed as I browsed, that it seemed like processes (and the accompanying memory bloat) were being created for tabs that were completely hibernated and hadn't once been loaded since I started up Vivaldi. I would see a process ID for the tab and resources being allocated to it in macOS Activity Monitor, as well as the Vivaldi Task Manager. To give an example, I would see a process that contained five tabs (due to process-per-site-instance, I think) and took up almost 400MB of memory. Yet, when I went to look at the tabs in Vivaldi, they all showed as dimmed/hibernated/unloaded. In addition, when I clicked on one, it did load from scratch showing that it wasn't loaded.
Afterwards, I restarted the browser again and the same exact thing happened. Before I knew it, the Task Manager was showing 50 tabs as active with resources allocated to them, despite the fact that I had only clicked on/interacted with 5 tabs since restart.
I decided to test the same session in the Vivaldi 1.11 Snapshot, so I saved one windows worth of my tabs with Vivaldi's built-in Session Manager. I then went to the Session Folder within my profile (Default > Sessions) and copied the .bin file into the corresponding folder within the Snapshot's profile. I launched 1.11, opened the Session, and then clicked on each tab to load it. Then, I tried hibernating a tab, and the same thing happened!
I suppose the issue might be with my sessions? Is that even possible? And, if it is, is there anyway to fix this? I don't want to discard them and start from scratch. I have some saved from some projects that I have to keep, and don't want to have to get rid of two years of organized browsing snapshots.
I have been looking at this issue more, and I am still confused. I don't think it is completely a Mac thing any longer and I feel that I am probably misunderstanding how this feature is supposed to work.
Whenever I start up Vivaldi and resume my session, again, I notice that with each tab I click on to load, it is grouped with a bunch of other tabs that have not been touched since the browser has been launched.
For example, I will click on tab #1, and then in the Task Manager/Activity Monitor, it will show tab 1 with an active process and somehow grouped with 4-5 other tabs that I never touched! It will show the group together in one process with resources assigned to them. Yet, these tabs that I didn't touch are dimmed and show as unloaded in Vivaldi. Also, whenever I click on the these tabs to load them, they load, showing that the browser does correctly show them as unloaded.
Next, if you go through the browser and load 5 more random tabs, you will see the above reoccur. What I see is that I've only purposely loaded 4-5 tabs since launching the browser, but the Vivaldi Task Manager is showing 40-45 tabs as being loaded with the RAM to account for them. (I've only loaded 3 tabs, but Vivaldi is currently using 3GB of memory because of all of these zombie tabs.) Again, there is a disconnect somewhere because Vivaldi shows them as dimmed/unloaded, and when you right-click, there is no option to hibernate.
Also, when a tab has a sole process to itself, which is not always the case due to Chromium's default process-per-site-instance model, the process will not terminate and release resources when the tab is hibernated. Vivaldi will show it as unloaded and it will not be present in the Task Manager, but macOS still shows it as active (and thereby chewing up resources). Furthermore, when you reload that hibernated tab, the Vivaldi Task Manager will show that it is using the exact same process ID as before. If it truly was terminated, then I cannot imagine that it would be the case. Please note that I was not able to get Windows 10 to do this. It reliably killed processes when a tab was hibernated. However, the phantom/zombie tab issue after relaunch described above (4-5 tabs ballooning to 40-45 in the Vivaldi Task Manager) was OS agnostic.
(macOS did reliably terminate processes and release resources when a tab was closed; this whole issue only happens with hibernation.)
As a whole, this issue makes Vivaldi hard to use for me as tab hibernation is extremely ineffective. I was drawn to Vivaldi because of this feature. I use large numbers of tabs, and this functionality finally makes using a Chromium-based browser possible.
I will be submitting this as a bug report. It is 100% possible that everything is working as intended and that I misunderstand what this feature is supposed to do, but it could not hurt in my opinion
It appears that the issue that I am experiencing is a Chromium issue regarding empty renderer processes not being cleaned up after hibernation (or "discarding" in Chromium parlance).
I will stop harping on this issue here as it clearly is not a Vivaldi issue.
I've tested manual tab discarding in Google Chrome Canary 62 and the renderer/helper processes successfully terminated after every discard. It appears that there is some relief on the horizon, but assuming that 62 contains the fix, it will take a few months to reach Vivaldi, unfortunately. (Note: I did not have Chromium 61 to test, so it might come sooner!)