0
Commit Graph

3 Commits

Author SHA1 Message Date
Victor Costan
3ffd9a3731 sql: Add Finch trial for eliminating sql::Database::Preload().
The logic in sql::Database::Preload() is a pessimization for modern OS
schedulers, as it forces the kernel to read the first few pages of a
newly opened database. https://crbug.com/243949 suggests that this
method was added without performance testing, just like the more complex
SQLite patch that it replaces.

This CL sets up a Finch trial that will either prove that we can get rid
of the Preload() hack, or give us conclusive data about its usefulness.

Bug: 243949
Change-Id: Icfee9aaa3d125af207974536e8e5f5e64a9609ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1438031
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Chris Mumford <cmumford@google.com>
Commit-Queue: Steven Holte <holte@chromium.org>
Auto-Submit: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662006}
2019-05-22 00:46:54 +00:00
Victor Costan
249be7083d sql: Remove SqlTempStoreMemory experiment.
All the necessary data has been collected. This CL undoes the parts of
https://crrev.com/c/1180530 and https://crrev.com/c/1183786 that were
not general code health improvements.

Bug: 875538
Change-Id: Ibd604c69996072db71c47b18b99f79962f389c3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1612266
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Chris Mumford <cmumford@google.com>
Reviewed-by: Steven Holte <holte@chromium.org>
Commit-Queue: Steven Holte <holte@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660615}
2019-05-16 22:24:10 +00:00
Victor Costan
4c2f3e9227 sql: Feature flag for in-memory temporary storage.
This CL introduces SqlTempStoreMemory flag, which is intended to be
managed via Finch. When set, the flag causes sql::Database to run a
PRAGMA temp_store=MEMORY [1] query on every opened database.

This approach is intended to approximate the effect of building SQLite
with the SQLITE_TEMP_STORE=3 [2] macro, to measure the memory
consumption impact. Ideally, we'd test the macro directly, but //sql is
a core component of Chrome, so we can't load different versions of it
based on Finch.

[1] https://www.sqlite.org/pragma.html#pragma_temp_store
[2] https://www.sqlite.org/compile.html#temp_store

Bug: 875538
Change-Id: I537d90d763be1100503ed4bd2ada2ee19eb090bb
Reviewed-on: https://chromium-review.googlesource.com/1180530
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Reviewed-by: Chris Mumford <cmumford@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584652}
2018-08-21 04:47:59 +00:00