Following the results of the previous comparison, i've used Jorge's profiling example on the 'call_method' bench for trusty stock, no LTO, no PGO and Xenial stock, no PGO and no LTO. Here are the results. Notice the difference between Trusty Stock & Trusty nopgo, as opposed to the execution profiles of the other tests.
Trusty Stock ============ callgrind_annotate: Profiled target: /home/ubuntu/venv/cpython2.7-d0d7712d4e1d/bin/python /home/ubuntu/venv/cpython2.7-d0d7712d4e1d/li b/python2.7/site-packages/performance/benchmarks/bm_call_method.py --worker --pipe 4 --worker-task=0 --samples 3 -- warmups 1 --loops 1 --min-time 0.1 (PID 25150, part 1) 4,918,198,605 ???:PyEval_EvalFrameEx'2 [/home/ubuntu/venv/cpython2.7-d0d7712d4e1d/bin/python2.7] 1,180,507,700 ???:0x00000000005368f0 [/home/ubuntu/venv/cpython2.7-d0d7712d4e1d/bin/python2.7] 1,109,707,368 ???:PyObject_GetAttr [/home/ubuntu/venv/cpython2.7-d0d7712d4e1d/bin/python2.7] 823,065,734 ???:PyFrame_New [/home/ubuntu/venv/cpython2.7-d0d7712d4e1d/bin/python2.7] 552,755,137 ???:0x00000000004a5c90 [/home/ubuntu/venv/cpython2.7-d0d7712d4e1d/bin/python2.7] 525,836,692 ???:0x00000000004bedf0 [/home/ubuntu/venv/cpython2.7-d0d7712d4e1d/bin/python2.7] 12,732,711 ???:PyParser_AddToken [/home/ubuntu/venv/cpython2.7-d0d7712d4e1d/bin/python2.7] 6,120,934 ???:PyDict_GetItem [/home/ubuntu/venv/cpython2.7-d0d7712d4e1d/bin/python2.7] 4,700,333 ???:0x00000000004bc0e0 [/home/ubuntu/venv/cpython2.7-d0d7712d4e1d/bin/python2.7] 4,647,564 ???:0x00000000004afe90'2 [/home/ubuntu/venv/cpython2.7-d0d7712d4e1d/bin/python2.7] 3,724,240 ???:PyObject_Free [/home/ubuntu/venv/cpython2.7-d0d7712d4e1d/bin/python2.7] 3,526,112 ???:PyDict_SetItem [/home/ubuntu/venv/cpython2.7-d0d7712d4e1d/bin/python2.7] 3,407,575 ???:0x0000000000571fd0 [/home/ubuntu/venv/cpython2.7-d0d7712d4e1d/bin/python2.7] 3,304,198 ???:PyObject_Hash [/home/ubuntu/venv/cpython2.7-d0d7712d4e1d/bin/python2.7] 3,055,436 ???:0x00000000005495a0 [/home/ubuntu/venv/cpython2.7-d0d7712d4e1d/bin/python2.7] 2,796,306 ???:0x0000000000535070 [/home/ubuntu/venv/cpython2.7-d0d7712d4e1d/bin/python2.7] Trusty nopgo: ============= Profiled target: /home/ubuntu/venv/cpython2.7-d217262e7ee7/bin/python /home/ubuntu/venv/cpython2.7-d217262e7ee7/li b/python2.7/site-packages/performance/benchmarks/bm_call_method.py --worker --pipe 4 --worker-task=0 --samples 3 -- warmups 1 --loops 1 --min-time 0.1 (PID 28073, part 1) 5,362,602,828 ???:PyEval_EvalFrameEx'2 [/home/ubuntu/venv/cpython2.7-d217262e7ee7/bin/python2.7] 1,250,195,637 ???:0x0000000000585e90 [/home/ubuntu/venv/cpython2.7-d217262e7ee7/bin/python2.7] 890,479,191 ???:PyFrame_New [/home/ubuntu/venv/cpython2.7-d217262e7ee7/bin/python2.7] 836,574,419 ???:PyObject_GenericGetAttr [/home/ubuntu/venv/cpython2.7-d217262e7ee7/bin/python2.7] 552,808,267 ???:0x000000000049ef00 [/home/ubuntu/venv/cpython2.7-d217262e7ee7/bin/python2.7] 539,318,922 ???:0x0000000000493710 [/home/ubuntu/venv/cpython2.7-d217262e7ee7/bin/python2.7] 488,401,927 ???:_PyType_Lookup [/home/ubuntu/venv/cpython2.7-d217262e7ee7/bin/python2.7] 258,028,053 ???:PyObject_GetAttr [/home/ubuntu/venv/cpython2.7-d217262e7ee7/bin/python2.7] 12,247,026 ???:0x00000000005937f0 [/home/ubuntu/venv/cpython2.7-d217262e7ee7/bin/python2.7] 11,727,983 ???:PyParser_AddToken [/home/ubuntu/venv/cpython2.7-d217262e7ee7/bin/python2.7] 6,409,083 ???:PyDict_GetItem [/home/ubuntu/venv/cpython2.7-d217262e7ee7/bin/python2.7] 4,948,165 ???:PyObject_Malloc [/home/ubuntu/venv/cpython2.7-d217262e7ee7/bin/python2.7] 4,746,403 ???:0x00000000004f7b70'2 [/home/ubuntu/venv/cpython2.7-d217262e7ee7/bin/python2.7] 4,525,638 ???:PyNode_AddChild [/home/ubuntu/venv/cpython2.7-d217262e7ee7/bin/python2.7] 4,429,698 ???:PyObject_Free [/home/ubuntu/venv/cpython2.7-d217262e7ee7/bin/python2.7] 3,582,953 ???:0x000000000041aff0 [/home/ubuntu/venv/cpython2.7-d217262e7ee7/bin/python2.7] 3,240,230 ???:PyObject_Hash [/home/ubuntu/venv/cpython2.7-d217262e7ee7/bin/python2.7] Trusty nolto: ============= Profiled target: /home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7 /home/ubuntu/venv/cpython2.7-d8da6ef977cc /lib/python2.7/site-packages/performance/benchmarks/bm_call_method.py --worker --pipe 4 --worker-task=0 --samples 3 --warmups 1 --loops 1 --min-time 0.1 (PID 27353, part 1) 4,930,764,066 ???:PyEval_EvalFrameEx'2 [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] 1,059,123,292 ???:0x0000000000486370 [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] 879,185,389 ???:PyObject_GetAttr [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] 823,049,135 ???:PyFrame_New [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] 552,712,907 ???:0x0000000000477410 [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] 539,326,714 ???:PyMethod_New [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] 472,694,320 ???:_PyType_Lookup [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] 148,897,549 ???:PyObject_GC_UnTrack [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] 40,448,799 ???:0x00000000004877d0 [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] 10,899,345 ???:PyParser_AddToken [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] 10,348,722 ???:PyDict_GetItem [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] 4,662,730 ???:0x00000000004cd110 [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] 4,637,942 ???:0x000000000050b720'2 [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] 4,432,451 ???:PyObject_Free [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] 4,094,020 ???:PyDict_SetItem [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] 3,629,015 ???:PyNode_AddChild [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] 3,408,211 ???:0x00000000004a2260 [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] 3,232,715 ???:PyObject_Malloc [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] 3,206,499 ???:PyObject_Hash [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] 3,055,436 ???:0x000000000050b610 [/home/ubuntu/venv/cpython2.7-d8da6ef977cc/bin/python2.7] Xenial Stock ============ Profiled target: /home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python /home/ubuntu/venv/cpython2.7-abc0c129a9a8/li b/python2.7/site-packages/performance/benchmarks/bm_call_method.py --worker --pipe 4 --worker-task=0 --samples 3 -- warmups 1 --loops 1 --min-time 0.1 (PID 28373, part 1) 5,293,380,177 ???:PyEval_EvalFrameEx'2 [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 1,058,376,436 ???:0x00000000004d9030 [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 850,012,013 ???:PyFrame_New [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 823,053,334 ???:_PyObject_GenericGetAttrWithDict [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 525,847,184 ???:PyMethod_New [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 471,794,110 ???:0x00000000004e1030 [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 461,203,120 ???:_PyType_Lookup [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 312,611,371 ???:PyObject_GetAttr [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 148,905,231 ???:PyObject_GC_UnTrack [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 40,444,971 ???:0x00000000004e09c0 [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 12,120,701 ???:PyDict_GetItem [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 10,987,593 ???:PyParser_AddToken [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 6,574,452 ???:PyObject_Malloc [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 5,006,318 ???:0x00000000004bdc60'2 [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 4,842,496 ???:PyDict_SetItem [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 4,519,155 ???:PyDict_Next [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 3,835,459 ???:PyObject_Free [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 3,270,809 ???:PyObject_Hash [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 3,257,249 ???:PyNode_AddChild [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] Xenial nopgo: ============= Profiled target: /home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python /home/ubuntu/venv/cpython2.7-abc0c129a9a8/li b/python2.7/site-packages/performance/benchmarks/bm_call_method.py --worker --pipe 4 --worker-task=0 --samples 3 -- warmups 1 --loops 1 --min-time 0.1 (PID 31025, part 1) 5,293,380,790 ???:PyEval_EvalFrameEx'2 [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 1,058,376,436 ???:0x00000000004d9030 [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 850,012,013 ???:PyFrame_New [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 823,053,388 ???:_PyObject_GenericGetAttrWithDict [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 525,847,184 ???:PyMethod_New [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 471,794,110 ???:0x00000000004e1030 [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 461,203,154 ???:_PyType_Lookup [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 312,611,394 ???:PyObject_GetAttr [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 148,905,242 ???:PyObject_GC_UnTrack [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 40,444,971 ???:0x00000000004e09c0 [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 12,120,701 ???:PyDict_GetItem [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 10,987,593 ???:PyParser_AddToken [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 6,569,654 ???:PyObject_Malloc [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 5,006,318 ???:0x00000000004bdc60'2 [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 4,842,666 ???:PyDict_SetItem [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 4,519,155 ???:PyDict_Next [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 3,835,456 ???:PyObject_Free [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 3,270,809 ???:PyObject_Hash [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] 3,257,249 ???:PyNode_AddChild [/home/ubuntu/venv/cpython2.7-abc0c129a9a8/bin/python2] Xenial nolto ============ 4,638,372,768 ???:PyEval_EvalFrameEx'2 [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 1,032,105,069 ???:0x00000000004baed0 [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 930,988,654 ???:_PyObject_GenericGetAttrWithDict [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 836,521,421 ???:PyFrame_New [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 539,330,714 ???:PyMethod_New [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 471,820,360 ???:0x00000000004ab110 [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 459,027,697 ???:_PyType_Lookup [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 231,463,205 ???:PyObject_GetAttr [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 148,905,033 ???:PyObject_GC_UnTrack [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 40,447,959 ???:0x00000000004bb9c0 [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 26,987,922 ???:PyObject_GenericGetAttr [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 10,987,547 ???:PyParser_AddToken [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 10,817,485 ???:0x00000000004d5100 [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 6,371,045 ???:PyDict_GetItem [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 4,810,558 ???:0x0000000000531b20'2 [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 4,434,281 ???:0x00000000004f4f70 [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 4,103,768 ???:PyObject_Free [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 3,779,149 ???:0x00000000004d66a0 [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 3,406,572 ???:PyDict_SetItem [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 3,363,736 ???:0x0000000000596340 [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 3,257,249 ???:PyNode_AddChild [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] 3,245,139 ???:PyObject_Malloc [/home/ubuntu/venv/cpython2.7-67a0e317201d/bin/python2] -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to python2.7 in Ubuntu. https://bugs.launchpad.net/bugs/1638695 Title: Python 2.7.12 performance regression Status in python2.7 package in Ubuntu: Confirmed Bug description: I work on the OpenStack-Ansible project and we've noticed that testing jobs on 16.04 take quite a bit longer to complete than on 14.04. They complete within an hour on 14.04 but they normally take 90 minutes or more on 16.04. We use the same version of Ansible with both versions of Ubuntu. After more digging, I tested python performance (using the 'performance' module) on 14.04 (2.7.6) and on 16.04 (2.7.12). There is a significant performance difference between each version of python. That is detailed in a spreadsheet[0]. I began using perf to dig into the differences when running the python performance module and when using Ansible playbooks. CPU migrations (as measured by perf) are doubled in Ubuntu 16.04 when running the same python workloads. I tried changing some of the kerne.sched sysctl configurables but they had very little effect on the results. I compiled python 2.7.12 from source on 14.04 and found the performance to be unchanged there. I'm not entirely sure where the problem might be now. We also have a bug open in OpenStack-Ansible[1] that provides additional detail. Thanks in advance for any help you can provide! [0] https://docs.google.com/spreadsheets/d/18MmptS_DAd1YP3OhHWQqLYVA9spC3xLt4PS3STI6tds/edit?usp=sharing [1] https://bugs.launchpad.net/openstack-ansible/+bug/1637494 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1638695/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp