Alan Cox alan.l.cox at
Tue Aug 19 00:26:46 UTC 2008

I'm sorry for not responding to your earlier message, but I was swamped with

On Sun, Aug 17, 2008 at 7:40 AM, Ivan Voras <ivoras at> wrote:

> hi,
> I'm interested in trying superpages and I have some questions about it:
> - In what state is the current work? (enabled by default?)

Superpages are not enabled by default but support for them is a standard
part of the amd64 and i386 kernel on HEAD.  You can enable superpages on
either of those architectures by simply setting  the tunable
vm.pmap.pg_ps_enabled to a non-zero value at boot time.

In general, I would strongly encourage people to enable superpages if their
system uses Pentium 4, Core 2, or AMD tri/quad-core ("k10") processors.  On
these processors, superpages may or may not help your application's
performance, but they are very unlikely to ever hurt it. Single/dual-core
Opterons and Athlon 64s ("k8") work fine.  In fact, I did most of the
development on Opterons.  However, it's "50-50" whether or not a given
application will speed up or slow down on a k8-family processor because of
their small TLB for large page mappings.

It's worth mentioning that there are other secondary benefits to
superpages.  They reduce the memory consumed by pv entries ("reverse
physical to virtual mappings"), and they reduce the cost of forking an
address space.

I may enable superpages by default on amd64 in the near future.  I haven't

> - Are superpages available for i386 (I remember that in the early days
> they were AMD64-only)

There are a few improvements in the amd64 implementation that haven't made
their way to i386 yet, but the i386 implementation is solid.

> - What kinds of loads would they help the most? I'm specifically interested
> in web servers so lots of IPC between apache, php and database.

The performance benefits are a function of two parameters: The first being
the underlying machine, mainly, the structure of its TLB.  The second has to
do with the application's memory access patterns.  Roughly speaking,
applications that use a large amount of memory will benefit, but there are
other factors.  (See my paper at http://*TLB*.pdf for more details.)


More information about the freebsd-current mailing list