Re: Linux v.s. Mac OS-X Performance - Mailing list pgsql-general

From Greg Smith
Subject Re: Linux v.s. Mac OS-X Performance
Date
Msg-id Pine.GSO.4.64.0711300030470.19500@westnet.com
Whole thread Raw
In response to Re: Linux v.s. Mac OS-X Performance  (Wes <wespvp@msg.bt.com>)
List pgsql-general
On Thu, 29 Nov 2007, Wes wrote:

> Perhaps PostgreSQL isn't heavily threaded enough to make a difference

PostgreSQL doesn't use threads at all; it forks processes.  See 1.14 in
http://www.postgresql.org/docs/faqs.FAQ_DEV.html

> The benchmark that got us looking at this was a MySQL benchmark showing
> performance scaling by number of threads on various linux operating
> systems.

Presumably you mean this one:  http://ozlabs.org/~anton/linux/sysbench/

The threading/malloc issues in MySQL are so awful that similar approaches
have already been suggested for other operating systems.  Check out
http://developers.sun.com/solaris/articles/mysql_perf_tune.html for
comments about this under Solaris for example.

The fact that PostgreSQL scalability doesn't fall off like this suggests
it doesn't have this particular issue.  Note that the curve in that
sysbench run is awfully similar to the MySQL results at
http://tweakers.net/reviews/649/7 (just shifted to the right because there
are many more cores in that system).  Then look at their PostgreSQL
results running the same test.  Forgive the error where they state
"PostgreSQL might be called a textbook example of a good implementation of
multithreading"; it's actually a good multi-process implementation.
Interestingly, those results are from a Solaris system.

It's good to know about the Google perftools allocator, as there are
plenty of client applications that could benefit as yours has from this
technique (like the multi-threaded C++ apps it appears aimed at).  I just
wouldn't expect it to be a big win for the PostgreSQL server itself.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD

pgsql-general by date:

Previous
From: "Trevor Talbot"
Date:
Subject: Re: 8.2.3: Server crashes on Windows using Eclipse/Junit
Next
From: Robert Treat
Date:
Subject: Re: Tools for dumping pg_xlog, pg_clog, etc?