Fission MemShrink Newsletter #2

413 views
Skip to first unread message

Eric Rahm

unread,
Aug 16, 2018, 3:41:35 PM8/16/18
to firefox-dev, dev-platform
Hi Folks!

The Fission MemShrink project has been chugging along quite nicely and a ton of progress has been made over the past month. There's been a large focus on reducing the JS memory usage and we've managed to drop the base content JS measure by ~1.1MB (17%) [1]:

https://screenshotscdn.firefoxusercontent.com/images/c5046573-91bd-4ca1-98db-6290777e70c4.png

Additionally we've started looking at the overhead of our many threads [2], drafted up some ideas on reducing relocation overhead by adopting a fork server on linux/mac [3], and we're looking at reducing the overhead of per process font related data [4].

Below is a sampling of the bugs that have improved memory usage over the past month, apologies if I left any off! Please feel free to point out other improvements. All numbers are per content process.

JS improvements
Threading Overhead
  • Kris added measurements for thread stacks across platforms (Bug 1475899, Bug 1476405, Bug 1477512)
  • Kris reduced memory usage on Linux by ~3MB (that's megabytes!) by changing our default stack size (Bug 1476828)
  • Eric Rahm (this author) reduced memory usage by 50KB by reducing the amount of networking threads (Bug 1448034)
  • Xidorn Quan committed an upstream Rust patch (rust-lang/rust#52847) to fix how stack sizes are set on windows after Kris' initial investigation (Bug 1479250)
Font Overhead
  • The winner of biggest improvement with the smallest change goes to Lee Salzman who reduced memory usage on OSX by 10MB by reducing the skia glyph cache (Bug 1258781)
Lessons learned

Small fixes add up, removing dead code not only helps code quality but can save memory, adding measurements is important, caches can be easy targets. If you know of a cache we might tweak please file a bug to consider reducing it.

-e

Marissa (Reese) Morris

unread,
Aug 21, 2018, 10:56:39 AM8/21/18
to Eric Rahm, firefox-dev, dev-platform

This is awesome!  Great job!

 

Marissa (Reese) Morris | Cell Phone 303-506-3282 | re...@mozilla.com | Slack: #Marissa (Reese)

Reply all
Reply to author
Forward
0 new messages