Greetings,

The following webrev contains fixes for the following issues:

  15386 action fromstr could pool attribute names to reduce memory usage
  15388 actions could use __slots__ to reduce memory usage
  15389 pkgplans could use __slots__ to reduce memory usage

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

These changes build onto those done for bugs 15169, 15176, and 15211. Test results below are a comparison based on a workspace with changes for those bugs.

The x64 desktop system referenced below is an Intel Core 2 DUO E8400 w/ 8GiB ram and 10K RPM SATA drive running OpenSolaris b135.

The x64 laptop system referenced below is a laptop w/ an Intel Core 2 DUO T9600 w/ 4GiB ram and a 4200 RPM SATA drive running OpenSolaris b131.

The T5120 system referenced below is a SPARC T5120 w/ 16GB memory.

Operation Memory Usage Comparisons (before -> after)
====================================================
Peak memory usage based on the first column of pmap -x total output.

$ pfexec pkg -R / install --no-refresh --no-index -n redistributable
x64 desktop: 467,420KiB -> 380,224KiB
x64 laptop: 534,360KiB -> 453,492KiB

$ pfexec pkg -R / image-update --no-refresh -n (b131 -> b135)
x64 laptop: 587,448KiB -> 473,100KiB

$ pkg -R /tmp/empty_user_image install --no-refresh -n slim_install
x64 desktop: 445,344KiB -> 420,064KiB

$ pkg -R /tmp/empty_user_image install --no-refresh -n system/manual
x64 desktop: 169,880KiB -> 169,827KiB

Operation Timing Comparisons (before -> after)
==============================================
Timings are approximations of the best of three executions.

(package files already cached)
$ ptime pkg -R /tmp/empty_user_image install --no-refresh --no-index \
    system/manual
x64 desktop: 17.8s -> 17.76s

$ ptime pkg -R /tmp/empty_user_image uninstall --no-index system/manual
x64 desktop: 10.52s ->10.31s

$ pfexec ptime pkg -R / install --no-refresh --no-index \
    -n redistributable
x64 desktop: 1m2s -> 1m0s

$ ptime pkg -R / info > /dev/null
x64 desktop: 10s -> 10s
t5120: 1m21s -> 1m21s

$ ptime pkg -R / list > /dev/null
x64 desktop: 0.57s -> 0.57s
t5120: 4s -> 4s

$ ptime pkg -R / list -af > /dev/null
x64 system: 26.4s -> 26.6s

$ pfexec ptime pkg -R / image-update --no-refresh -n (b131 -> b135)
x64 laptop: 1m39s -> 1m33s

$ tests/perf/actionbench.py:
x64 system (before):
action creation
            0.293300     68189 actions/sec
            0.295670     67642 actions/sec
            0.297790     67161 actions/sec
action comparison
            0.630162    825184 action comparisons/sec
            0.633465    820881 action comparisons/sec
            0.633873    820353 action comparisons/sec
minimalist comparison
            0.579174    897830 comparisons/sec
            0.581962    893528 comparisons/sec
            0.578394    899041 comparisons/sec
action to string conversion
            3.191834     81457 actions to string/sec
            3.186780     81587 actions to string/sec
            3.194482     81390 actions to string/sec
manifest contents loading
1.731851 577 manifest contents loads/sec (34645 actions/sec) 1.734783 576 manifest contents loads/sec (34586 actions/sec) 1.735338 576 manifest contents loads/sec (34575 actions/sec)
id() speed
            0.162338  6159986 calls to id(action) /sec
            0.162396  6157788 calls to id(action) /sec
            0.161949  6174777 calls to id(action) /sec

x64 system (after):
action creation
            0.300926     66461 actions/sec
            0.302024     66219 actions/sec
            0.302555     66103 actions/sec
action comparison
            0.651083    798669 action comparisons/sec
            0.652607    796803 action comparisons/sec
            0.654813    794119 action comparisons/sec
minimalist comparison
            0.593151    876673 comparisons/sec
            0.589933    881456 comparisons/sec
            0.592134    878179 comparisons/sec
action to string conversion
            3.196666     81334 actions to string/sec
            3.205971     81098 actions to string/sec
            3.203141     81170 actions to string/sec
manifest contents loading
1.740518 574 manifest contents loads/sec (34472 actions/sec) 1.739334 574 manifest contents loads/sec (34495 actions/sec) 1.738995 575 manifest contents loads/sec (34502 actions/sec)
id() speed
            0.167371  5974749 calls to id(action) /sec
            0.167386  5974213 calls to id(action) /sec
            0.167257  5978829 calls to id(action) /sec

t5120 (before):
action creation
            2.853906      7007 actions/sec
            2.858965      6995 actions/sec
            2.852238      7012 actions/sec
action comparison
            6.257705     83097 action comparisons/sec
            6.247607     83231 action comparisons/sec
            6.207757     83766 action comparisons/sec
minimalist comparison
            5.584755     93110 comparisons/sec
            5.611580     92665 comparisons/sec
            5.585962     93090 comparisons/sec
action to string conversion
           31.378303      8285 actions to string/sec
           31.360470      8290 actions to string/sec
           31.342635      8295 actions to string/sec
manifest contents loading
15.015942 66 manifest contents loads/sec (3995 actions/sec) 15.041417 66 manifest contents loads/sec (3988 actions/sec) 15.042124 66 manifest contents loads/sec (3988 actions/sec)
id() speed
            1.184643   844136 calls to id(action) /sec
            1.184616   844155 calls to id(action) /sec
            1.184623   844150 calls to id(action) /sec

t5120 (after):
action creation
            2.854850      7005 actions/sec
            2.857029      7000 actions/sec
            2.854616      7006 actions/sec
action comparison
            6.248733     83216 action comparisons/sec
            6.235880     83388 action comparisons/sec
            6.227135     83505 action comparisons/sec
minimalist comparison
            5.586775     93076 comparisons/sec
            5.545881     93763 comparisons/sec
            5.535070     93946 comparisons/sec
action to string conversion
           31.415406      8276 actions to string/sec
           31.458708      8264 actions to string/sec
           31.377425      8286 actions to string/sec
manifest contents loading
15.006399 66 manifest contents loads/sec (3998 actions/sec) 15.031686 66 manifest contents loads/sec (3991 actions/sec) 15.030030 66 manifest contents loads/sec (3992 actions/sec)
id() speed
            1.184657   844126 calls to id(action) /sec
            1.184637   844140 calls to id(action) /sec
            1.184658   844125 calls to id(action) /sec


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

Reply via email to