A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/attachments/20150822/ad325a70/attachment.html below:

<div dir="ltr"><div>How about we first add a new Makefile target that enables PGO, without turning it on by default? Then later we can enable it by default.<br><br></div>Also, I have my doubts about regrtest. How sure are we that it represents a typical Python load? Tests are often using a different mix of operations than production code.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Aug 22, 2015 at 7:46 AM, Patrascu, Alecsandru <span dir="ltr"><<a href="mailto:alecsandru.patrascu@intel.com" target="_blank">alecsandru.patrascu@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
<br>
This is Alecsandru from Server Scripting Languages Optimization team at Intel Corporation.<br>
<br>
I would like to submit a request to turn-on Profile Guided Optimization or PGO as the default build option for Python (both 2.7 and 3.6), given its performance benefits on a wide variety of workloads and hardware.  For instance, as shown from attached sample performance results from the Grand Unified Python Benchmark, >20% speed up was observed.  In addition, we are seeing 2-9% performance boost from OpenStack/Swift where more than 60% of the codes are in Python 2.7. Our analysis indicates the performance gain was mainly due to reduction of icache misses and CPU front-end stalls.<br>
<br>
Attached is the Makefile patches that modify the all build target and adds a new one called "disable-profile-opt". We built and tested this patch for Python 2.7 and 3.6 on our Linux machines (CentOS 7/Ubuntu Server 14.04, Intel Xeon Haswell/Broadwell with 18/8 cores).  We use "regrtest" suite for training as it provides the best performance improvement.  Some of the test programs in the suite may fail which leads to build fail.  One solution is to disable the specific failed test using the "-x " flag (as shown in the patch)<br>
<br>
Steps to apply the patch:<br>
1.  hg clone <a href="https://hg.python.org/cpython" rel="noreferrer" target="_blank">https://hg.python.org/cpython</a> cpython<br>
2.  cd cpython<br>
3.  hg update 2.7 (needed for 2.7 only)<br>
4.  Copy *.patch to the current directory<br>
5.  patch < python2.7-pgo.patch (or patch < python3.6-pgo.patch)<br>
6.  ./configure<br>
7.  make<br>
<br>
To disable PGO<br>
7b. make disable-profile-opt<br>
<br>
In the following, please find our sample performance results from latest XEON machine, XEON Broadwell EP.<br>
Hardware (HW):  Â  Â  Intel XEON (Broadwell) 8 Cores<br>
<br>
BIOS settings:  Â  Â  Intel Turbo Boost Technology: false<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Hyper-Threading: false<br>
<br>
Operating System:  Â Ubuntu 14.04.3 LTS trusty<br>
<br>
OS configuration:  Â CPU freq set at fixed: 2.6GHz by<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  echo 2600000 > /sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  echo 2600000 > /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Address Space Layout Randomization (ASLR) disabled (to reduce run to run variation) by<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  echo 0 > /proc/sys/kernel/randomize_va_space<br>
<br>
GCC version:  Â  Â  Â  gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)<br>
<br>
Benchmark:  Â  Â  Â  Â  Grand Unified Python Benchmark (GUPB)<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  GUPB Source: <a href="https://hg.python.org/benchmarks/" rel="noreferrer" target="_blank">https://hg.python.org/benchmarks/</a><br>
<br>
Python2.7 results:<br>
  Â  Python source: hg clone <a href="https://hg.python.org/cpython" rel="noreferrer" target="_blank">https://hg.python.org/cpython</a> cpython<br>
  Â  Python Source: hg update 2.7<br>
  Â  hg id: 0511b1165bb6 (2.7)<br>
  Â  hg id -r 'ancestors(.) and tag()': 15c95b7d81dc (2.7) v2.7.10<br>
  Â  hg --debug id -i: 0511b1165bb6cf40ada0768a7efc7ba89316f6a5<br>
<br>
  Â  Â  Â  Benchmarks  Â  Â  Â  Â  Speedup(%)<br>
  Â  Â  Â  simple_logging  Â  Â  20<br>
  Â  Â  Â  raytrace  Â  Â  Â  Â  Â  20<br>
  Â  Â  Â  silent_logging  Â  Â  19<br>
  Â  Â  Â  richards  Â  Â  Â  Â  Â  19<br>
  Â  Â  Â  chaos  Â  Â  Â  Â  Â  Â  Â 16<br>
  Â  Â  Â  formatted_logging  Â 16<br>
  Â  Â  Â  json_dump  Â  Â  Â  Â  Â 15<br>
  Â  Â  Â  hexiom2  Â  Â  Â  Â  Â  Â 13<br>
  Â  Â  Â  pidigits  Â  Â  Â  Â  Â  12<br>
  Â  Â  Â  slowunpickle  Â  Â  Â  12<br>
  Â  Â  Â  django_v2  Â  Â  Â  Â  Â 12<br>
  Â  Â  Â  unpack_sequence  Â  Â 11<br>
  Â  Â  Â  float  Â  Â  Â  Â  Â  Â  Â 11<br>
  Â  Â  Â  mako  Â  Â  Â  Â  Â  Â  Â  11<br>
  Â  Â  Â  slowpickle  Â  Â  Â  Â  11<br>
  Â  Â  Â  fastpickle  Â  Â  Â  Â  11<br>
  Â  Â  Â  django  Â  Â  Â  Â  Â  Â  11<br>
  Â  Â  Â  go  Â  Â  Â  Â  Â  Â  Â  Â  10<br>
  Â  Â  Â  json_dump_v2  Â  Â  Â  10<br>
  Â  Â  Â  pathlib  Â  Â  Â  Â  Â  Â 10<br>
  Â  Â  Â  regex_compile  Â  Â  Â 10<br>
  Â  Â  Â  pybench  Â  Â  Â  Â  Â  Â 9.9<br>
  Â  Â  Â  etree_process  Â  Â  Â 9<br>
  Â  Â  Â  regex_v8  Â  Â  Â  Â  Â  8<br>
  Â  Â  Â  bzr_startup  Â  Â  Â  Â 8<br>
  Â  Â  Â  2to3  Â  Â  Â  Â  Â  Â  Â  8<br>
  Â  Â  Â  slowspitfire  Â  Â  Â  8<br>
  Â  Â  Â  telco  Â  Â  Â  Â  Â  Â  Â 8<br>
  Â  Â  Â  pickle_list  Â  Â  Â  Â 8<br>
  Â  Â  Â  fannkuch  Â  Â  Â  Â  Â  8<br>
  Â  Â  Â  etree_iterparse  Â  Â 8<br>
  Â  Â  Â  nqueens  Â  Â  Â  Â  Â  Â 8<br>
  Â  Â  Â  mako_v2  Â  Â  Â  Â  Â  Â 8<br>
  Â  Â  Â  etree_generate  Â  Â  8<br>
  Â  Â  Â  call_method_slots  Â 7<br>
  Â  Â  Â  html5lib_warmup  Â  Â 7<br>
  Â  Â  Â  html5lib  Â  Â  Â  Â  Â  7<br>
  Â  Â  Â  nbody  Â  Â  Â  Â  Â  Â  Â 7<br>
  Â  Â  Â  spectral_norm  Â  Â  Â 7<br>
  Â  Â  Â  spambayes  Â  Â  Â  Â  Â 7<br>
  Â  Â  Â  fastunpickle  Â  Â  Â  6<br>
  Â  Â  Â  meteor_contest  Â  Â  6<br>
  Â  Â  Â  chameleon  Â  Â  Â  Â  Â 6<br>
  Â  Â  Â  rietveld  Â  Â  Â  Â  Â  6<br>
  Â  Â  Â  tornado_http  Â  Â  Â  5<br>
  Â  Â  Â  unpickle_list  Â  Â  Â 5<br>
  Â  Â  Â  pickle_dict  Â  Â  Â  Â 4<br>
  Â  Â  Â  regex_effbot  Â  Â  Â  3<br>
  Â  Â  Â  normal_startup  Â  Â  3<br>
  Â  Â  Â  startup_nosite  Â  Â  3<br>
  Â  Â  Â  etree_parse  Â  Â  Â  Â 2<br>
  Â  Â  Â  call_method_unknown 2<br>
  Â  Â  Â  call_simple  Â  Â  Â  Â 1<br>
  Â  Â  Â  json_load  Â  Â  Â  Â  Â 1<br>
  Â  Â  Â  call_method  Â  Â  Â  Â 1<br>
<br>
Python3.6 results<br>
  Â  Python source: hg clone <a href="https://hg.python.org/cpython" rel="noreferrer" target="_blank">https://hg.python.org/cpython</a> cpython<br>
  Â  hg id: 96d016f78726 tip<br>
  Â  hg id -r 'ancestors(.) and tag()': 1a58b1227501 (3.5) v3.5.0rc1<br>
  Â  hg --debug id -i: 96d016f78726afbf66d396f084b291ea43792af1<br>
<br>
<br>
  Â  Â  Â  Benchmark  Â  Â  Â  Â  Â Speedup(%)<br>
  Â  Â  Â  fastunpickle  Â  Â  Â  22.94<br>
  Â  Â  Â  fastpickle  Â  Â  Â  Â  21.67<br>
  Â  Â  Â  json_load  Â  Â  Â  Â  Â 17.64<br>
  Â  Â  Â  simple_logging  Â  Â  17.49<br>
  Â  Â  Â  meteor_contest  Â  Â  16.67<br>
  Â  Â  Â  formatted_logging  Â 15.33<br>
  Â  Â  Â  etree_process  Â  Â  Â 14.61<br>
  Â  Â  Â  raytrace  Â  Â  Â  Â  Â  13.57<br>
  Â  Â  Â  etree_generate  Â  Â  13.56<br>
  Â  Â  Â  chaos  Â  Â  Â  Â  Â  Â  Â 12.09<br>
  Â  Â  Â  hexiom2  Â  Â  Â  Â  Â  Â 12<br>
  Â  Â  Â  nbody  Â  Â  Â  Â  Â  Â  Â 11.88<br>
  Â  Â  Â  json_dump_v2  Â  Â  Â  11.24<br>
  Â  Â  Â  richards  Â  Â  Â  Â  Â  11.02<br>
  Â  Â  Â  nqueens  Â  Â  Â  Â  Â  Â 10.96<br>
  Â  Â  Â  fannkuch  Â  Â  Â  Â  Â  10.79<br>
  Â  Â  Â  go  Â  Â  Â  Â  Â  Â  Â  Â  10.77<br>
  Â  Â  Â  float  Â  Â  Â  Â  Â  Â  Â 10.26<br>
  Â  Â  Â  regex_compile  Â  Â  Â 9.8<br>
  Â  Â  Â  silent_logging  Â  Â  9.63<br>
  Â  Â  Â  pidigits  Â  Â  Â  Â  Â  9.58<br>
  Â  Â  Â  etree_iterparse  Â  Â 9.48<br>
  Â  Â  Â  2to3  Â  Â  Â  Â  Â  Â  Â  8.44<br>
  Â  Â  Â  regex_v8  Â  Â  Â  Â  Â  8.09<br>
  Â  Â  Â  regex_effbot  Â  Â  Â  7.88<br>
  Â  Â  Â  call_simple  Â  Â  Â  Â 7.63<br>
  Â  Â  Â  tornado_http  Â  Â  Â  7.38<br>
  Â  Â  Â  etree_parse  Â  Â  Â  Â 4.92<br>
  Â  Â  Â  spectral_norm  Â  Â  Â 4.72<br>
  Â  Â  Â  normal_startup  Â  Â  4.39<br>
  Â  Â  Â  telco  Â  Â  Â  Â  Â  Â  Â 3.88<br>
  Â  Â  Â  startup_nosite  Â  Â  3.7<br>
  Â  Â  Â  call_method  Â  Â  Â  Â 3.63<br>
  Â  Â  Â  unpack_sequence  Â  Â 3.6<br>
  Â  Â  Â  call_method_slots  Â 2.91<br>
  Â  Â  Â  call_method_unknown 2.59<br>
  Â  Â  Â  iterative_count  Â  Â 0.45<br>
  Â  Â  Â  threaded_count  Â  Â  -2.79<br>
<br>
<br>
Thank you,<br>
Alecsandru<br>
<br>_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/guido%40python.org" rel="noreferrer" target="_blank">https://mail.python.org/mailman/options/python-dev/guido%40python.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div>

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4