memory threshold is too high
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Device Images |
New
|
Undecided
|
Unassigned | ||
Canonical System Image |
Fix Released
|
High
|
Bill Filler | ||
webbrowser-app (Ubuntu) |
Fix Released
|
High
|
Olivier Tilloy | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When opening new tabs in the browser, it decides if it should close existing ones based on level of free memory available in the system. My understanding is that this is currenly set to 30% percentage of memory in the device.
There are two issues with this approach and setting:
1) a percentage means that the threshold changes from device to device. While theamount of memory needed to open a webpage is not device specific. For example at 30%, the browser would close open tabs if there less than 1.2Gb mem free in a 4Gb device, but will only need 300Mb free on a 1Gb device. This is a very large difference.
2) In M10 with 2Gb it requires 600mb free. From idle, just opening the gmail in the browser, takes the avilable system memory below this. This means that in 2gb devices the threshold is never met, and the browser never runs more than one tab at the same time. this impacts user experience, specially in desktop mode. For example is not possible to open a document in the browser while attending a hangout.
How to reproduce
open a tab in the browser, go to youtube and play any video
then open a new tab
expected:
music/sound in the video continues to play
actual in m10:
sound stops playing shortly after opening the tab
[Manual test case for verification]
On various devices (desktop with large amount of physical memory, tablet, phone, …), open the browser, open a number of tabs and browse to pages known to require a large amount of memory (Gmail, G+, hangouts, youtube, Google maps, webgl games, …).
Monitor the amount of available memory (e.g. using top) and verify that when the device is getting low on memory some cleanup is performed (background tabs are being unloaded) such that the OOM killer nevers kicks in, taking down the entire application.
Verify that the mechanism is not too aggressive, i.e. that not all background tabs get unloaded all the time (having a background tab playing some audio is a good idea to easily spot when it’s being unloaded).
As this mechanism is based on heuristics, it will never be 100% perfect, but the situation should have greatly improved.
Related branches
- system-apps-ci-bot: Needs Fixing (continuous-integration)
- Ubuntu Phablet Team: Pending requested
-
Diff: 67 lines (+12/-13)2 files modifiedsrc/app/webbrowser/Browser.qml (+9/-11)
src/app/webbrowser/BrowserTab.qml (+3/-2)
- Ubuntu Phablet Team: Pending requested
-
Diff: 905 lines (+274/-86)27 files modifieddebian/changelog (+15/-0)
debian/control (+2/-1)
src/Ubuntu/CMakeLists.txt (+4/-0)
src/Ubuntu/Web/UserAgent02.qml (+4/-10)
src/Ubuntu/Web/plugin.cpp (+7/-0)
src/Ubuntu/Web/ua-overrides-desktop.js (+5/-0)
src/Ubuntu/Web/ua-overrides-mobile.js (+6/-1)
src/app/browserapplication.cpp (+32/-24)
src/app/browserapplication.h (+1/-2)
src/app/config.h.in (+0/-1)
src/app/single-instance-manager.cpp (+39/-3)
src/app/single-instance-manager.h (+1/-1)
src/app/webbrowser/Browser.qml (+21/-15)
src/app/webbrowser/BrowserTab.qml (+3/-2)
src/app/webbrowser/NavigationBar.qml (+1/-2)
src/app/webbrowser/webbrowser-app.cpp (+1/-1)
src/app/webcontainer/WebApp.qml (+1/-0)
src/app/webcontainer/WebViewImplOxide.qml (+28/-14)
src/app/webcontainer/WebappContainerWebview.qml (+3/-1)
src/app/webcontainer/webapp-container.cpp (+32/-1)
src/app/webcontainer/webapp-container.h (+1/-0)
src/app/webcontainer/webapp-container.qml (+2/-0)
tests/autopilot/webapp_container/tests/__init__.py (+4/-0)
tests/autopilot/webapp_container/tests/fake_servers.py (+29/-0)
tests/autopilot/webapp_container/tests/test_popup_webview_overlay.py (+19/-0)
tests/autopilot/webapp_container/tests/test_saml_url_patterns.py (+9/-3)
tests/unittests/single-instance-manager/tst_SingleInstanceManagerTests.cpp (+4/-4)
Changed in webbrowser-app (Ubuntu): | |
importance: | Undecided → High |
summary: |
- memory treshhold is too high + memory threshold is too high |
Changed in webbrowser-app (Ubuntu): | |
status: | New → Confirmed |
assignee: | nobody → Olivier Tilloy (osomon) |
Changed in canonical-devices-system-image: | |
status: | In Progress → Fix Committed |
Changed in webbrowser-app (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → Fix Released |
description: | updated |
Lets try with 100MB and get some mileage on proposed