PostgreSQL performance on FreeBSD

postgresql-96x96György Vilmos has put together a post evaluating performance of PostgreSQL’s last five releases on a midrange x86 server:

“…’The “Dunnington’ code named CPU’s architecture and the number of CPUs are both an important factor for the OS and the database, because in this CPU a lot of cores are fighting for the spare bandwidth of the FSB, through which the slow memory and peripheral devices are reached. The multi level cache hierarchy and the slow FSB makes a hard job for the OS scheduler and memory allocator, which need to keep the CPUs busy by feeding them the most data from the caches.

This is a hard jobs and FreeBSD isn’t yet at the end of the road (to be honest, it just stepped on it), but here it’s not that important, because we were curious about what database version produce how much performance. Sadly there weren’t too much time and resources for tuning the OS and the databases.

FreeBSD was chosen -along the fact that I like it- because from its ports it’s easy to install various PostgreSQL (and MySQL) versions. The test itself was made with sysbench 0.4.12, and it’S OLTP benchmark on a 1 million row database, which of course fit into the machine’s RAM.
The data was on two 15kRPM SAS HDDs (RAID1), which is far from a heavy loaded database’s storage background, but approximately shows a typical web server environment’s characteristics, where you have to serve from the built in disks….”

He concludes that,

“I think it’s safe to say that if we have known PostgreSQL as a slow beast, it’s time to re-think (or measure) that, because it has gained quite much performance and scalability in the last three years. Not to speak about its features.”

Read the whole post

Thanks, György, for letting me know about your post.

FreeBSD 8.0 vs. Ubuntu 9.10 benchmarks

Some say comparing FreeBSD vs Linux benchmarks is unreliable and is as it were, comparing apples with pears.

For what it’s worth: the Phoronix team has done some FreeBSD 8.0 RC1 vs Ubuntu 9.10 Alpha 6 benchmarking:

Both FreeBSD 8.0 and Ubuntu 9.10 will be included in our upcoming big operating system comparison, but for now we are just focusing upon comparing Ubuntu 9.10 and FreeBSD 8.0, but have also added in FreeBSD 7.2 for reference and to see how the performance of this BSD operating system has changed. With FreeBSD 8.0 we were using the AMD64 DVD of the first release candidate using a stock installation. With Ubuntu 9.10 we were using the x86_64 server CD of the Alpha 6 build. With FreeBSD not shipping with a desktop environment by default, we used the Ubuntu server CD so that both could be tested just from the terminal in a similar environment. All of the FreeBSD and Ubuntu options were left at their defaults. One of the package versions worth noting is that GCC 4.2.1 is used in both FreeBSD 7.2 and FreeBSD 8.0 while Ubuntu 9.10 is using GCC 4.4.1. FreeBSD was also using the default UFS file-system while Ubuntu 9.10 is running with EXT4. Each operating system was tested with its default settings (including any debug options) and packages to test an “out of the box” experience. We will be back with more benchmarks once each of these operating systems have been officially released.

and concludes that,

… more times than not, Ubuntu 9.10 Alpha 6 came out on top compared to FreeBSD — both the 7.2 and 8.0-RC releases. Only in the 7-Zip, C-Ray, John The Ripper MD5, BYTE Unix Benchmark Dhrystone 2, and SQLite tests did FreeBSD outperform Ubuntu Linux. Between FreeBSD 7.2 and 8.0, the newer release generally did better but it had regressed with the 7-Zip, Gzip, MAFFT, and Threaded I/O Tester Read tests. That’s how the story pans out on a dual AMD Opteron quad-core workstation, but shortly we will be back around with our large operating system comparison on different hardware and with the final releases of these different operating systems to see how they compare.

Please note that 1) the inner workings of the two operating systems are different, and 2) neither of the systems are ready for release yet, so a lot of things will change and improve.

EuroBSDCon 2009 – pictures

EuroBSDCon 2009 and the preceding dev summit happened last weekendq in Cambridge, UK. Robert Watson, who has organised this successful event, noted that the FreeBSD Developer’s Summit was the largest yet in the EU with around 70 attendees. The conference was attended by about 180 attendees, and the dinner sponsored by iXsystems was sold out.

Slides, papers, and audio recordings should be available soon on the UKUUG website. Will let you know when they’re up.

Rodrigo Osorio has posted some pictures here and a couple of my eurobsdcon photos here.

View photos

FreeBSD 9.0 feature requests

One of the sessions at EuroBSDCon 2009 DevSummit last week was FreeBSD 9.0 and what the devs would like to see included.

I took pictures of the whiteboard.  What do you think of the request and what else would you want to see included (post your comments)?


Click image to magnify


Click image to magnify


FreeBSD 8.0-RC1 available

The first of the Release Candidates for the FreeBSD-8.0 release cycle is now available, as announced by Ken Smith.

“The first of the Release Candidates for the FreeBSD 8.0 release cycle is now available. How many RC’s we have will depend on how well 8.0-RC1 does. At the moment only one more RC is on the schedule but odds are fairly high we will wind up inserting at least one more RC. Between BETA4 and RC1 a lot of work has gone into IPv6 issues as well as many other issues that have been brought up from the public testing. And a patch set was committed by the people who handle porting ZFS to FreeBSD that they felt makes ZFS production-ready.”

There are still a few problems and outstanding issues, but hopefully they’ll get soon fixed.

FreeBSD 8.0 RC1 ISO images and a “memory stick” image for amd64/i386 architectures are available to download from the project’s mirrors. Users currently running FreeBSD 7.0 or later can upgrade via the freebsd-update utility. The final version of FreeBSD 8.0 is expected to be released in “early October”.

FreeBSD 8.0 – BETA 4 available

freebsd project logo 100x100Ken Smith has announced the fourth and last of the BETA builds for the FreeBSD-8.0 release.

The fourth and most likely final BETA build for the FreeBSD 8.0 release cycle is now available. We expect the next test build to be the first  if the Release Candidates, RC1. Since BETA3 many bugs that were identified from testing done so far were addressed. Some of the bigger issues were an mbuf leak along with work done in the general IPv6, jail, and usb subsystems. Issues in other areas have been addressed as well.

Due to the issues identified in this early phase of testing the schedule for release has been pushed back. The current target for the release itself is September 29th, with two RC builds between now and then. Details about the current target schedule along with much more detail about the current status of the release is available on the FreeBSD 8.0 todo page

ISO images for Tier-1 architectures and a memory stick image for amd64/i386 are now available on most of the FreeBSD mirror sites.

VirtualBox: how to move FreeBSD to a new hard disk

Georges has written a post showing how to move a VirtualBox FreeBSD system to another, larger, VirtualBox drive:

“Let’s say that, like me, you once created a fixed-size virtual disk in VirtualBox, and installed FreeBSD on it. Now you’ve run out of disk space and you’d like to move your FreeBSD to a bigger-sized virtual disk. Here’s how I did it. This procedure was done with VirtualBox 2.0.{4, 6} on Windows XP.

First, with VirtualBox not running, make a backup copy of the whole .VirtualBox folder, just in case.

Start VirtualBox and select your FreeBSD virtual machine.

In Settings, Hard Disks: create a new Hard Disk, fixed-size. As the currently active HD is IDE Primary Master, the new HD will automatically be an IDE Primary Slave.When it’s done, click OK. The FreeBSD VM now has two hard disks. It’s like you’ve just added a new hard disk inside a real machine, a blank unformatted disk, which will be detected as a top-level IDE device (/dev/ad1) by the kernel.”

Go here for all the needed steps

FreeBSD, rock solid and stable (proof)

We all know that FreeBSD is a rock solid, ultra stable and reliable (server) operating system.

Here’s another proof. Nick Rogness reports:

We have recently decommissioned a web server which was running FreeBSD 4.11 on a HP DL380 G3. It was hosting websites for over 20,000 subscribers and was rarely idle for any length of time.

The uptime achieved when we powered it down was 1004 days, 1 hour, 34 minutes, 56 seconds. One of our tech’s took a snapshot of the shutdown screen with his cellphone and is available at if interested.

Yet another example of the stability and reliability of FreeBSD!!
Thanks for all the great work!We have recently decommissioned a web server which was running FreeBSD
4.11 on a HP DL380 G3. It was hosting websites for over 20,000 subscribers and was rarely idle for any length of time.

The uptime achieved when we powered it down was 1004 days, 1 hour, 34 minutes, 56 seconds. One of our tech’s took a snapshot of the shutdown screen with his cellphone …

Yet another example of the stability and reliability of FreeBSD!!

Source (FreeBSD Advocacy Mailinglist)

Finishing up the FreeBSD Xen port

There’s been an active discustion on the FreeBSD Xen mailinglist about finishing the Xen port.

Xen is a virtual machine monitor for IA-32 (x86, x86-64), IA-64 and PowerPC 970 architectures. It allows several guest operating systems to be executed on the same computer hardware concurrently. Xen was initially created by the University of Cambridge Computer Laboratory and is now developed and maintained by the Xen community as free software, licensed under the GNU General Public License (GPL2). (Wikipedia)

The Xen port has never been complete and had some issues. A couple of developers have now decided to get together, get some hardware and financial support toegether to make it happen this time.

For over 3 years we’re now looking at a mostly-working, breaking, half-working port, breaking, half-working of FreeBSD to xen. Personally I think this is a very sad state, especially considering how well FreeBSD (-current, with patches) worked in Xen 2.

I wonder if starting a fundraiser might help this problem. I think we would have to scratch up enough for a month of kip’s (or someone else’s) time to see everything addressed and the xen patches finally being
merged in a same way like NetBSD did it.

Assuming that most people do not very much care about their dom0 OS, but strongly care for running FreeBSD (instead of Linux, NetBSD, Solaris flavours) for their virtualized servers, it would be the best way to go to make almost everyone happy.

… I’m completely sick of having to tell people … that “it used to be working but right now it’s not stable for production use, but it might actually build right now” and point them at one of the above OS according to
their needs, when actually they’d just love FreeBSD.

Honestly, I do not believe this state will *ever* get better without some massive effort and I’m very much looking forward to some discussion about this. It think the support should get -stable’d while the linux kids are still trying to make ZFS work stable :)

What it takes to get the port together is:

  • Initial work to bring -head’s Xen support back to scratch – primarily AFAIK a lot of SMP/PMAP attention
  • backporting that to 8-stable * the decision that Xen should be supported, and enough support showing up to make it happen
  • enough ongoing support and developer interest in keeping it up to date.

FreeBSD Xen wiki