Open
Bug 934934
Opened 11 years ago
Updated 2 years ago
[meta][Session Restore] Track sites that spam sessionstore.js, find defensive strategies
Categories
(Firefox :: Session Restore, defect)
Firefox
Session Restore
Tracking
()
NEW
People
(Reporter: Yoric, Unassigned)
References
(Depends on 1 open bug, )
Details
(Keywords: meta, perf, Whiteboard: [tracking][fxperf:meta])
Attachments
(8 files)
In bug 669034, C wrote:
« So, Firefox 24.0, I only have a reasonable number of tabs, and used to see stalls of 3000 ms (yes, 3 seconds) in the parent of ssi_serializeHistoryEntry(), as well as 800 ms to write the sessionstore.js file to disk. I have a quad-core Haswell Xeon and a fast Intel SSD. The sessionstore.js file was 60MB.
I tracked it down to some ajax-y query mechanism Facebook chat uses that leaks long (>1kB) urls which all get persisted.
From a little python script I wrote to sort strings in the JSON by length, outputting keys:
1212 /windows[0]/tabs[5]/entries[5]/children[14]/url
1212 /windows[0]/tabs[5]/entries[5]/children[4]/url
1212 /windows[0]/tabs[5]/entries[5]/children[8]/url
These URLs are of the form "https://www.facebook.com/ai.php?something=1kB_of_gobblydegook". The result of GETing this 1kB URL is a 0.10kB response:
<span id="fbEmuTrackingSuccess">Success</span>
Those leaking URLs accumulated 10-50kB per minute towards my sessionstore.js, eventually leading to 3000 ms stalls every 10 seconds, which is about as fun as it sounds. I used adblock to block the URLs, and now my sessionstore.js is fairly stable at around 100-120 kB.
I'm not sure what can be done from the Firefox side to garbage collect this sort of behavior (it's hard to destroy manually without losing your session because of tab-undo); it could certainly be fixed on Facebook's end, but their public bug-filing mechanism is pretty bad.
»
That's important information. We should set out to determine which sites are hurting us and how we can work around these hurts, either through code or through evangelism.
Reporter | ||
Comment 1•11 years ago
|
||
David Tryse wrote an extension that can be useful here:
https://addons.mozilla.org/en-US/firefox/addon/about-sessionstore/
Comment 2•11 years ago
|
||
about:sessionstore after unblocking facebook.com/ai.php for about 10 minutes. It's already the dominant component of a sessionstore at 36 kB. After a quick photoshopping, it's up to 42 kB already.
Reporter | ||
Comment 3•11 years ago
|
||
Thanks. I have created a sub-bug specifically for facebook.com, btw: bug 934935.
Comment 4•11 years ago
|
||
(In reply to David Rajchenbach Teller [:Yoric] <needinfo? me> from comment #0)
> In bug 669034, C wrote:
> « ...
> Those leaking URLs accumulated 10-50kB per minute ...
> »
>
> That's important information. We should set out to determine which sites are
> hurting us and how we can work around these hurts, either through code or
> through evangelism.
OK, can you specify "hurting us"?
And are only sites are interesting that "accumulated ..kb per minute" or every site above ..kb storage ???
Comment 5•11 years ago
|
||
Google Search with logged in user.
Comment 6•11 years ago
|
||
Google Mail.
Comment 7•11 years ago
|
||
The new Google Maps with logged in user.
Comment 8•11 years ago
|
||
Microsoft Skydrive Excel Document.
Reporter | ||
Comment 9•11 years ago
|
||
(In reply to Tobias B. Besemer from comment #4)
> (In reply to David Rajchenbach Teller [:Yoric] <needinfo? me> from comment
> #0)
> > In bug 669034, C wrote:
> > « ...
> > Those leaking URLs accumulated 10-50kB per minute ...
> > »
> >
> > That's important information. We should set out to determine which sites are
> > hurting us and how we can work around these hurts, either through code or
> > through evangelism.
>
>
> OK, can you specify "hurting us"?
>
> And are only sites are interesting that "accumulated ..kb per minute" or
> every site above ..kb storage ???
Actually, we don't know for sure. But definitely, a site that accumulates kb per minutes is bound to hurt us.
Comment 10•11 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=902374 - may be it's related?
Comment 11•11 years ago
|
||
A Doc in an Facebook Group. New Doc Style.
Comment 12•11 years ago
|
||
A folder in Google Drive.
Updated•11 years ago
|
Attachment #832714 -
Attachment description: 2013-11-15 04_31_01-about_sessionstore.png → Doc in an Facebook Group
Updated•11 years ago
|
Attachment #832716 -
Attachment description: Google Drive → A folder in Google Drive
Updated•11 years ago
|
Attachment #831831 -
Attachment description: 2013-11-13 18_56_13-about_sessionstore.png → Microsoft Skydrive Excel Chart
Updated•11 years ago
|
Attachment #831829 -
Attachment description: 2013-11-13 22_26_17-about_sessionstore.png → New Google Maps with logged in user
Updated•11 years ago
|
Attachment #831828 -
Attachment description: 2013-11-13 05_53_52-about_sessionstore.png → Google Mail
Updated•11 years ago
|
Attachment #831827 -
Attachment description: 2013-11-13 05_53_04-about_sessionstore.png → Google Search with logged in user
Comment 13•11 years ago
|
||
Comment on attachment 827356 [details]
sessionstore_10min.png
Facebook Message Page
Reporter | ||
Comment 14•11 years ago
|
||
(In reply to Eugene Savitsky from comment #10)
> https://bugzilla.mozilla.org/show_bug.cgi?id=902374 - may be it's related?
Most likely not.
Comment 15•11 years ago
|
||
Google Play Store.
Comment 16•11 years ago
|
||
All Sessionstore screenshots from me are taken from a Win7 64bit machine with the newest FF26beta, no Plugins and the activated NoScript Extension, shortly after opening the tab. Some scripts (like from google.com or facebook.com) may be allowed.
My idea behind was to first collect some 'modern' cloud pages to investigate and better track them later.
Comment 17•11 years ago
|
||
Not sure anything can be done about this, but I wanted to make a note of this:
Having various Path of Exile character builds open also significantly impacts SessionStore. It seems that every time you modify one of these builds, it creates a new entry in the page history, and each entry gets saved. I had two builds open in pinned tabs with lots of history from tweaking each build, and this caused me to experience significant jank whenever the SessionStore file was updated. about:sessionstore showed me that these tabs were causing around 26MiB of SessionStore usage, and Windows' task manager showed 400-500 MiB spikes in memory usage every time the SessionStorage file was written. Opening these builds in new tabs (thereby losing the back button history) then clearing the closed tabs entries in about:sessionstore made SessionStore size drop back down to ~400kiB and made the jank go away (it also lowered average total memory usage by about 100MiB, even beyond eliminating the spikes).
An example build is here:
http://www.pathofexile.com/passive-skill-tree/AAAAAgABlKDaYmh0-eimVzGe2E0n7Rku1I-53e8OxthYY1BQjM_2SF8_rKpyqXzZQarfvxRxpzAB5zboYSGE73Tteu9gSwUtxFgn1YTZZU1HfqvFfLvFivAfogAUTQSzAnG-vILkkBGKr_IvkFWnhBo4FCBQR0rIWK-18qlueA064fJFTeM1kv6PwBpZ8_jr9zJuqudjiPGsWew4Otg_JypNFSAs6e960359df66g9vuDiP27_DdDfzFZ6CHdkp9_EvOcVb6WkhsFp_LGJH3viXfG_qkGb6KAdzi6j38fLgpLowGpKxuab6n0k3AD0Zp_gqpaA==
You can play around with it by deallocating any of the leaf nodes and putting these points into something else.
Reporter | ||
Comment 18•11 years ago
|
||
(In reply to Emanuel Hoogeveen [:ehoogeveen] from comment #17)
> Not sure anything can be done about this, but I wanted to make a note of
> this:
Can you file a specific bug?
Comment 19•11 years ago
|
||
(In reply to David Rajchenbach Teller [:Yoric] <needinfo? me> from comment #18)
> Can you file a specific bug?
Filed as bug 942601.
Updated•11 years ago
|
Whiteboard: [tracking]
Comment 20•10 years ago
|
||
A discussion about changes/improvements to the Session Restore (sessionstore):
https://groups.google.com/forum/#!topic/mozilla.dev.platform/JHrOP3yMgfg
Updated•9 years ago
|
Reporter | ||
Comment 21•9 years ago
|
||
I'm not working on Session Restore anymore.
Assignee: dteller → nobody
Comment 22•9 years ago
|
||
(In reply to David Rajchenbach-Teller [:Yoric] (use "needinfo") from comment #21)
> I'm not working on Session Restore anymore.
Oh, OK! (Sad!) Who does it now ???
SR was getting (much) better, but I think it can/should be still improved ...
Doesn't wrote new bugs & comments anymore because I was thinking Mozilla.com is busy with 64-bit, e10s & stability ... ^^
Updated•7 years ago
|
Whiteboard: [tracking] → [tracking][fxperf]
Updated•5 years ago
|
Whiteboard: [tracking][fxperf] → [tracking][fxperf:meta]
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•