Source

pypy / pypy / doc / gc_info.rst

Garbage collector configuration

PyPy's default minimark garbage collector is configurable through several environment variables:

PYPY_GC_NURSERY
The nursery size. Defaults to 1/2 of your cache or 4M. Small values (like 1 or 1KB) are useful for debugging.
PYPY_GC_MAJOR_COLLECT
Major collection memory factor. Default is 1.82, which means trigger a major collection when the memory consumed equals 1.82 times the memory really used at the end of the previous major collection.
PYPY_GC_GROWTH
Major collection threshold's max growth rate. Default is 1.4. Useful to collect more often than normally on sudden memory growth, e.g. when there is a temporary peak in memory usage.
PYPY_GC_MAX
The max heap size. If coming near this limit, it will first collect more often, then raise an RPython MemoryError, and if that is not enough, crash the program with a fatal error. Try values like 1.6GB.
PYPY_GC_MAX_DELTA
The major collection threshold will never be set to more than PYPY_GC_MAX_DELTA the amount really used after a collection. Defaults to 1/8th of the total RAM size (which is constrained to be at most 2/3/4GB on 32-bit systems). Try values like 200MB.
PYPY_GC_MIN
Don't collect while the memory size is below this limit. Useful to avoid spending all the time in the GC in very small programs. Defaults to 8 times the nursery.
PYPY_GC_DEBUG
Enable extra checks around collections that are too slow for normal use. Values are 0 (off), 1 (on major collections) or 2 (also on minor collections).
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.