23
www.credativ.com credativ 2016 PGConf US 2016 PostgreSQL Power on Power Michael Meskes - Bernd Helmle - Julian Schauder

PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

PostgreSQL Power on Power

MichaelMeskes

-BerndHelmle

-Julian

Schauder

Page 2: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

• Free Software since 1993

• Linux since 1994

• Debian GNU/Linux since 1995

• PostgreSQL since 1998

Michael

Meskes

Page 3: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

Bernd

Helmle

• PostgreSQL since 2002

• credativ since 2006

• Performance

• High Availability

• Migration

Page 4: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

Julian

Schauder

•PostgreSQL since 2012

•credativ since 2014

•Performance

•High Availability

•Healthchecks

Page 5: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

FOSS Specialists

Complete Stack

Supported

All MajorOpen Source

Projects

• Over 60 employees on staff• Europe, North America, Asia• Open Source Software Support and Services

• Support: break/fix, advanced administration, monitoring

• Consulting: selection, migration, implementation, integration, upgrade, performance, high availability, virtualization

• Development: enhancement, bug-fix, integration, backport, packaging

● Operating, Hosting, Training

Page 6: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

Total

Cost

Of

Ownership

Software

Hardware

Training

Downtime

Staff

Misc

Source: IDC 2007

Page 7: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

Use

Case

-

Retailer

Jab9rm@Wikimedia Commons

Tlockman@Wikimedia Commons

Page 8: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

PostgreSQL

On

Power

???

Page 9: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

Case

Study

-

Historical

●Direct seller since early 90ties

●Early eCommerce adopter

●Historically growing IT infrastructure

●Success Story for PostgreSQL

Page 10: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

Case

Study

-

IT

●IBM POWER since POWER5 introduction

●AIX and Linux OS platform

●Centralized IT server infrastructure

●Started with SLES10, but better support with RHEL

Page 11: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

Case

Study

-

PostgreSQL

●Two IBM S824 POWER8 machines (2 Sockets, 6 Cores, SMT-8 each)

●RHEL7 with PostgreSQL 9.4, inventory and logistics database instances have dedicated LPARs

●Machines not colocated

●Certain transactions need guaranteed response times (+- <n> ms)

●Business logic in the database (Stored Procedures)

Page 12: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

Architecture

LPAR

LPAR LPAR

LPAR

S824 S824

Page 13: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

Architecture

Page 14: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

Tasks●Corosync & Pacemaker ports from CentOS 7

●Own builds because of SBD fencing

●PostgreSQL packages from PGDGoptflags: ppc64 %{__global_cflags} -m64 -mcpu=power8 -mtune=power8

./configure –without-ldap ...

Upstream SBD resource agent was part of this work

https://github.com/ClusterLabs/fence-agents/commit/91314f33519ba5498afb2ba6da9eca30381b263e

Page 15: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

Package

Build

Infrastructure

Build infrastructure with Jenkins

Page 16: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

Performance

Setup

●Currently 48 logical CPUs (hardware threads) for logistics instance

●Use huge pages

●Use tuned to configure important system settings

hugepages=<n> kernel boot parameter, no transparent huge pagesStress tests show 10% more throughput (pgbench)

Page 17: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

Performance

Tuning

[main]include=throughput-performance

[vm]transparent_hugepages=never

[sysctl]kernel.sched_migration_cost_ns=5000000

Customized tuned configuration:

Page 18: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

Performance

●100 GByte RAM, shared_buffers = 10G

buffer reads buffer hits

24 hrs buffer stats

Page 19: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

Performance

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

●~30GB transaction log traffic/day

●Manual CLUSTER and VACUUM FULL for certain tables

●Standby lags during nightly batches

Page 20: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

Performance

●~1500 tps max

●~800 tps average

Page 21: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

Performance

●Very good system load

●Very cache centric (Latency!)

Page 22: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

Backup

●Currently pg_dump only

●Dumps from streaming standby

●Queue tables are dumped in intervals (currently every 60min.)

●State tables are dumped daily and monthly

●Periodic archiving of data

●PITR planned for next setup iteration (Webshop migration)

Page 23: PGConf US 2016 - credativmme/2016/PGConfUS_2016_V01.pdf · 2016-04-26 · PGConf US 2016 Performance Setup Currently 48 logical CPUs (hardware threads) for logistics instance Use

www.credativ.comcredativ 2016

PGConf US 2016

PostgreSQL Power on Power

MichaelMeskes

-BerndHelmle

-Julian

Schauder