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 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