Webrev:
https://cr.opensolaris.org/action/browse/pkg/bpytlik/performance

Bugs:
19104 CliTestCase.pkgsend needs to display traceback when pkgsend tracesback
19113 old dictionary in imageplan.__find_all_conflicts should be seeded using old_excludes
19119 generic.get_varcet_keys shouldn't use startswith
19120 Image shouldn't load the action dictionary twice during an update
19121 if actions.offsets includes number of lines with the same key, things can be faster
19122 pkgplans should hold onto their manifests a bit longer
19123 maintaining a cache of created fmris while checking for conflicting actions makes things faster
19124 conflicting actions should use sets of strings instead of PkgFmris
19125 pkg_solver should stop creating the same pfmris over and over
19126 manifests should track what's been excluded from them
19127 compiling re's in facets is faster than using fnmatch

While these numbers will vary depending on the number of publishers configured, the size of their catalogs, the number of packages installed etc... I think they're reasonably representative. All numbers given refer to the planning step of the operation (ie, what happens when you run the command with -n).

On my x86 machine with multiple nightly publishers configured, planning an update from roughly build 2 to build 5 is roughly 34% faster and uses 7% less memory. (It also creates 75% fewer PkgFmri objects and 41% fewer actions.) Planning a change-variant operation is 34% faster, uses 4% less memory. (It creates 81% fewer PkgFmri objects and 46% fewer actions.) Planning a small install operation is 11% faster but does use 2M more memory (a 1% increase). Planning an uninstall operation is 9% faster but does use 1M more memory (a 0.5% increase).

I saw similar numbers on the sparc machine I used for testing which had a single publisher configured. Planning an update from FCS to build 5 is 32% faster and uses 7% less memory. (It creates 86% fewer PkgFmri objects and 48% fewer actions.) Planning a change-facet operation was 31% faster and used 2% less memory (while creating 90% fewer PkgFmris and 46% fewer actions). Installing a package was 6% faster while using the same amount of memory and uninstalling a package was 3% faster while using the same amount of memory.

By far, the biggest speed improvement came from putting strings instead of PkgFmris in a set whose membership was checked often. Doing that also allowed us to not build PkgFmris unless they're actually going to be used (this was about 12% of the update improvement). Another large change was to hang onto the manifests in the pkgplans. That was another 7% or so. The final notable change was the use of the counts in the actions.offset file. That saved about 6%. The rest of the improvement is spread among the other changes which individually offered small improvements.

Change-facet/variant was similar to the update performance except that having a single manifest in a pkgplan when the origin and destination fmris are the same is critical to prevent a memory explosion and a performance regression.

I'm happy to provide numbers for other specific changes if anyone would like it.

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

Reply via email to