Re: Linux vs FreeBSD - Mailing list pgsql-general

From Amitabh Kant
Subject Re: Linux vs FreeBSD
Date
Msg-id CAPTAQB+3+cAFAYt8zceeSyEQgFpY-jzt6KVF1C7zJLXE4L3j4A@mail.gmail.com
Whole thread Raw
In response to Linux vs FreeBSD  (François Beausoleil <francois@teksol.info>)
List pgsql-general

On Fri, Apr 4, 2014 at 9:33 AM, François Beausoleil <francois@teksol.info> wrote:
Hi all!

Does PG perform that much better on FreeBSD? I have some performance issues on a Ubuntu 12.04 which I'd like to resolve. iowait varies a lot, between 5 and 50%. Does FreeBSD better schedule I/O, which could alleviate some of the issues, or not at all? I have no experience administering FreeBSD, but I'm willing to learn if I'll get some performance enhancements out of the switch.

Our workload is lots of data import, followed by many queries to summarize (daily and weekly reports). Our main table is a wide table that represents Twitter and Facebook interactions. Most of our reports work on a week's worth of data (table is partitioned by week), and the tables are approximately 25 GB plus 5 GB of indices, per week. Of course, while reports are ongoing, we're also importing next week's data.

The host is a dedicated hardware machine at online.fr: 128 GB RAM, 2 x 3TB disk in RAID 1 configuration.

I started thinking of this after reading "PostgreSQL pain points" at https://lwn.net/Articles/591723/. In the comments, bronson says FreeBSD does not exhibit the same problems (slow fsync, double buffering). On the list here, I've read about problems with certain kernel versions on Ubuntu.

I'm not expecting anything magical, just some general guidelines and hints. Did anybody do the migration and was happier after?

Thanks for any hints!
François Beausoleil

$ uname -a
Linux munn.ca.seevibes.com 3.2.0-58-generic #88-Ubuntu SMP Tue Dec 3 17:37:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

$ psql -U postgres -c "select version()"
                                                   version
-------------------------------------------------------------------------------------------------------------
 PostgreSQL 9.1.11 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 64-bit

/proc/cpuinfo says: 8 CPUs, identified as "Intel(R) Xeon(R) CPU E5-2609 0 @ 2.40GHz"



Cannot give you a comparison, but running couple of dedicated PG servers (9.1 & 9.2) on FreeBSD 9.x. Not seen much of a problem, apart from tuning some sysctl variables for higher memory usage. My hardware uses either SAS or SSD disks. RAM varies between 32 to 128 GB between various servers. My workload is more of lots of small read and writes. 

Amitabh


pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: Linux vs FreeBSD
Next
From: Achilleas Mantzios
Date:
Subject: Re: Linux vs FreeBSD