Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
www.credativ.comcredativ 2016
PGConf US 2016
PostgreSQL Power on Power
MichaelMeskes
-BerndHelmle
-Julian
Schauder
www.credativ.comcredativ 2016
PGConf US 2016
• Free Software since 1993
• Linux since 1994
• Debian GNU/Linux since 1995
• PostgreSQL since 1998
Michael
Meskes
www.credativ.comcredativ 2016
PGConf US 2016
Bernd
Helmle
• PostgreSQL since 2002
• credativ since 2006
• Performance
• High Availability
• Migration
www.credativ.comcredativ 2016
PGConf US 2016
Julian
Schauder
•PostgreSQL since 2012
•credativ since 2014
•Performance
•High Availability
•Healthchecks
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
www.credativ.comcredativ 2016
PGConf US 2016
Total
Cost
Of
Ownership
Software
Hardware
Training
Downtime
Staff
Misc
Source: IDC 2007
www.credativ.comcredativ 2016
PGConf US 2016
Use
Case
-
Retailer
Jab9rm@Wikimedia Commons
Tlockman@Wikimedia Commons
www.credativ.comcredativ 2016
PGConf US 2016
PostgreSQL
On
Power
???
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
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
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)
www.credativ.comcredativ 2016
PGConf US 2016
Architecture
LPAR
LPAR LPAR
LPAR
S824 S824
www.credativ.comcredativ 2016
PGConf US 2016
Architecture
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
www.credativ.comcredativ 2016
PGConf US 2016
Package
Build
Infrastructure
Build infrastructure with Jenkins
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)
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:
www.credativ.comcredativ 2016
PGConf US 2016
Performance
●100 GByte RAM, shared_buffers = 10G
buffer reads buffer hits
24 hrs buffer stats
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
www.credativ.comcredativ 2016
PGConf US 2016
Performance
●~1500 tps max
●~800 tps average
www.credativ.comcredativ 2016
PGConf US 2016
Performance
●Very good system load
●Very cache centric (Latency!)
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)
www.credativ.comcredativ 2016
PGConf US 2016
PostgreSQL Power on Power
MichaelMeskes
-BerndHelmle
-Julian
Schauder