Regarding the various kernel bottlenecks, have there been any tests with
Google's malloc (libtcmalloc)? Perhaps PostgreSQL isn't heavily threaded
enough to make a difference, but on one of our heavily threaded applications
(unrelated to Postgres), it made a night and day difference. Instead of
memory and CPU usage growing and growing, both stabilized quickly at less
than half of what the linux malloc produced. Linux (2.6) RH malloc stinks
in heavily threaded applications. The benchmark that got us looking at this
was a MySQL benchmark showing performance scaling by number of threads on
various linux operating systems. The difference in our application by
simply relinking at run time (LD_PRELOAD) with libtcmalloc was astounding.
Wes