[PyPy-issue] [issue673] Linux L2 cache size

Armin Rigo pypy-dev-issue at codespeak.net
Fri Mar 25 13:07:06 CET 2011


Armin Rigo <armin.rigo at gmail.com> added the comment:

On my Linux machine, on 32-bit, os.sysconf(191) returns 0, and on 64-bit,
os.sysconf(191) returns 262144.  The correct value however is 4MB, which happens
to be the size of the L3 cache here, returned (on 64-bit) by os.sysconf(194). 
So it doesn't look like the one-size-fits-all solution either.

But perhaps more importantly, on modern CPUs like tannit (8MB of L3 cache), the
size of the nursery seems to matter less.  I did not get definitive speed-ups
(at most 5%) between setting it to 1MB, 2MB, 4MB, 6MB, 9MB or 29MB...  Yes, even
if it's *larger* than the L3 cache there is no performance drop.  Go figure.  It
seems that for this kind of CPU we can as well just pick a fixed number like 1
or 2 MB and be happy with it.  Of course, on ARM I'm sure it matters more right
now, as it did 5 years ago on x86.

_______________________________________________________
PyPy development tracker <pypy-dev-issue at codespeak.net>
<https://codespeak.net/issue/pypy-dev/issue673>
_______________________________________________________



More information about the Pypy-issue mailing list