Last Comment Bug 733495 - Monitor ullAvailPageFile on Windows and fire a memory-pressure event when it gets low
: Monitor ullAvailPageFile on Windows and fire a memory-pressure event when it ...
Status: RESOLVED FIXED
[MemShrink:P1]
:
Product: Core
Classification: Components
Component: General (show other bugs)
: unspecified
: x86_64 Windows XP
: -- normal (vote)
: mozilla13
Assigned To: Justin Lebar (not reading bugmail)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-06 12:06 PST by Justin Lebar (not reading bugmail)
Modified: 2012-03-09 11:50 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
WIP v1 (10.68 KB, patch)
2012-03-06 13:22 PST, Justin Lebar (not reading bugmail)
no flags Details | Diff | Review
Patch v1 (12.94 KB, patch)
2012-03-06 19:21 PST, Justin Lebar (not reading bugmail)
benjamin: review+
Details | Diff | Review

Description Justin Lebar (not reading bugmail) 2012-03-06 12:06:42 PST
MEMORYSTATUSEX.ullAvailPageFile tells us how much space is available in physical memory plus the page file.

When this gets to 0, Windows will not let us map any more memory.  So we should raise a low-memory event before we get here.
Comment 1 Justin Lebar (not reading bugmail) 2012-03-06 12:07:05 PST
See also bug 720444, where we added ullAvailPageFile to crash reports.
Comment 2 Justin Lebar (not reading bugmail) 2012-03-06 13:22:43 PST
Created attachment 603434 [details] [diff] [review]
WIP v1
Comment 3 Justin Lebar (not reading bugmail) 2012-03-06 14:24:21 PST
I need to add a line to telemetryping.js to send this memory reporter.
Comment 4 Justin Lebar (not reading bugmail) 2012-03-06 19:21:51 PST
Created attachment 603583 [details] [diff] [review]
Patch v1
Comment 5 Mozilla RelEng Bot 2012-03-06 20:03:38 PST
Try run for 5377fc9154a5 is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=5377fc9154a5
Results (out of 50 total builds):
    success: 40
    warnings: 8
    failure: 2
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/jlebar@mozilla.com-5377fc9154a5
 Timed out after 06 hours without completing.
Comment 6 Justin Lebar (not reading bugmail) 2012-03-08 11:48:32 PST
Landed on m-i

  https://hg.mozilla.org/integration/mozilla-inbound/rev/b2ac02d89f41

but this had the wrong bug number (gah), so backed out and re-landed

  https://hg.mozilla.org/integration/mozilla-inbound/rev/37441c99ccf1
  https://hg.mozilla.org/integration/mozilla-inbound/rev/cad7f1ab3594
Comment 7 Marco Bonardo [::mak] 2012-03-09 05:18:43 PST
https://hg.mozilla.org/mozilla-central/rev/cad7f1ab3594
Comment 8 Daniel Cater 2012-03-09 11:44:10 PST
I think this might be covered elsewhere, but I can't find it. Why is the checking for low physical, commit and virtual memory Windows-only?
Comment 9 Justin Lebar (not reading bugmail) 2012-03-09 11:50:46 PST
(In reply to Daniel Cater from comment #8)
> I think this might be covered elsewhere, but I can't find it. Why is the
> checking for low physical, commit and virtual memory Windows-only?

Because it's hard(er) to do elsewhere, and because it's not a clear win on Windows, so we wanted to do it there before wasting our time elsewhere.

Also, Windows machines are much more likely to be running a 32-bit Firefox than Mac or Linux.

https://bugzilla.mozilla.org/show_bug.cgi?id=664291

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