Test data of PostgreSQL running on FreeBSD and Linux

Source: Internet
Author: User

Test data of PostgreSQL running on FreeBSD and Linux

This afternoon I wanted to test DragonFly dports. I suddenly wondered why I didn't compare the performance difference between PostgreSQL in BSD and Linux. For this reason, I set some standards to compare the performance differences on different operating systems. I use the same hardware and software to obtain data more accurately. These tests are based on PGSQL9.1.

I was surprised when I tested it In Debian Linux, so I did another test in Linux, such as CentOS 6.4 of RedHat class.

The following are some of my Tested operating systems:

  • DragonFlyBSD 3.4.1 (Hammer)

  • FreeBSD 9.1-p3 (UFS2 + J)

  • Freeebsd 9.1-p3 (ZFS v28)

  • Debian 7: Wheezy (ext4, kernel 3.2)

  • Debian 7: Wheezy (ext4, kernel 3.2, barrier = 0)

  • Centos 6.4 (ext4, kernel 2.6.32)

  • Centos 6.4 (ext4, kernel 2.6.32, nobarrier)

For the hardware, I use 24 GB memory and a Phenom x6 1055 T processor based on the KVM (libvirt) system. The version is as follows:

qemu 1.4.1-3 libvirt 1.0.5-4

Each virtual machine uses the same configuration:

  • 50 GB hard drive (except FreeBSD)

  • 12 GB memory

  • 4-core CPU

Test now. Command: pgbench-T 60-cX-jX

Perform pgbench instance testing within 60 seconds on the database, using X users and X-ray processes (one thread and one user)

Each database is configured by default and supports simultaneous connection of 300 requests.

------------------------------------ Lili split line ------------------------------------

Install PostgreSQL 6.3 on yum in CentOS 9.3

PostgreSQL cache details

Compiling PostgreSQL on Windows

Configuration and installation of LAPP (Linux + Apache + PostgreSQL + PHP) Environment in Ubuntu

Install and configure phppgAdmin on Ubuntu

Install PostgreSQL9.3 on CentOS

Configure a Streaming Replication cluster in PostgreSQL

------------------------------------ Lili split line ------------------------------------

Part 1: Virtual drivers

The first figure shows the real-time transaction processing capacity, and the second figure shows the transaction volume per second.

 

 

The performance test results are surprising.‍The performance of DragonflyBSD (default Operating System) exceeds that of all other systems, followed by FreeBSD. The performance of DragonflyBSD is 25% higher than that of FreeBSD than that of Linux (s!

We have two Linux systems that far exceed other systems, with a transaction volume of 7000. If you do not consider the number of clients, you still cannot surpass it. The graph is surprisingly uniform. Only Debian does not reach the end point of the test, because the Debian PostgreSQL parameter cannot be modified manually to have 100 connections at the same time.

In fact, these 7000 curves explain that the ext4 barrier system protects the file system, which has very poor performance in PostgreSQL. In the second test, we have added the nobarrier/barrier = 0 option to ext4 (via/etc/fstab ). This option is used to process (debrid) FS, but it is a very risky option. It is used only when you have a 1/5/6 controller of the disk array. When a write operation is completed on your disk, if your server restarts (for example, power failure ......), the file or the entire disk may crash, and if it is in a database instance, the consequences will be miserable.

In short, our FreeBSD work on ZFS makes up for Linux (s). Maybe it is caused by virtualization? Or is the concept of ZFS the problem?

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.