Optimizing Firefox: Why Large Applications Start Slowly on Linux

Optimizing Firefox: Why Large Applications Start Slowly on Linux

Taras Glek - taras@mozilla.com

https://blog.mozilla.com/tglek

Why Improve Startup Time?

Measuring Startup Time:IO Hurts

Visualizing Startup Time

Visualizing MMAP IO: Systemtap to the rescue

Who to blame?

Demand-paging is a strange way to load software

Demand-paging + CPU Scaling = OOF

Tricky Solution: order the binary

Startup Time RSS (KB)
firefox.stock 2515ms 49452
firefox.ordered 1919ms 45344
firefox.static 2321ms 49616
firefox.static.ordered 1577ms 37072
firefox.static.pgo 1619ms 38436

GCC + Linker Improvements

Wanted: Linker Improvements

Wanted: Linux Paging Improvements

Fragmentation: Sparse files considered harmful

Windows: Sucks in Different Ways

What's implemented?

Summary

Thank you