New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 817128 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Refine quota calculations

Project Member Reported by jsb...@chromium.org, Feb 27 2018

Issue description

Several places where quota calculations/heuristics could be improved:

[x] should/must remain available thresholds seem arbitrary
[x] Chrome OS quota seems way too low
[x] OS accommodation seems pointless
 

Comment 1 by pwnall@chromium.org, Feb 27 2018

Proposed milestone: On a 32GB Chromebook, Gmail would get enough quota to store my e-mail offline.

Gmail reports 4.88GB in my work account and 4.73GB in my home account, so let's aim to be able to give at least 5GB of quota to an origin.

Let's assume 24GB for the stateful partition (4GB OS image x2 for active/standby). 
Project Member

Comment 2 by bugdroid1@chromium.org, Feb 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1e5b5704d062321a0c6d000224573661029b4b19

commit 1e5b5704d062321a0c6d000224573661029b4b19
Author: Joshua Bell <jsbell@chromium.org>
Date: Wed Feb 28 06:36:29 2018

Quota: Refine "should/must remain available" thresholds

Chrome has a "should remain available" disk space threshold; when less
than this amount is free, the effective quota for each origin drops to
0 so new writes will fail. This is present to avoid Chrome being
responsible for filling the disk which generally makes devices
unhappy. Similarly, Chrome has a "must remain available" threshold at
which point data starts being evicted - keeping the device functional,
but potentially losing user data.

The thresholds were set as a percentage of the disk size, but after
further consultation these are changed to absolute values (2GB for
"should" and 1GB for "must") to make the behavior more predictable and
to ensure more space on low end devices to accomodate e.g. app
updates.

Bug:  802027 , 817128 
Change-Id: I3a081d4e17d0e5ad74fb4e877f919f0cc1bec5b2
Reviewed-on: https://chromium-review.googlesource.com/940185
Commit-Queue: Victor Costan <pwnall@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539735}
[modify] https://crrev.com/1e5b5704d062321a0c6d000224573661029b4b19/storage/browser/quota/quota_settings.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Feb 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/197f46e57afcdbe073da9ede5c4aa0f244f3980d

commit 197f46e57afcdbe073da9ede5c4aa0f244f3980d
Author: Joshua Bell <jsbell@chromium.org>
Date: Wed Feb 28 16:35:13 2018

Quota: Increase temporary storage pool on Chrome OS

Per origin quota for storage APIs (Indexed DB, Cache API, etc) is
allocated out of a "temporary pool", the maximum amount of storage
that Chrome will use on a given device. Historically, this value has
been 1/3 of disk space, based on the heuristic that the web should be
ephemeral and not dominate the device's storage vs. native
applications and content.

Since Chrome OS is web-centric (most apps are web apps, etc) the
fraction significantly limits how much web apps can store on the
device. Bump the number to 2/3. We may increase it further in the
future.

Bug:  817128 
Change-Id: I0fa9eb44f6526c9f8112e2c727c396dcd37af92f
Reviewed-on: https://chromium-review.googlesource.com/940434
Commit-Queue: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539847}
[modify] https://crrev.com/197f46e57afcdbe073da9ede5c4aa0f244f3980d/storage/browser/quota/quota_settings.cc

Comment 4 by pwnall@chromium.org, Feb 28 2018

jsbell@'s work above gets us from 1.58GB to 3.17GB for the scenario I mentioned in Comment 1. Woohoo!
Description: Show this description
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ac70773eb40839bcc2c9039b69c105c6de26f8fd

commit ac70773eb40839bcc2c9039b69c105c6de26f8fd
Author: Joshua Bell <jsbell@chromium.org>
Date: Mon Mar 05 21:22:59 2018

Quota: Remove OS accommodation consideration

The quota heuristics reduced the effective volume size on a per-OS
before calculating the temporary pool size - e.g. 10GB for a desktop
OS and 1GB for CrOS/Android/etc. These numbers are sketchy at best,
and it turns out they don't affect much when the "should/must remain
free" numbers are considered:

e.g. on 1000GB desktop device, 10GB accommodation

  900GB used - pool is 330GB (without accommodation it'd be 333GB)
  995GB used - pool is 330GB (ditto)
  998GB used - "should" - writing blocked
  999GB used - "must" - purging starts

e.g. on 64GB mobile device, 1GB accommodation

  60GB used - pool is 21GB (without accommodation it would be 21.3GB)
  61GB used - pool is 21GB (ditto)
  62GB used - "should" - writing blocked
  63GB used - "must" - purging starts

In none of these cases does the OS accommodation do much beyond
fractionally altering how much Chrome will store, and protection
imposed by the "should/must" thresholds dominates the behavior.
Even if the accommodation numbers were increased, the pool size
only changes fractionally (e.g. raising mobile to 10GB just drops
the pool to 18GB).

Remove the OS accommodation calculation entirely.

Bug:  817128 
Change-Id: Iaefebb5b0f60ec221535e5c3a577a155fcb620a4
Reviewed-on: https://chromium-review.googlesource.com/940525
Commit-Queue: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540942}
[modify] https://crrev.com/ac70773eb40839bcc2c9039b69c105c6de26f8fd/storage/browser/quota/quota_settings.cc

Description: Show this description
Labels: -Type-Bug Type-Feature
We'll probably do more work here, but can use new tracking bugs.

Comment 9 by jsb...@chromium.org, Mar 20 2018

Status: Fixed (was: Started)

Sign in to add a comment