In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Today, I will talk to you about the test data of PostgreSQL running on FreeBSD and Linux, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
I wanted to test DragonFly dports this afternoon, but suddenly I wondered why not compare the performance of PostgreSQL under BSD and Linux. To this end, I have set some standards to compare the performance differences on different operating systems. I use the same hardware and software to get the data more accurately. These tests are based on PGSQL9.1.
When I tested it under Debian Linux, I was surprised by the results, so I tested it on other Linux systems, such as Redhat-like Centos6.4.
Here are some of the operating systems I tested:
DragonFlyBSD 3.4.1 (Hammer)
FreeBSD 9.1-p3 (UFS2+J)
FreeBSD 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 part, I used 24 gigabytes of memory based on the KVM (libvirt) system and a Phenom x6 1055T processor. The version is as follows:
Qemu 1.4.1-3 libvirt 1.0.5-4
Each virtual machine uses the same configuration:
50GB hard drive (except FreeBSD)
12GB memory
4-core CPU
Now test. The command follows: pgbench-T 60-cX-jX
Do pgbench instance testing on the database within 60 seconds, using X users and X threads (one thread per user)
Each database is the default configuration and supports 300 simultaneous connections
* part: virtual driver
The * figures show the real-time transaction volume, and the second chart shows the transaction volume per second.
The results of the performance tests are surprising. DragonflyBSD (the default operating system) outperforms all other systems, followed by FreeBSD. The performance of DragonflyBSD is 25% higher than that of FreeBSD and 200% higher than that of Linux (s)!
We have two Linux that far exceed other systems, reaching 7000 transaction capacity. If you don't consider the number of clients, you still can't surpass it. The graph is surprisingly unified. Only Debian did not reach the end of the test, because Debian PostgreSQL cannot have 100 connections at the same time without manually modifying the parameter.
In fact, these 7000 curves explain the poor performance of file systems protected by ext4 fence system (barrier system) on PostgreSQL. In the second test, we have added the nobarrier/barrier=0 option (through / etc/fstab) to ext4. This option deals with (debrid) FS, but it is a very risky option. Use a disk array only if you have a 1-5-6 controller. When a write operation is completed on your disk, if your server is restarted (for example, a power failure.), the file or the entire disk may crash, and if you are in the database instance, the consequences will be very tragic.
In short, our FreeBSD's work on ZFS makes up for Linux (s). Maybe it's because of virtualization? Or is the problem with the concept of ZFS?
Part II: physical drives
In order to verify our research results, we realized that the same benchmark on the physical drive. I only maintain performance with optimization, in addition to ZFS, there must be a point in this support for comparison. Centos is removed here because its performance is not much different from that of Debian.
* the graph is the amount of processing per minute:
The second graph shows the amount of processing per second:
The performance of DragonFlyBSD is very close between physical and virtual, and we can say that the driver of virtio is very good. Debian has the same problem with 50000 requests per minute.
There are two things you should pay attention to:
UFS performance (async and noatime options), double or triple performance, but you must also guarantee ext4 (nobarrier option)
By setting the sync=disabled and atime=off options, ZFS increases performance by about 10-15, outperforming all other FS and the combined performance it provides. In addition, the sync=disabled option is less dangerous than the nobarrier/async option.
ZFS is the * of this physical indicator.
You can take a look at the following link to the exact benchmark data:
Benchmarks-PostGreSQL
*, if you choose a system for your PostgreSQL database, don't hesitate to use BSD. Even if you don't have a disk array controller, you can choose FreeBSD (UFS) or DragonFlyBSD (Hammer), followed by Linux.
After reading the above, do you have any further understanding of the test data of PostgreSQL running on FreeBSD and Linux? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.