How to limit memory usage per tab
I have problem with webpages with buggy javascript in a few websites. Website consumes all available memory and start to use swap. Swap in my computer is very slow (non-flash) and the computer stops to respond. Only restart can help me. Computer has 6GB RAM but JS on opened site can consume more than 2GB!!! I want to have possibility to set maximum memory used by one tab of firefox (I know, the tab is separated process and it should be possible).
How to limit memory usage by one tab to 750MB (or other value, preferred by user)? Acceptable actions after trying to get more memory: - the JS can stop to work, - the tab will show that crashed, - the tab will be closed automatically, - require confirmation before allowing any more allocations.
How to set it in about:config?
If it is not possible, please report bug and propose other similar function that will fix this problem.
Wšě wotmołwy (3)
Hello User,
Adjusting the Content process limit in the Performance settings may help this issue. I'll list the instructions for you.
Click the menu button and select Options. In the General panel, go down to the Performance section and uncheck the box next to Use recommended performance settings. You will then be able to change the Content process limit. You can set between one and eight content processes. The default is eight. Having more content processes can improve performance when using multiple tabs but it will also use more memory. You can reduce the number of content processes if your computer is running out of memory.
You can check the Firefox Task Manager (about:performance) and about:memory pages.
- https://support.mozilla.org/en-US/kb/task-manager-tabs-or-extensions-are-slowing-firefox
- https://support.mozilla.org/en-US/kb/firefox-uses-too-much-memory-or-cpu-resources
Start Firefox in Safe Mode to check if one of the extensions ("3-bar" menu button or Tools -> Add-ons -> Extensions) or if hardware acceleration or userChrome.css is causing the problem.
- switch to the DEFAULT theme: "3-bar" menu button or Tools -> Add-ons -> Themes
- do NOT click the "Refresh Firefox" button on the Safe Mode start window
This doesn't solve my problem. The problem is BUGGY SCRIPT on web page. I know that I can identify the script and block it. But... it is not only one buggy script. I do not have problem with drawing processes (selection of 1 doesn't help me and I tried it before asking - I used "search" before asking). According userChrome.css, themes etc. The firefox is installed on NEW LAPTOP and there is no change according default settings... Firefox has standard configuration. Installation of ublock doesn't help me because this script is not an ads script.
I need real OOM option that limit RAM memory per process. I plan to try "cgroups" but I am newbie in Linux. The problem can be solved by developers if there is lack of this function. It is easy to implementation.
In the past I used 32-bit version of OS. It limited the tab to 2GB naturally (this site and other with buggy script crashed after 5 minutes naturally - OS RAM limit per process). At the moment I have 64-bit OS and I AM FRUSTRATED THAT I CANNOT LIMIT FIREFOX PROCESS (TAB) to 2GB (or preferred 750MB).
Unfortunately my laptop hasn't 32-bit EFI and hasn't BIOS LEGACY mode and I cannot easily install 32-bit version of Linux or Windows.
Wot default.user