Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 700417 - Further reduce cache_size in Places
: Further reduce cache_size in Places
: regression
Product: Toolkit
Classification: Components
Component: Places (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla10
Assigned To: Marco Bonardo [::mak]
: Marco Bonardo [::mak]
Depends on:
Blocks: 658303
  Show dependency treegraph
Reported: 2011-11-07 12:32 PST by Marco Bonardo [::mak]
Modified: 2012-01-05 13:29 PST (History)
5 users (show)
mak77: in‑testsuite-
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch v1.0 (10.07 KB, patch)
2011-11-07 14:19 PST, Marco Bonardo [::mak]
dietrich: review+
Details | Diff | Splinter Review

Description Marco Bonardo [::mak] 2011-11-07 12:32:50 PST
In bug 658303 I made Storage copy the cache_size across copied connections. That makes sense since the connections should be identical. Plus in the default case (32768 sized pages) that will save memory when the consumer sets a custom page_size smaller than the default (< 2000).

The problem is that Places is somehow special here (sigh), we have old databases (included mine) that use 4096 or 1024 pagesize, and this means that:
- main connection can use up to 50% db size memory (may vary)
- cloned connections can use use 2000 * pagesize memory
- all connections can use up to 50% db size memory (may vary)

In the 32768 case the connection available memory is reduced from 64MB per connection to half the db size, that's a smaller size.
Unfortunately in the 1024 and 4096 cases the cloned connections memory will likely be larger :(

In the end, I think I'll put a cap to Places cache_size, and in future (once bug 692487 is fixed) we may just rely on the default value.

The good news is that initially the cache_size had been increased for the awesomebar, but since we never cloned its value, we survived with a much smaller size without suffering in performances.

If this fix does not end up in FF10, I'll just backout bug 658303 from Aurora.
Comment 1 Marco Bonardo [::mak] 2011-11-07 14:19:09 PST
Created attachment 572617 [details] [diff] [review]
patch v1.0
Comment 2 Dietrich Ayala (:dietrich) 2011-11-07 15:11:45 PST
Comment on attachment 572617 [details] [diff] [review]
patch v1.0

Review of attachment 572617 [details] [diff] [review]:

Comment 3 Dietrich Ayala (:dietrich) 2011-11-07 15:12:52 PST
Per IRC, please post about this to DAF and build forums to get feedback on perf effects.
Comment 4 Marco Bonardo [::mak] 2011-11-07 15:47:47 PST

will post once I see this sticking on central.
Comment 5 Ed Morley [:emorley] 2011-11-08 01:35:09 PST
Comment 6 Marco Bonardo [::mak] 2011-11-09 05:56:33 PST
posted in mozillazine Build forum
Comment 7 Marco Bonardo [::mak] 2011-11-09 07:01:05 PST
and cross-posted to m.d.a.f.

Note You need to log in before you can comment on or make changes to this bug.