Monday, April 18, 2016

PyPy Enterprise Edition

With the latest additions, PyPy's JIT now supports the Z architecture on Linux. The newest architecture revision (also known as s390x, or colloquially referred to as "big iron") is the 64-bit extension for IBM mainframes. Currently only Linux 64 bit is supported (not z/OS nor TPF).
This is the fourth assembler backend supported by PyPy in addition to x86 (32 and 64), ARM (32-bit only) and PPC64 (both little- and big-endian). It might seem that we kind of get a hang of new architectures. Thanks to IBM for funding this work!

History

When I went to university one lecture covered the prediction of Thomas Watson in 1943. His famous quote "I think there is a world market for maybe five computers ...", turned out not to be true.

However, even 70 years later, mainframes are used more often than you think. They back critical tasks requiring a high level of stability/security and offer high hardware and computational utilization rates by virtualization.

With the new PyPy JIT backend we are happy to present a fast Python virtual machine for mainframes and contribute more free software running on s390x.

Meta tracing

Even though the JIT backend has been tested on PyPy, it is not restricted to  the Python programming language. Do you have a great idea for a DSL, or another language that should run on mainframes? Go ahead and just implement your interpreter using RPython.

How do I get a copy?

PyPy can be built using the usual instructions found here. As soon as the next PyPy version has been released we will provide binaries. Until then you can just grab a nightly here.We are currently busy to get the next version of PyPy ready, so an official release will be rolled out soon.

Comparing s390x to x86

The goal of this comparison is not to scientifically evaluate the benefits/disadvantages on s390x, but rather to see that PyPy's architecture delivers the same benefits as it does on other platforms. Similar to the comparison done for PPC I ran the benchmarks using the same setup. The first column is the speedup of the PyPy JIT VM compared to the speedup of a pure PyPy interpreter 1). Note that the s390x's OS was virtualized.

  Label               x86     s390x      s390x (run 2)

  ai                 13.7      12.4       11.9
  bm_chameleon        8.5       6.3        6.8
  bm_dulwich_log      5.1       5.0        5.1
  bm_krakatau         5.5       2.0        2.0
  bm_mako             8.4       5.8        5.9
  bm_mdp              2.0       3.8        3.8
  chaos              56.9      52.6       53.4
  crypto_pyaes       62.5      64.2       64.2
  deltablue           3.3       3.9        3.6
  django             28.8      22.6       21.7
  eparse              2.3       2.5        2.6
  fannkuch            9.1       9.9       10.1
  float              13.8      12.8       13.8
  genshi_text        16.4      10.5       10.9
  genshi_xml          8.2       7.9        8.2
  go                  6.7       6.2       11.2
  hexiom2            24.3      23.8       23.5
  html5lib            5.4       5.8        5.7
  json_bench         28.8      27.8       28.1
  meteor-contest      5.1       4.2        4.4
  nbody_modified     20.6      19.3       19.4
  pidigits            1.0      -1.1       -1.0
  pyflate-fast        9.0       8.7        8.5
  pypy_interp         3.3       4.2        4.4
  raytrace-simple    69.0     100.9       93.4
  richards           94.1      96.6       84.3
  rietveld            3.2       2.5        2.7
  slowspitfire        2.8       3.3        4.2
  spambayes           5.0       4.8        4.8
  spectral-norm      41.9      39.8       42.6
  spitfire            3.8       3.9        4.3
  spitfire_cstringio  7.6       7.9        8.2
  sympy_expand        2.9       1.8        1.8
  sympy_integrate     4.3       3.9        4.0
  sympy_str           1.5       1.3        1.3
  sympy_sum           6.2       5.8        5.9
  telco              61.2      48.5       54.8
  twisted_iteration  55.5      41.9       43.8
  twisted_names       8.2       9.3        9.7
  twisted_pb         12.1      10.4       10.2
  twisted_tcp         4.9       4.8        5.2


  Geometric mean:    9.31      9.10       9.43


As you can see the benefits are comparable on both platforms.
Of course this is scientifically not good enough, but it shows a tendency. s390x can achieve the same results as you can get on x86.

Are you running your business application on a mainframe? We would love to get some feedback. Join us in IRC tell us if PyPy made your application faster!

plan_rich & the PyPy Team

1) PyPy revision for the benchmarks: 4b386bcfee54

No comments:

Post a Comment

See also PyPy's IRC channel: #pypy at freenode.net, or the pypy-dev mailing list.
If the blog post is old, it is pointless to ask questions here about it---you're unlikely to get an answer.