# HG changeset patch # User Armin Rigo <arigo@tunes.org> # Date 1313679636 -7200 # Thu Aug 18 17:00:36 2011 +0200 # Branch extradoc # Node ID 73c1c9cb6e05d8501173b340db6ea31d55988447 # Parent 76acc3ddca46898cfe3e80b3073cf7bda10a8966 Document the recently discovered low-memory-usage command-line. diff --git a/source/download.txt b/source/download.txt --- a/source/download.txt +++ b/source/download.txt @@ -128,17 +128,24 @@ pypy translate.py -Ojit --backend=cli # only for branch/cli-jit 5. Enjoy Mandelbrot ``:-)`` It takes on the order of half an hour to - finish the translation, and 2 GB of RAM on a 32-bit system - and 4 GB on 64-bit systems. (Do not start a translation on a - machine with insufficient RAM! It will just swap forever.) + finish the translation, and 2.x GB of RAM on a 32-bit system + and 4.x GB on 64-bit systems. (Do not start a translation on a + machine with insufficient RAM! It will just swap forever. See + notes below in that case.) Notes: * It is recommended to use PyPy to do translations, instead of using CPython, - because it is twice as fast. (Using CPython would lower the memory - requirement down to 1.2 GB on 32-bit, 2.4 GB on 64-bit.) - You should just start by downloading an official release of PyPy (with the - JIT). + because it is twice as fast. You should just start by downloading an + official release of PyPy (with the JIT). + +* If RAM usage is a problem, then you can (for now) tweak some parameters + via environment variables and command-line options. The following command + takes a bit more time, but finishes with only using 3.0 GB of RAM (on + Linux 64-bit; probably not much more than 1.5 GB on 32-bit). It should be + noted that it is less than with CPython. :: + + PYPY_GC_MAX_DELTA=200MB pypy --jit loop_longevity=300 ./translate.py -Ojit * Because of ``asmgcroot``, compiling the generated C files containing the JIT is delicate. It requires using either MSVC or gcc with no particularly