Which Database is Better for Zabbix? PostgreSQL vs MySQL. Yoshiharu Mori SRA OSS Inc. Japan



Similar documents
How To Monitor A Server With Zabbix

Performance test report

A Comparison of Oracle Performance on Physical and VMware Servers

MySQL: Cloud vs Bare Metal, Performance and Reliability

A Comparison of Oracle Performance on Physical and VMware Servers

Cloud Performance Benchmark Series

Configuring Apache Derby for Performance and Durability Olav Sandstå

Drupal Performance Tuning

ABC of Zabbix Performance Tuning

DMS Performance Tuning Guide for SQL Server

Java DB Performance. Olav Sandstå Sun Microsystems, Trondheim, Norway Submission ID: 860

This document will list the ManageEngine Applications Manager best practices

Zabbix for Hybrid Cloud Management

Best Practices for Using MySQL in the Cloud

Configuring Apache Derby for Performance and Durability Olav Sandstå

PGCon PostgreSQL Performance Pitfalls

How to Optimize the MySQL Server For Performance

The Cost of the Cloud. Steve Saporta CTO, SwipeToSpin Mar 20, 2015

ZABBIX. An Enterprise-Class Open Source Distributed Monitoring Solution. Takanori Suzuki MIRACLE LINUX CORPORATION October 22, 2009

Apache Derby Performance. Olav Sandstå, Dyre Tjeldvoll, Knut Anders Hatlen Database Technology Group Sun Microsystems

CentOS Linux 5.2 and Apache 2.2 vs. Microsoft Windows Web Server 2008 and IIS 7.0 when Serving Static and PHP Content

Choosing Storage Systems

Outline. Failure Types

Performance Tuning and Optimizing SQL Databases 2016

PostgreSQL Performance Characteristics on Joyent and Amazon EC2

CDH installation & Application Test Report

E-commerce is also about

METAARCHIVE & CLOUD COMPUTING

Optimising the Mapnik Rendering Toolchain

owncloud Enterprise Edition on IBM Infrastructure

Best Practices for Monitoring Databases on VMware. Dean Richards Senior DBA, Confio Software

Virtuoso and Database Scalability

Hardware Recommendations

Table of Contents. Overview... 1 Introduction... 2 Common Architectures Technical Challenges with Magento ChinaNetCloud's Experience...

PERFORMANCE ENHANCEMENTS IN TreeAge Pro 2014 R1.0

Cloud Computing Workload Benchmark Report

<Insert Picture Here> Adventures in Middleware Database Abuse

Magento & Zend Benchmarks Version 1.2, 1.3 (with & without Flat Catalogs)

Technology and Cost Considerations for Cloud Deployment: Amazon Elastic Compute Cloud (EC2) Case Study

Audit & Tune Deliverables

SQL Server Performance Tuning and Optimization

In and Out of the PostgreSQL Shared Buffer Cache

GraySort on Apache Spark by Databricks

Parallel Replication for MySQL in 5 Minutes or Less

Zabbix. At Scale. By Steve Mushero September, Running the World s Internet Servers. Copyright 2014 ChinaNetCloud

Deep Dive: Maximizing EC2 & EBS Performance

PZVM1 Administration Guide. V1.1 February 2014 Alain Ganuchaud. Page 1/27

Introduction. Part I: Finding Bottlenecks when Something s Wrong. Chapter 1: Performance Tuning 3

LARGE-SCALE DATA STORAGE APPLICATIONS

32-bit and 64-bit BarTender. How to Select the Right Version for Your Needs WHITE PAPER

Benchmarking FreeBSD. Ivan Voras

Novell File Reporter 2.5 Who Has What?

OS Installation Guide Red Hat Linux 9.0

Microsoft SQL Server: MS Performance Tuning and Optimization Digital

Very Large Enterprise Network, Deployment, Users

Whitepaper: performance of SqlBulkCopy

Amazon EC2 XenApp Scalability Analysis

Applications Manager Best Practices document

BOA BARRACUDA ON ÆGIR ~ MY FIRST YEAR ~ Mladen

Sawmill Log Analyzer Best Practices!! Page 1 of 6. Sawmill Log Analyzer Best Practices

Introduction. AppDynamics for Databases Version Page 1

1.0 Hardware Requirements:

Monitoring Databases on VMware

Lessons Learned while Pushing the Limits of SecureFile LOBs. by Jacco H. Landlust. zondag 3 maart 13

Capacity Planning for Microsoft SharePoint Technologies

GeoCloud Project Report GEOSS Clearinghouse

TPCC-UVa: An Open-Source TPC-C Implementation for Parallel and Distributed Systems

Maximizing SQL Server Virtualization Performance

HW9 WordPress & Google Analytics

Performance and scalability of a large OLTP workload

Characterize Performance in Horizon 6

VirtualCenter Database Performance for Microsoft SQL Server 2005 VirtualCenter 2.5

Secure Web. Hardware Sizing Guide

PERFORMANCE TUNING IN MICROSOFT SQL SERVER DBMS

OVERVIEW Methodology Objectives Terminology Recommended Test Protocol... 3 CLOUD SERVICES VS. DEDICATED HOSTING...

Enterprise Network Deployment, 10,000 25,000 Users

PEPPERDATA IN MULTI-TENANT ENVIRONMENTS

McAfee MOVE AntiVirus Multi-Platform 3.5.0

Crank Your BI Performance up to 11 - Sizing, Tuning & Performance Testing. Innovation Center Network, Silicon Valley Active Global Support

GeoCloud Project Report USGS/EROS Spatial Data Warehouse Project

Architecting for the next generation of Big Data Hortonworks HDP 2.0 on Red Hat Enterprise Linux 6 with OpenJDK 7

ENTERPRISE-CLASS MONITORING SOLUTION FOR EVERYONE ALL-IN-ONE OPEN-SOURCE DISTRIBUTED MONITORING

How to Install SMTPSwith Mailer on Centos Server/VPS

INUVIKA OVD INSTALLING INUVIKA OVD ON RHEL 6

Open Source DBMS CUBRID 2008 & Community Activities. Byung Joo Chung bjchung@cubrid.com

Liferay Portal Performance. Benchmark Study of Liferay Portal Enterprise Edition

Database Management System Choices. Introduction To Database Systems CSE 373 Spring 2013

Best Practices for Optimizing SQL Server Database Performance with the LSI WarpDrive Acceleration Card

Pervasive PSQL Vx Server Licensing

Optimizing TYPO3 performance

PostgreSQL when it s not your job. Christophe Pettus PostgreSQL Experts, Inc. DjangoCon US 2012

Altiris Monitor Pack for Servers 7.1 SP2 from Symantec Release Notes

Transcription:

Which Database is Better for Zabbix? PostgreSQL vs MySQL Yoshiharu Mori SRA OSS Inc. Japan

About Myself Yoshiharu Mori Belongs To: SRA OSS,Inc.Japan Division: OSS technical Group Providing support and consulting services for 30 or more kind of OSS Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 2

Zabbix experience We started Zabbix support service from 2011 Last year, we joined Zabbix patnership program. Our company systems is monitored by Zabbix. We design the monitoring system of our customer s. o Over 100 devices o Including virtulization system (vcenter /ESXi) Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 3

Agenda Introduction Simple test large number of items Partitioning test large number of items with Partitioning Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 4

Which database engine are you using for Zabbix? Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 5

PostgreSQL is Slow? The Performance of PG was improved from 9.2! Compared with PG9.1 o Read Query 4x Faster o Write Query 5x Faster Reference: PostgreSQL 9.2 release news http://www.postgresql.org/about/news/1415/ Robert Haas@PGcon2012 Performance Improvement in PostgreSQL 9.2 http://www.pgcon.org/2012/schedule/events/416.en.html Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 6

MySQL vs PostgreSQL Zabbix benchmark with MySQL and PostgreSQL Environment o Amazon EC2 M1 medium instance o 3.75 Gib RAM o 2ECU (1 core) o 410 GB instance storage o OS: Amazon Linux AMI 2013.03 (64bit) o 3 servers ( 1 for Zabbix server and DB,2 for Zabbix Agent) Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 7

Software Zabbix 2.1.1 ( alpha release) Use latest release version for the components o MySQL 5.6.12 o PostgreSQL 9.2.4 o Apache httpd 2.4.6 o PHP 5.4.17 Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 8

Test Target Simulate 600 hosts ( 2 agent servers ) 26400 items ( 44 items/1 host,5 sec interval, keep history 1day) 10200 triggers ( 17 triggers / 1 host ) Starting with empty history Monitoring for: 4 hours (short run) 36 hours (long run) Zabbix: modified CacheSize=64M in zabbix_server.conf Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 9

Test 1 o Default DB setting Test 2 Simple Test o Same buffer size and Transaction log size Each Test is o Monitoring 4 hours o comparing CPU utilization and Zabbix performance Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 10

Test 1: default DB Config MySQL o character-set-server=utf8 o skip-character-set-client-handshake o innodb_file_per_table PostgreSQL o ALL default PostgreSQL uses files per table Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 11

Test 1: CPU utilization MySQL PostgreSQL User System iowait PG: Heavy io wait Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 12

Test 1: Zabbix Performance MySQL PostgreSQL zabbix[wcache,values] :Values processed by Zabbix server per second zabbix[queue]:zabbix queue PG cannot keep up with processing Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 13

Test 2: Tuning Same Buffer and Transaction log size MySQL o Innodb_buffer_pool_size = 512MB o Innodb_log_file_size = 256MB x innodb_log_files_in_group=2(default) = log size 512MB PostgreSQL o shared_buffers = 512MB o checkpoint_segments = 32 16MB/each segmnet log size 512MB Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 14

Test 2: CPU utilization MySQL PostgreSQL User System iowait Almost same load (PG is slightly stable and low io) Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 15

Test 2: Zabbix Performance MySQL PostgreSQL zabbix[wcache,values] :Values processed by Zabbix server per second zabbix[queue]:zabbix queue Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 16

Compare DB Size Test 2 Case Exclude Transaction log MySQL : 3.3 GB PostgreSQL : 3.2 GB Almost Same Size Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 17

Study of Simple Test MySQL default setting is better than PostgreSQL. By Increasing Buffer and Transaction log size, MySQL and PostgreSQL are almost same performance. The size of DB is same in this Simple Test. Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 18

Characteristic of Zabbix DB Large write and small read Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 19

Tuning Point Checkpoints tuning is very important in write case. o Incorrect Checkpoints increase write load o The opportunity of checkpoints are full of Buffers full of Transaction log o To Improve Checkpoint, it s important of Buffer and Transaction log tuning Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 20

Zabbix DB Tuning Zabbix DB continue write operation by same rate. Estimate the growth rate of DB size In this test case 3.2GB/4h 70MB/5min Set a plenty of buffer and transaction log size from a growth rate of DB size. In this test case 512MB buffers and 512MB transaction log size Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 21

Same DB Tuning Partitioning Test o Buffer and Total Transaction log size 512MB Test 3 o Non-Partitioning and housekeeper is enabled. o Monitoring 36 hours Test 4 o Partitioning daily and housekeeper is disabled. o Monitoring 36 hours Comparing CPU utilization and Zabbix performance Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 22

Test 3: CPU utilization MySQL PostgreSQL User System iowait Housekeeper s Large io wait Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 23

Test 3: Zabbix Performance MySQL PostgreSQL zabbix[wcache,values] :Values processed by Zabbix server per second zabbix[queue]:zabbix queue PostgreSQL is more stable in heavy io situation. Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 24

Test 4 Partitioning Disable Housekeeper Daily partitioning at history* tables. PostgreSQL supports partitioning o via table inheritance o define a trigger or rule. for redirecting data inserted into the parent table to the appropriate child partition. o The performance is also depend on the trigger or rule. o In this test case, we define the trigger Using pl/pgsql Using C language (heap_insert method) https://github.com/matheusoliveira/pg_partitioning_tests Developed by Matheus de Oliveira Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 25

Test 4: CPU utilization MySQL PG(pl/pgsql) User System iowait PG(pl/pgsql) need more 3x CPU(user) power Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 26

Test 4: Zabbix Performance MySQL PG(pl/pgsql) zabbix[wcache,values] :Values processed by Zabbix server per second zabbix[queue]:zabbix queue In spite of using more CPU, PG is still stable. Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 27

Test 4: CPU utilization MySQL PG(C lang) User System iowait The cpu usage of PG(C lang) is better than PG(pl/pgsql), But it is worse than MySQL. Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 28

Test 4: Zabbix Performance MySQL PG(C lang) zabbix[wcache,values] :Values processed by Zabbix server per second zabbix[queue]:zabbix queue Almost same performance Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 29

In our test Conclusion o PostgreSQL and MySQL is almost same performance as Zabbix DB. o Tuning Checkpoint(buffer and transaction log) is important. o MySQL s partition is easy and better cpu usage than PostgreSQL. (PostgreSQL s partition supports foreign key) o PostgreSQL is more stable in heavy io situation. Copyright 2013 SRA OSS, Inc. Japan All rights reserved. 30