Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Postgresql performance in Linux vs FreeBSD

Status
Not open for further replies.

PriceComparison

Programmer
Oct 24, 2004
6
0
0
US
We have been using Postgresql for many years now...
We have always used it with the native OS it was build from, FreeBSD.
FreeBSD is rock solid stable. Very reliable.

With so many rumors about Linux being faster especialy the 2.6.x kernel, I have decided to give it another try. I have not used Linux in 6 years. The last linux I used was 5.2.

I tried slackware 10.1 and Gentoo 2005.0 both at the same time.
I have used different file system seems rumors has it that JFS is faster than ext3.

After running benchmarks after benchmarks, I concluded Linux 2.6.x kernel is indeed faster. Without much details I would guess Linux is about 30% - 50% faster according to pgbench.

Furthermore I like Gentoo very much since it allows lots of optimizations while compiling.

Stability was not as good as Freebsd. Under heavy loads I have seen hangs and riad drivers are not as stable as Freebsd.

Server performance between intel and amd was also very different. Intel server performance for both pentium 4 and xeon was about the same between Linux and BSD. But AMD cpu shows large speed improvement under Linux.

This is just from my experience that I would like to share for other Postgresql users.

Regards,

Andrew
Online Shopping Starts Here!
 
Hi, Andrew

Now that Solaris 10 is free, have you tried it on that?

Thanks,



William Chadbourne
Oracle DBA
TCMHS
 
FreeBSD is rock solid stable. Very reliable.

I would focus on that fact first, indeed foremost. FreeBSD takes the most conservative approach to making sure your data stays the way you stored it. In my experience, Linux has never been as stable or robust in storage. Also, you will find that a large percentage of PostgreSQL users and developers rely on FreeBSD--much larger than the normal breakdown between Linux/FreeBSD users. That should say something.

Yes, there are cases where Linux 2.6 is faster than FreeBSD, although I find some of the benchmarks suspect. For one, FreeBSD ships with some very conservative default settings in the kernel. A few /etc/sysctl.conf settings and even a kernel recompile can fix those.

Also, did you install PostgreSQL from source on each platform, or did you use the standard package manager for each? It's quite possible that the Linux system might have tweaked a few settings in postgreql.conf that are not tweaked in FreeBSD.

Finally, you should check into FreeBSD 5.4, which is almost out, and into the possibility of using the ULE scheduler in the kernel, which provides some serious performance increases.
 
I am very curious how dragonfly would behave as a database server. Haven't seen one benchmark yet.
So, when you've got a not-so-busy-fridayafternoon..... and let us know :)

.... oh, you like to enyoy you weekend ... well I like to enyoy your results... Were can I stick it? It's dark over there...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top