rstrong's blog

in search of ponies

  • Home

Navigation Menu

  • « Previous
  • Next »

Categories

  • Mozilla

Application Update file fragmentation and the new lack thereof

December 4th, 2010 by rstrong

Most of this last week I worked on backporting app update tests to 1.9.2 but there was one significant landing (Bug 570058). When updating with a partial update the files created when patching will be allocated before they are written to prevent fragmentation. This is done using platform specific API’s so the files have minimal fragmentation whenever possible.

To verify this with nightly builds, I started off a couple of days ago after defragmenting my hard drive and measured the fragmentation after applying a nightly partial update. The two updates previous to Bug 570058 landing had the following fragmentation for a partial update on Win7.

File Fragments 2 days prior Fragments 1 day prior
xul.dll 43 164
mozjs.dll 0 12
mozsqlite3.dll 9 10
omni.jar 9 6
browsercomps.dll 0 4
mozalloc.dll 2 2
plc4.dll 2 2
plugin-container.exe 2 2

With the first update that included the patch from Bug 570058 (the nightly update to the 12/4 build) all of the files listed above were contiguous (e.g. no fragments)… can’t get better than that! There was one new file (libGLESv2.dll 668 KB) that was added (e.g. not patched like the above files) that was in 2 fragments. The next time this file is patched it will likely be contiguous as well. Other new files were contiguous (libEGL.dll 136 KB and the usual .chk files).

I filed Bug 616390 to evaluate whether the cost / reward ratio is worth doing something similar for complete updates / files that are added which is a much smaller issue.

Thanks go out to Taras for pushing to get this done and his work in Bug 592520 [Core] – Do not fragment the hell out of CACHE__00[1-3]__ [Linux] which I used for the Mac and Linux implementations.

*Edit* I verified that libGLESv2.dll was made contiguous on the next partial update.

Posted in Mozilla    2 Comments

2 Responses to “Application Update file fragmentation and the new lack thereof”

  1. on 04 Dec 2010 at 7:59 pm   tglek

    That’s awesome!

  2. on 05 Dec 2010 at 3:56 pm   Alexander Limi

    This rocks.

Copyright © rstrong's blog