During my PGCon 2009 presentation there was a question on the saw tooth nature of the workload results on the high end side of benchmark runs. To which Matthew Wilcox (from Intel) commented it could be scheduler related. I did not give it much thought at that time till today when I was trying to do some iGen runs for the JDBC Binary Transfer patch (more on that in another blog post) and also Simon's read only scalability runs . Then I realized that I was not following one of my one tuning advice for running Postgres on OpenSolaris. The advice is to  use FX Class of scheduler instead of the default TS Class on OpenSolaris . More details on various scheduler classes can be found on docs.sun.com.

Now how many times I have forgotten to do that with Postgres on OpenSolaris I have no idea. But yes it is highly recommended specially on multi-core systems to use FX scheduler class for Postgres on OpenSolaris. How much gain are we talking about? The following graph will give an indication using the default TS scheduler class Vs the FX Scheduler class using the iGen benchmark.

The gain is about 14% by just switching over to FX Class. How did I get Postgres server instance to use FX class? I cheated and put all processes of the user (with userid 236177)  in FX class using the following command line.

# priocntl -s -c FX -i uid 236177

One thing to figure out is how to make sure Postgres uses FX scheduler class out of the box on OpenSolaris so I don't keep forgetting about that minute performance tip.





Comments:

If you are launching Postgres via SMF, you can change the exec string to be "priocntl -e -c FX /the/path args"

Posted by William Hathaway on May 28, 2009 at 06:49 AM EDT #

I think the scheduler class should be specified via project(4) given that: a) scheduler class resource controls exist that can be specified via project(4), b) a project can be specified for a service's methods via the method_context(5).

Posted by Nico on June 08, 2009 at 08:35 PM EDT #

Post a Comment:
  • HTML Syntax: NOT allowed

This blog copyright 2009 by Jignesh Shah