[pypy-commit] pypy default: For minimark, use by default 4MB for the nursery size, instead of
arigo
noreply at buildbot.pypy.org
Fri Dec 9 14:16:47 CET 2011
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r50323:4c10a84a7da0
Date: 2011-12-09 14:14 +0100
http://bitbucket.org/pypy/pypy/changeset/4c10a84a7da0/
Log: For minimark, use by default 4MB for the nursery size, instead of
half the number found by poking in /proc/cpuinfo, which may be a bit
bogus. Also, nowadays, that rule seems wrong, in the sense that we
need at least a few MBs to get good results, and increasing it
doesn't change a lot.
diff --git a/pypy/rpython/memory/gc/minimark.py b/pypy/rpython/memory/gc/minimark.py
--- a/pypy/rpython/memory/gc/minimark.py
+++ b/pypy/rpython/memory/gc/minimark.py
@@ -2,8 +2,7 @@
Environment variables can be used to fine-tune the following parameters:
- PYPY_GC_NURSERY The nursery size. Defaults to half the size of
- the L2 cache. Try values like '1.2MB'. Small values
+ PYPY_GC_NURSERY The nursery size. Defaults to '4MB'. Small values
(like 1 or 1KB) are useful for debugging.
PYPY_GC_MAJOR_COLLECT Major collection memory factor. Default is '1.82',
@@ -61,7 +60,7 @@
#
# * young objects: allocated in the nursery if they are not too large, or
# raw-malloced otherwise. The nursery is a fixed-size memory buffer of
-# half the size of the L2 cache. When full, we do a minor collection;
+# 4MB by default. When full, we do a minor collection;
# the surviving objects from the nursery are moved outside, and the
# non-surviving raw-malloced objects are freed. All surviving objects
# become old.
@@ -329,7 +328,8 @@
# size (needed to handle mallocs just below 'large_objects') but
# hacking at the current nursery position in collect_and_reserve().
if newsize <= 0:
- newsize = env.estimate_best_nursery_size()
+ newsize = 4*1024*1024 # fixed to 4MB by default
+ # (it was env.estimate_best_nursery_size())
if newsize <= 0:
newsize = defaultsize
if newsize < minsize:
More information about the pypy-commit
mailing list