Greetings,

The following webrev contains fixes for the following issue:

  15176 imageplan keeps solver cache and catalog data too long

webrev:
http://cr.opensolaris.org/~swalker/pkg-mem-2/

This changeset builds on the improvements made by the fix for 15169 (also out for review). However, unlike the fix for 15169, this one reduces memory usage for install and update operations -- not just image-update.

During image operation planning (install, update, etc.) the imageplan or the solver object it uses will load catalog data or build object caches that serve no purpose after planning is done or at different steps in the process.

To reduce the amount of memory used by imageplan during operation planning, it should discard this information as soon as it is finished with it.

Examples of this unused information include:
  * catalog data loaded before creating a solver object, but not used by
    the solver
  * caches built by the solver object or references to catalog objects
    that serve no purpose after solve_*() has been called and that
    prevent early garbage collection

This changeset, plus that for bug 15169 represents roughly a 33% decrease in the amount of memory used for install, update or image-update operations overall on the systems tested. Results may vary for systems with a different set of packages.

b131 system using /dev and /extra repositories (redistributable not installed)
===================================================================
$ pfexec pkg -R / image-update -n    (To 134)

First Column of pmap -x total output at end of operation:
Gate Tip + 15169 Patch Peak Memory: 634,588KB
Gate Tip + 15169 Patch + This Changeset Peak Memory: 509,084KB

b133 system (redistributable not installed)
===========================================
$ pfexec pkg -R / install system/manual

First Column of pmap -x total output at end of operation:
Gate Tip + 15169 Patch Peak Memory: 380,724KB
Gate Tip + 15169 Patch + This Changeset Peak Memory: 255,012KB

$ pfexec pkg -R / uninstall system/manual

First Column of pmap -x total output at end of operation:
Gate Tip + 15169 Patch Peak Memory: 212,723KB
Gate Tip + 15169 Patch + This Changeset Peak Memory: 167,876KB

$ pfexec pkg -R / image-update -n    (To 134)

First Column of pmap -x total output at end of operation:
Gate Tip + 15169 Patch Peak Memory: 283,668KB
Gate Tip + 15169 Patch + This Changeset Peak Memory: 194,772KB

Cheers,
--
Shawn Walker
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to