Open Bug 1834264 Opened 3 years ago Updated 3 months ago

Stop calculating "Other" memory, report global Sqlite memory in Other measurements

Categories

(Core :: SQLite and Embedded Database Bindings, task, P3)

task

Tracking

()

ASSIGNED

People

(Reporter: mak, Assigned: mak)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We use the connections array to subtract each connection memory from the globally measures sqlite memory, and generate an "Other" bucket.
Apart from forcing us to have the connections array, measuring the global Sqlite memory has also a cost, as Andrew found at https://www.sqlite.org/malloc.html#_memory_status
Additionally, the Firefox Profiler now has powerful tools to measure memory, that means we have a better way to precisely measure this Sqlite usage in the wild, when bugs are reported.

Here is the current proposal:

  1. Let each connection measure and report memory on its own, maintaining the current tree structure in about:memory
  2. Stop calculating Other, instead report the global Sqlite memory usage in Other Measurements
  3. Only report the global Sqlite usage in Nightly and early beta, removing contention lock risks from Release.
Summary: Sto calculating "Other" memory, report global Sqlite memory in Other measurements → Stop calculating "Other" memory, report global Sqlite memory in Other measurements
Product: Toolkit → Core

Each Connection now self-reports its stmt/cache/schema memory under
explicit/storage/sqlite/<filename>/ instead of Service iterating all
connections. The explicit/storage/sqlite/other bucket is removed.

On EARLY_BETA_OR_EARLIER builds, Service::CollectReports reports global
SQLite memory (page-cache and other) as KIND_OTHER in about:memory Other
Measurements, with SQLITE_CONFIG_MEMSTATUS enabled accordingly.

Assignee: nobody → mak
Status: NEW → ASSIGNED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: