SlideShare a Scribd company logo
PostgreSQL Configuration
for Humans
Álvaro Hernandez Tortosa
CEOALVARO HERNANDEZ
@ahachete
DBA and Java Software Developer
OnGres and ToroDB Founder
Well-Known member of the PostgreSQL Community
World- Class Database Expert (+30 Talks in last 2 years)
PGCONF.EU 2017
About ONGRES
• IT firm specialized on R&D on Databases, more specifically
PostgreSQL:
✴ PostgreSQL Support
✴ Consulting and development
✴ Training
• Developers of Products and Online Services for PostgreSQL,
including postgresqlco.nf, a web configuration tool for
postgresql.conf
• Developers of ToroDB (www.torodb.com), an open-source,
document-store database that works on top of PostgreSQL
and is compatible with MongoDB.
PGCONF.EU 2017
PostgreSQL configuration
✓ Mainly postgresql.conf (here’s most of the meat)
✓ Authentication: pg_hba.conf (and pg_ident.conf)
✓ Replicas: recovery.conf (may be merged soon)
✓ Some initdb parameters
✓ Per-object settings (eg. fillfactor)
✓ Developer parameters
✓ Compile-time #defines
Advanced stuff:
PGCONF.EU 2017
Any other reason? ;)
Why configure PostgreSQL?
• Otherwise, it only listens on localhost
• You can only replicate by default in >= 10
• To enable WAL archiving
• Application developers say they get “connection refused!”
• Set defaults for client connections
• Load extensions that required shared libraries
• Enable checksums (initdb!)
• Compatibility with older versions
PGCONF.EU 2017
Performance, performance, performance
Usual performance optimization advice: Don’t, don’t, don’t
Usual PostgreSQL advice:
Do, Do, Do
(unless you run on a Raspberry PI 1st
gen)
✓ Run your own app-centric benchmarks
✓pg_bench is just one benchmark more
All the usual precautions about benchmarks apply
PGCONF.EU 2017
Performance, performance, performance
pg_bench, scale
2000, m4.large
(2 vCPU, 8GB
RAM, 1k IOPS
PGCONF.EU 2017
Performance, performance, performance
pg_bench, scale
2000, m4.large
(2 vCPU, 8GB
RAM, 1k IOPS
PGCONF.EU 2017
postgresql.conf parameters
✓ More than 200 parameters (no kidding!)
✓ Classified into 40 categories / subcategories
✓ 650 lines, 23Kb sample config file
✓ Parameters are integer, real, string, enum, real
or bool. Numeric values may have units (or are
unit-less)
✓ Some units are a bit uneasy (like “blocks of
8Kb”) or too synthetic (cpu_tuple_cost)
How many to tune? 2? 5? 10? 20? 40? 100?
PGCONF.EU 2017
Tunable postgresql.conf parameters
PGCONF.EU 2017
Some ideas about PostgreSQL tuning…
PGCONF.EU 2017
Disclaimer
✓ No, you won’t get here final numbers on how
to tune your postgresql.conf
✓ Only a few dozens parameters discussed here
✓ Only hints provided: do your homework
✓ My opinion may differ from other’s
✓ I am probably wrong
✓ YMMV
(you get the point)
PGCONF.EU 2017
initdb
✓ Sometimes run on your behalf (Debian/Ubuntu), bad for
selecting non defaults
✓ -E (encoding). Use UTF-8 unless you know what you do
✓ --locale, --lc_collate, —lc-ctype
✓ --username: if ‘postgres’ is not the superuser
✓ --data-checksums: enable them!
PGCONF.EU 2017
Db connections 101
✓ max_connections is a hard limit
✓ PostgreSQL will reject connections over this number
✓ Users not happy
✓ Default is 100
✓ “My app has more 100 concurrent users!”
Solution is obvious: raise max_connections!
PGCONF.EU 2017
Db connections 101
✓ One process per connection (excl. parallelism!)
✓ One process handled by one core
✓ How many cores do you have?
✓ Sure, you have a multi-process, time-sharing OS but what is
the scheduling overhead with many processes?
Even worse: cache trashing!
Solution is obvious: raise max_connections!
PGCONF.EU 2017
Db connections 101
pg_bench, scale
2000, m4.large
(2 vCPU, 8GB
RAM, 1k IOPS
# concurrent connections
PGCONF.EU 2017
Db connections 101
pg_bench, scale
2000, m4.large
(2 vCPU, 8GB
RAM, 1k IOPS
# concurrent connections
PGCONF.EU 2017
Db connections 101
✓ Solution is obvious: lower max_connections!
✓ But how we solve the connection refused problem?
✓ PgBouncer!
✓ Size your connections almost 1:1 pgbouncer:max_conns
✓ Use this formula:
Connections=
Cores
% effective utilization connection
x scale factor
PGCONF.EU 2017
shared_buffers
✓ The first recommendation everybody tells you
✓ Set it to 1/4th of RAM and effective_cache_size 3/4th
✓ Done!
✓ ¼ too low on low memory, too high on high memory
✓ Benchmark, benchmark, benchmark
✓ Is the db dedicated in the host? OS memory?
✓ How much memory other PostgreSQL parts use, like
maintenance_work_mem or all the memory used by query
processes?
PGCONF.EU 2017
work_mem
✓ Max local process memory used for operations like sort and
joins in queries
✓ Not written in stone: users can SET it overriding its value
✓ But if more memory is used, it spills to disk (and may use
different algorithm) reducing performance
✓ Not the same if you are OLTP, OLAP, DW (small to very large)
✓ Raise it from defaults, but don’t forget it could be times
(max_connections * max nodes query)
PGCONF.EU 2017
Other memory/disk tunables
✓ maintenance_work_mem: vacuum, create index, check FKs….
raise it
✓ {min,max}_wal_size: it’s only disk space, but too low will
cause excessive checkpoints. Make min at least 1GB, max
several GB up to 50-100GB.
✓ stats_temp_directory: run on a not very small RAMdisk
PGCONF.EU 2017
This requires restart, think carefully
✓ listen_addresses (take care with ‘*’), port
✓ ssl: activate only if needed, use pooling!
✓ huge_pages: benchmark, benchmark, benchmark (typically off)
✓ shared_preload_libraries: add your extensions
beforehand!
✓ logging_collector: on
✓ wal_level: replica or *logical*
✓ archive_mode, archive_command = '/bin/true' if
you don't use archiving
✓ cluster_name
PGCONF.EU 2017
The tyranny of max_*
✓ Most of the max_* also require restart
✓ Sometimes hard to estimate, but restarting the database is pretty
bad: raise limits and control usage
✓ max_wal_senders: replicas, backups, make room
✓ max_replication_slots
✓ max_worker_processes,
max_parallel_workers_per_gather,
max_parallel_workers
✓ autovacuum_max_workers (# cores for cleanup?)
✓ max_prepared_transactions (2PC, 0 by default)
PGCONF.EU 2017
Autovacuum / vacuum
✓ Almost always too conservative
✓ Bloat is one of the most frequent operational burdens
✓ Hard to get it right: analyze and re-tune periodically
✓ Some parameters are set to “-1” which means “look at these
numbers from the vacuum parameters”
✓ autovacuum_{vacuum,analyze}_scale_factor: you may
override on a per-table level
PGCONF.EU 2017
Autovacuum / vacuum
General advice:
✓ Raise vacuum_cost_limit significantly
✓ Reduce autovacuum_vacuum_cost_delay
✓ Use more autovacuum_max_workers if you have many cores
PGCONF.EU 2017
Checkpoints and bgwriter
✓ You typically want to spread checkpoints farther apart (raise
checkpoint_timeout)
✓ min_wal_size 1GB min
✓ Log checkpoints and look for warnings
✓ Raise checkpoint_completion_target, eg. 0.9, but study your I/O
patterns, shared_buffers, wal size
✓ Increase bgwriter activity, very conservative default:
✓ Decrease bgwriter_delay
✓ Increase bgwriter_lru_maxpages
‣ Decrease bgwriter_delay
‣ Increase bgwriter_lru_maxpages
PGCONF.EU 2017
Logging
✓ “Only” 24 parameters (plus some others)
✓ Spend some time here, It pays of when analyzing your db
✓ Turn on:
‣ logging_collector
‣ log_checkpoints
‣ log_connections, log_disconnections
PGCONF.EU 2017
Other interesting parameters
✓ password_encryption use SHA-256 if possible (>= PG 10)
✓ effective_io_concurrency (how many “spindles” your I/O
has?)
✓ max_standby_{archive,streaming}_delay and
hot_standby_feedbak: keep replication query conflicts burden
on the primary or secondaries?
✓ default_statistics_target: if setting by table is not your
job
✓ Adjust the random_page_cost / seq_page_cost (4.0 / 1.0
by default), so that it is lower on SSD (start with 1.x) or indexes
may not be used when it could be beneficial.
PGCONF.EU 2017
Was that too much?
Tools to help?
PGCONF.EU 2017
Was that too much? Tools to help?
PGCONF.EU 2017
Was that too much? Tools to help?
PGCONF.EU 2017
(IMVHO)
PostgreSQL wants a new configuration tool
PGCONF.EU 2017
postgresqlco.nf
PGCONF.EU 2017
postgresqlco.nf
✓ Web configuration tool
✓ Drag&drop your postgresql.conf and tune it!
✓ Integrated help
✓ Recommendations
✓ Easy search & filtering
✓ Create your configurations
✓ Download as postgresql.conf, json, yaml, SQL
✓ Rest API
PGCONF.EU 2017
Subscribe on postgresqlco.nf
to become a beta tester!

More Related Content

What's hot

HighLoad Solutions On MySQL / Xiaobin Lin (Alibaba)
HighLoad Solutions On MySQL / Xiaobin Lin (Alibaba)HighLoad Solutions On MySQL / Xiaobin Lin (Alibaba)
HighLoad Solutions On MySQL / Xiaobin Lin (Alibaba)
Ontico
 
Pgbr 2013 postgres on aws
Pgbr 2013   postgres on awsPgbr 2013   postgres on aws
Pgbr 2013 postgres on aws
Emanuel Calvo
 
Как Web-акселератор акселерирует ваш сайт / Александр Крижановский (Tempesta ...
Как Web-акселератор акселерирует ваш сайт / Александр Крижановский (Tempesta ...Как Web-акселератор акселерирует ваш сайт / Александр Крижановский (Tempesta ...
Как Web-акселератор акселерирует ваш сайт / Александр Крижановский (Tempesta ...
Ontico
 
Как построить видеоплатформу на 200 Гбитс / Ольховченков Вячеслав (Integros)
Как построить видеоплатформу на 200 Гбитс / Ольховченков Вячеслав (Integros)Как построить видеоплатформу на 200 Гбитс / Ольховченков Вячеслав (Integros)
Как построить видеоплатформу на 200 Гбитс / Ольховченков Вячеслав (Integros)
Ontico
 
Making the case for write-optimized database algorithms / Mark Callaghan (Fac...
Making the case for write-optimized database algorithms / Mark Callaghan (Fac...Making the case for write-optimized database algorithms / Mark Callaghan (Fac...
Making the case for write-optimized database algorithms / Mark Callaghan (Fac...
Ontico
 
Shootout at the AWS Corral
Shootout at the AWS CorralShootout at the AWS Corral
Shootout at the AWS Corral
PostgreSQL Experts, Inc.
 
GitLab PostgresMortem: Lessons Learned
GitLab PostgresMortem: Lessons LearnedGitLab PostgresMortem: Lessons Learned
GitLab PostgresMortem: Lessons Learned
Alexey Lesovsky
 
Как мы сделали PHP 7 в два раза быстрее PHP 5 / Дмитрий Стогов (Zend Technolo...
Как мы сделали PHP 7 в два раза быстрее PHP 5 / Дмитрий Стогов (Zend Technolo...Как мы сделали PHP 7 в два раза быстрее PHP 5 / Дмитрий Стогов (Zend Technolo...
Как мы сделали PHP 7 в два раза быстрее PHP 5 / Дмитрий Стогов (Zend Technolo...
Ontico
 
Shootout at the PAAS Corral
Shootout at the PAAS CorralShootout at the PAAS Corral
Shootout at the PAAS Corral
PostgreSQL Experts, Inc.
 
Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)
Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)
Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)
Ontico
 
7 Ways To Crash Postgres
7 Ways To Crash Postgres7 Ways To Crash Postgres
7 Ways To Crash Postgres
PostgreSQL Experts, Inc.
 
PostgreSQL Troubleshoot On-line, (RITfest 2015 meetup at Moscow, Russia).
PostgreSQL Troubleshoot On-line, (RITfest 2015 meetup at Moscow, Russia).PostgreSQL Troubleshoot On-line, (RITfest 2015 meetup at Moscow, Russia).
PostgreSQL Troubleshoot On-line, (RITfest 2015 meetup at Moscow, Russia).
Alexey Lesovsky
 
PostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication CheatsheetPostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication Cheatsheet
Alexey Lesovsky
 
Tuning Linux for Databases.
Tuning Linux for Databases.Tuning Linux for Databases.
Tuning Linux for Databases.
Alexey Lesovsky
 
92 grand prix_2013
92 grand prix_201392 grand prix_2013
92 grand prix_2013
PostgreSQL Experts, Inc.
 
Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4
Denish Patel
 
PostgreSQL
PostgreSQLPostgreSQL
PostgreSQL
Reuven Lerner
 
My talk from PgConf.Russia 2016
My talk from PgConf.Russia 2016My talk from PgConf.Russia 2016
My talk from PgConf.Russia 2016
Alex Chistyakov
 
GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)
PostgreSQL Experts, Inc.
 
Frontera распределенный робот для обхода веба в больших объемах / Александр С...
Frontera распределенный робот для обхода веба в больших объемах / Александр С...Frontera распределенный робот для обхода веба в больших объемах / Александр С...
Frontera распределенный робот для обхода веба в больших объемах / Александр С...
Ontico
 

What's hot (20)

HighLoad Solutions On MySQL / Xiaobin Lin (Alibaba)
HighLoad Solutions On MySQL / Xiaobin Lin (Alibaba)HighLoad Solutions On MySQL / Xiaobin Lin (Alibaba)
HighLoad Solutions On MySQL / Xiaobin Lin (Alibaba)
 
Pgbr 2013 postgres on aws
Pgbr 2013   postgres on awsPgbr 2013   postgres on aws
Pgbr 2013 postgres on aws
 
Как Web-акселератор акселерирует ваш сайт / Александр Крижановский (Tempesta ...
Как Web-акселератор акселерирует ваш сайт / Александр Крижановский (Tempesta ...Как Web-акселератор акселерирует ваш сайт / Александр Крижановский (Tempesta ...
Как Web-акселератор акселерирует ваш сайт / Александр Крижановский (Tempesta ...
 
Как построить видеоплатформу на 200 Гбитс / Ольховченков Вячеслав (Integros)
Как построить видеоплатформу на 200 Гбитс / Ольховченков Вячеслав (Integros)Как построить видеоплатформу на 200 Гбитс / Ольховченков Вячеслав (Integros)
Как построить видеоплатформу на 200 Гбитс / Ольховченков Вячеслав (Integros)
 
Making the case for write-optimized database algorithms / Mark Callaghan (Fac...
Making the case for write-optimized database algorithms / Mark Callaghan (Fac...Making the case for write-optimized database algorithms / Mark Callaghan (Fac...
Making the case for write-optimized database algorithms / Mark Callaghan (Fac...
 
Shootout at the AWS Corral
Shootout at the AWS CorralShootout at the AWS Corral
Shootout at the AWS Corral
 
GitLab PostgresMortem: Lessons Learned
GitLab PostgresMortem: Lessons LearnedGitLab PostgresMortem: Lessons Learned
GitLab PostgresMortem: Lessons Learned
 
Как мы сделали PHP 7 в два раза быстрее PHP 5 / Дмитрий Стогов (Zend Technolo...
Как мы сделали PHP 7 в два раза быстрее PHP 5 / Дмитрий Стогов (Zend Technolo...Как мы сделали PHP 7 в два раза быстрее PHP 5 / Дмитрий Стогов (Zend Technolo...
Как мы сделали PHP 7 в два раза быстрее PHP 5 / Дмитрий Стогов (Zend Technolo...
 
Shootout at the PAAS Corral
Shootout at the PAAS CorralShootout at the PAAS Corral
Shootout at the PAAS Corral
 
Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)
Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)
Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)
 
7 Ways To Crash Postgres
7 Ways To Crash Postgres7 Ways To Crash Postgres
7 Ways To Crash Postgres
 
PostgreSQL Troubleshoot On-line, (RITfest 2015 meetup at Moscow, Russia).
PostgreSQL Troubleshoot On-line, (RITfest 2015 meetup at Moscow, Russia).PostgreSQL Troubleshoot On-line, (RITfest 2015 meetup at Moscow, Russia).
PostgreSQL Troubleshoot On-line, (RITfest 2015 meetup at Moscow, Russia).
 
PostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication CheatsheetPostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication Cheatsheet
 
Tuning Linux for Databases.
Tuning Linux for Databases.Tuning Linux for Databases.
Tuning Linux for Databases.
 
92 grand prix_2013
92 grand prix_201392 grand prix_2013
92 grand prix_2013
 
Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4Out of the box replication in postgres 9.4
Out of the box replication in postgres 9.4
 
PostgreSQL
PostgreSQLPostgreSQL
PostgreSQL
 
My talk from PgConf.Russia 2016
My talk from PgConf.Russia 2016My talk from PgConf.Russia 2016
My talk from PgConf.Russia 2016
 
GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)
 
Frontera распределенный робот для обхода веба в больших объемах / Александр С...
Frontera распределенный робот для обхода веба в больших объемах / Александр С...Frontera распределенный робот для обхода веба в больших объемах / Александр С...
Frontera распределенный робот для обхода веба в больших объемах / Александр С...
 

Similar to PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)

Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
javier ramirez
 
20170419 To COMPRESS or Not, to COMPRESS or ZIP
20170419 To COMPRESS or Not, to COMPRESS or ZIP20170419 To COMPRESS or Not, to COMPRESS or ZIP
20170419 To COMPRESS or Not, to COMPRESS or ZIP
David Horvath
 
The Accidental DBA
The Accidental DBAThe Accidental DBA
The Accidental DBA
PostgreSQL Experts, Inc.
 
VLDB Administration Strategies
VLDB Administration StrategiesVLDB Administration Strategies
VLDB Administration Strategies
Murilo Miranda
 
Really Big Elephants: PostgreSQL DW
Really Big Elephants: PostgreSQL DWReally Big Elephants: PostgreSQL DW
Really Big Elephants: PostgreSQL DW
PostgreSQL Experts, Inc.
 
202110 SESUG 43 To Compress or not
202110 SESUG 43 To Compress or not202110 SESUG 43 To Compress or not
202110 SESUG 43 To Compress or not
dhorvath
 
In-core compression: how to shrink your database size in several times
In-core compression: how to shrink your database size in several timesIn-core compression: how to shrink your database size in several times
In-core compression: how to shrink your database size in several times
Aleksander Alekseev
 
Etl confessions pg conf us 2017
Etl confessions   pg conf us 2017Etl confessions   pg conf us 2017
Etl confessions pg conf us 2017
Corey Huinker
 
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
Aleksander Alekseev
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
Wim Godden
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
Wim Godden
 
Performance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBPerformance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDB
Severalnines
 
Webinar: Avoiding Sub-optimal Performance in your Retail Application
Webinar: Avoiding Sub-optimal Performance in your Retail ApplicationWebinar: Avoiding Sub-optimal Performance in your Retail Application
Webinar: Avoiding Sub-optimal Performance in your Retail Application
MongoDB
 
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011
Wim Godden
 
PuppetConf 2016: An Introduction to Measuring and Tuning PE Performance – Cha...
PuppetConf 2016: An Introduction to Measuring and Tuning PE Performance – Cha...PuppetConf 2016: An Introduction to Measuring and Tuning PE Performance – Cha...
PuppetConf 2016: An Introduction to Measuring and Tuning PE Performance – Cha...
Puppet
 
Loadays MySQL
Loadays MySQLLoadays MySQL
Loadays MySQL
lefredbe
 
PostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major FeaturesPostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major Features
InMobi Technology
 
Kafka to the Maxka - (Kafka Performance Tuning)
Kafka to the Maxka - (Kafka Performance Tuning)Kafka to the Maxka - (Kafka Performance Tuning)
Kafka to the Maxka - (Kafka Performance Tuning)
DataWorks Summit
 
PostgreSQL Table Partitioning / Sharding
PostgreSQL Table Partitioning / ShardingPostgreSQL Table Partitioning / Sharding
PostgreSQL Table Partitioning / Sharding
Amir Reza Hashemi
 
An evening with Postgresql
An evening with PostgresqlAn evening with Postgresql
An evening with Postgresql
Joshua Drake
 

Similar to PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres) (20)

Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
 
20170419 To COMPRESS or Not, to COMPRESS or ZIP
20170419 To COMPRESS or Not, to COMPRESS or ZIP20170419 To COMPRESS or Not, to COMPRESS or ZIP
20170419 To COMPRESS or Not, to COMPRESS or ZIP
 
The Accidental DBA
The Accidental DBAThe Accidental DBA
The Accidental DBA
 
VLDB Administration Strategies
VLDB Administration StrategiesVLDB Administration Strategies
VLDB Administration Strategies
 
Really Big Elephants: PostgreSQL DW
Really Big Elephants: PostgreSQL DWReally Big Elephants: PostgreSQL DW
Really Big Elephants: PostgreSQL DW
 
202110 SESUG 43 To Compress or not
202110 SESUG 43 To Compress or not202110 SESUG 43 To Compress or not
202110 SESUG 43 To Compress or not
 
In-core compression: how to shrink your database size in several times
In-core compression: how to shrink your database size in several timesIn-core compression: how to shrink your database size in several times
In-core compression: how to shrink your database size in several times
 
Etl confessions pg conf us 2017
Etl confessions   pg conf us 2017Etl confessions   pg conf us 2017
Etl confessions pg conf us 2017
 
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
PostgreSQL Sharding and HA: Theory and Practice (PGConf.ASIA 2017)
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
Performance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDBPerformance Tuning Cheat Sheet for MongoDB
Performance Tuning Cheat Sheet for MongoDB
 
Webinar: Avoiding Sub-optimal Performance in your Retail Application
Webinar: Avoiding Sub-optimal Performance in your Retail ApplicationWebinar: Avoiding Sub-optimal Performance in your Retail Application
Webinar: Avoiding Sub-optimal Performance in your Retail Application
 
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011
 
PuppetConf 2016: An Introduction to Measuring and Tuning PE Performance – Cha...
PuppetConf 2016: An Introduction to Measuring and Tuning PE Performance – Cha...PuppetConf 2016: An Introduction to Measuring and Tuning PE Performance – Cha...
PuppetConf 2016: An Introduction to Measuring and Tuning PE Performance – Cha...
 
Loadays MySQL
Loadays MySQLLoadays MySQL
Loadays MySQL
 
PostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major FeaturesPostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major Features
 
Kafka to the Maxka - (Kafka Performance Tuning)
Kafka to the Maxka - (Kafka Performance Tuning)Kafka to the Maxka - (Kafka Performance Tuning)
Kafka to the Maxka - (Kafka Performance Tuning)
 
PostgreSQL Table Partitioning / Sharding
PostgreSQL Table Partitioning / ShardingPostgreSQL Table Partitioning / Sharding
PostgreSQL Table Partitioning / Sharding
 
An evening with Postgresql
An evening with PostgresqlAn evening with Postgresql
An evening with Postgresql
 

More from Ontico

One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...
One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...
One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...
Ontico
 
Масштабируя DNS / Артем Гавриченков (Qrator Labs)
Масштабируя DNS / Артем Гавриченков (Qrator Labs)Масштабируя DNS / Артем Гавриченков (Qrator Labs)
Масштабируя DNS / Артем Гавриченков (Qrator Labs)
Ontico
 
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)
Ontico
 
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Ontico
 
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...
Ontico
 
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Ontico
 
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...
Ontico
 
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
Ontico
 
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...Внутренний open-source. Как разрабатывать мобильное приложение большим количе...
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...
Ontico
 
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...
Ontico
 
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...
Ontico
 
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)
Ontico
 
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)
Ontico
 
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)
Ontico
 
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)
Ontico
 
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...
Ontico
 
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...
Ontico
 
Как мы учились чинить самолеты в воздухе / Евгений Коломеец (Virtuozzo)
Как мы учились чинить самолеты в воздухе / Евгений Коломеец (Virtuozzo)Как мы учились чинить самолеты в воздухе / Евгений Коломеец (Virtuozzo)
Как мы учились чинить самолеты в воздухе / Евгений Коломеец (Virtuozzo)
Ontico
 
Java и Linux — особенности эксплуатации / Алексей Рагозин (Дойче Банк)
Java и Linux — особенности эксплуатации / Алексей Рагозин (Дойче Банк)Java и Linux — особенности эксплуатации / Алексей Рагозин (Дойче Банк)
Java и Linux — особенности эксплуатации / Алексей Рагозин (Дойче Банк)
Ontico
 
Как построить кластер для расчета сотен тысяч high-CPU/high-MEM-задач и не ра...
Как построить кластер для расчета сотен тысяч high-CPU/high-MEM-задач и не ра...Как построить кластер для расчета сотен тысяч high-CPU/high-MEM-задач и не ра...
Как построить кластер для расчета сотен тысяч high-CPU/high-MEM-задач и не ра...
Ontico
 

More from Ontico (20)

One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...
One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...
One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...
 
Масштабируя DNS / Артем Гавриченков (Qrator Labs)
Масштабируя DNS / Артем Гавриченков (Qrator Labs)Масштабируя DNS / Артем Гавриченков (Qrator Labs)
Масштабируя DNS / Артем Гавриченков (Qrator Labs)
 
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)
 
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
 
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...
 
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
 
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...
 
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
 
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...Внутренний open-source. Как разрабатывать мобильное приложение большим количе...
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...
 
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...
 
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...
 
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)
 
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)
 
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)
 
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)
 
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...
 
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...
 
Как мы учились чинить самолеты в воздухе / Евгений Коломеец (Virtuozzo)
Как мы учились чинить самолеты в воздухе / Евгений Коломеец (Virtuozzo)Как мы учились чинить самолеты в воздухе / Евгений Коломеец (Virtuozzo)
Как мы учились чинить самолеты в воздухе / Евгений Коломеец (Virtuozzo)
 
Java и Linux — особенности эксплуатации / Алексей Рагозин (Дойче Банк)
Java и Linux — особенности эксплуатации / Алексей Рагозин (Дойче Банк)Java и Linux — особенности эксплуатации / Алексей Рагозин (Дойче Банк)
Java и Linux — особенности эксплуатации / Алексей Рагозин (Дойче Банк)
 
Как построить кластер для расчета сотен тысяч high-CPU/high-MEM-задач и не ра...
Как построить кластер для расчета сотен тысяч high-CPU/high-MEM-задач и не ра...Как построить кластер для расчета сотен тысяч high-CPU/high-MEM-задач и не ра...
Как построить кластер для расчета сотен тысяч high-CPU/high-MEM-задач и не ра...
 

Recently uploaded

SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
Jim Mimlitz, P.E.
 
Data Visualization in Python of b.tech student.pptx
Data Visualization in Python of b.tech student.pptxData Visualization in Python of b.tech student.pptx
Data Visualization in Python of b.tech student.pptx
TelanganaPakkaFolk
 
lecture10-efficient-scoring.ppmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmt
lecture10-efficient-scoring.ppmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmtlecture10-efficient-scoring.ppmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmt
lecture10-efficient-scoring.ppmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmt
RAtna29
 
libro de modelado de diseño-part-1[160-250].pdf
libro de modelado de diseño-part-1[160-250].pdflibro de modelado de diseño-part-1[160-250].pdf
libro de modelado de diseño-part-1[160-250].pdf
celiosilva66
 
Monitoring and reporting of transparent forest data and information under the...
Monitoring and reporting of transparent forest data and information under the...Monitoring and reporting of transparent forest data and information under the...
Monitoring and reporting of transparent forest data and information under the...
Pilar Valbuena Perez
 
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
YanKing2
 
Rotary Intersection in traffic engineering.pptx
Rotary Intersection in traffic engineering.pptxRotary Intersection in traffic engineering.pptx
Rotary Intersection in traffic engineering.pptx
surekha1287
 
Concepts Basic/ Technical Electronic Material.pdf
Concepts Basic/ Technical Electronic Material.pdfConcepts Basic/ Technical Electronic Material.pdf
Concepts Basic/ Technical Electronic Material.pdf
OBD II
 
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
Mani Krishna Sarkar
 
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
sanabts249
 
Presentation slide on DESIGN AND FABRICATION OF MOBILE CONTROLLED DRAINAGE.pptx
Presentation slide on DESIGN AND FABRICATION OF MOBILE CONTROLLED DRAINAGE.pptxPresentation slide on DESIGN AND FABRICATION OF MOBILE CONTROLLED DRAINAGE.pptx
Presentation slide on DESIGN AND FABRICATION OF MOBILE CONTROLLED DRAINAGE.pptx
Er. Kushal Ghimire
 
Design and Application of Side Channel Spillways
Design and Application of Side Channel SpillwaysDesign and Application of Side Channel Spillways
Design and Application of Side Channel Spillways
ahmed42488
 
Introduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer NetworkingIntroduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer Networking
Md.Shohel Rana ( M.Sc in CSE Khulna University of Engineering & Technology (KUET))
 
PMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOCPMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOC
itssurajthakur06
 
Unblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen FramesUnblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen Frames
Sinan KOZAK
 
OSHA LOTO training, LOTO, lock out tag out
OSHA LOTO training, LOTO, lock out tag outOSHA LOTO training, LOTO, lock out tag out
OSHA LOTO training, LOTO, lock out tag out
Ateeb19
 
Quadcopter Dynamics, Stability and Control
Quadcopter Dynamics, Stability and ControlQuadcopter Dynamics, Stability and Control
Quadcopter Dynamics, Stability and Control
Blesson Easo Varghese
 
IWISS Catalog 2024
IWISS Catalog 2024IWISS Catalog 2024
IWISS Catalog 2024
Iwiss Tools Co.,Ltd
 
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-IDUNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
GOWSIKRAJA PALANISAMY
 
Evento anual Splunk .conf24 Highlights recap
Evento anual Splunk .conf24 Highlights recapEvento anual Splunk .conf24 Highlights recap
Evento anual Splunk .conf24 Highlights recap
Rafael Santos
 

Recently uploaded (20)

SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
 
Data Visualization in Python of b.tech student.pptx
Data Visualization in Python of b.tech student.pptxData Visualization in Python of b.tech student.pptx
Data Visualization in Python of b.tech student.pptx
 
lecture10-efficient-scoring.ppmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmt
lecture10-efficient-scoring.ppmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmtlecture10-efficient-scoring.ppmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmt
lecture10-efficient-scoring.ppmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmt
 
libro de modelado de diseño-part-1[160-250].pdf
libro de modelado de diseño-part-1[160-250].pdflibro de modelado de diseño-part-1[160-250].pdf
libro de modelado de diseño-part-1[160-250].pdf
 
Monitoring and reporting of transparent forest data and information under the...
Monitoring and reporting of transparent forest data and information under the...Monitoring and reporting of transparent forest data and information under the...
Monitoring and reporting of transparent forest data and information under the...
 
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
 
Rotary Intersection in traffic engineering.pptx
Rotary Intersection in traffic engineering.pptxRotary Intersection in traffic engineering.pptx
Rotary Intersection in traffic engineering.pptx
 
Concepts Basic/ Technical Electronic Material.pdf
Concepts Basic/ Technical Electronic Material.pdfConcepts Basic/ Technical Electronic Material.pdf
Concepts Basic/ Technical Electronic Material.pdf
 
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
 
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
 
Presentation slide on DESIGN AND FABRICATION OF MOBILE CONTROLLED DRAINAGE.pptx
Presentation slide on DESIGN AND FABRICATION OF MOBILE CONTROLLED DRAINAGE.pptxPresentation slide on DESIGN AND FABRICATION OF MOBILE CONTROLLED DRAINAGE.pptx
Presentation slide on DESIGN AND FABRICATION OF MOBILE CONTROLLED DRAINAGE.pptx
 
Design and Application of Side Channel Spillways
Design and Application of Side Channel SpillwaysDesign and Application of Side Channel Spillways
Design and Application of Side Channel Spillways
 
Introduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer NetworkingIntroduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer Networking
 
PMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOCPMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOC
 
Unblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen FramesUnblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen Frames
 
OSHA LOTO training, LOTO, lock out tag out
OSHA LOTO training, LOTO, lock out tag outOSHA LOTO training, LOTO, lock out tag out
OSHA LOTO training, LOTO, lock out tag out
 
Quadcopter Dynamics, Stability and Control
Quadcopter Dynamics, Stability and ControlQuadcopter Dynamics, Stability and Control
Quadcopter Dynamics, Stability and Control
 
IWISS Catalog 2024
IWISS Catalog 2024IWISS Catalog 2024
IWISS Catalog 2024
 
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-IDUNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
 
Evento anual Splunk .conf24 Highlights recap
Evento anual Splunk .conf24 Highlights recapEvento anual Splunk .conf24 Highlights recap
Evento anual Splunk .conf24 Highlights recap
 

PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)

  • 2. CEOALVARO HERNANDEZ @ahachete DBA and Java Software Developer OnGres and ToroDB Founder Well-Known member of the PostgreSQL Community World- Class Database Expert (+30 Talks in last 2 years)
  • 3. PGCONF.EU 2017 About ONGRES • IT firm specialized on R&D on Databases, more specifically PostgreSQL: ✴ PostgreSQL Support ✴ Consulting and development ✴ Training • Developers of Products and Online Services for PostgreSQL, including postgresqlco.nf, a web configuration tool for postgresql.conf • Developers of ToroDB (www.torodb.com), an open-source, document-store database that works on top of PostgreSQL and is compatible with MongoDB.
  • 4. PGCONF.EU 2017 PostgreSQL configuration ✓ Mainly postgresql.conf (here’s most of the meat) ✓ Authentication: pg_hba.conf (and pg_ident.conf) ✓ Replicas: recovery.conf (may be merged soon) ✓ Some initdb parameters ✓ Per-object settings (eg. fillfactor) ✓ Developer parameters ✓ Compile-time #defines Advanced stuff:
  • 5. PGCONF.EU 2017 Any other reason? ;) Why configure PostgreSQL? • Otherwise, it only listens on localhost • You can only replicate by default in >= 10 • To enable WAL archiving • Application developers say they get “connection refused!” • Set defaults for client connections • Load extensions that required shared libraries • Enable checksums (initdb!) • Compatibility with older versions
  • 6. PGCONF.EU 2017 Performance, performance, performance Usual performance optimization advice: Don’t, don’t, don’t Usual PostgreSQL advice: Do, Do, Do (unless you run on a Raspberry PI 1st gen) ✓ Run your own app-centric benchmarks ✓pg_bench is just one benchmark more All the usual precautions about benchmarks apply
  • 7. PGCONF.EU 2017 Performance, performance, performance pg_bench, scale 2000, m4.large (2 vCPU, 8GB RAM, 1k IOPS
  • 8. PGCONF.EU 2017 Performance, performance, performance pg_bench, scale 2000, m4.large (2 vCPU, 8GB RAM, 1k IOPS
  • 9. PGCONF.EU 2017 postgresql.conf parameters ✓ More than 200 parameters (no kidding!) ✓ Classified into 40 categories / subcategories ✓ 650 lines, 23Kb sample config file ✓ Parameters are integer, real, string, enum, real or bool. Numeric values may have units (or are unit-less) ✓ Some units are a bit uneasy (like “blocks of 8Kb”) or too synthetic (cpu_tuple_cost) How many to tune? 2? 5? 10? 20? 40? 100?
  • 11. PGCONF.EU 2017 Some ideas about PostgreSQL tuning…
  • 12. PGCONF.EU 2017 Disclaimer ✓ No, you won’t get here final numbers on how to tune your postgresql.conf ✓ Only a few dozens parameters discussed here ✓ Only hints provided: do your homework ✓ My opinion may differ from other’s ✓ I am probably wrong ✓ YMMV (you get the point)
  • 13. PGCONF.EU 2017 initdb ✓ Sometimes run on your behalf (Debian/Ubuntu), bad for selecting non defaults ✓ -E (encoding). Use UTF-8 unless you know what you do ✓ --locale, --lc_collate, —lc-ctype ✓ --username: if ‘postgres’ is not the superuser ✓ --data-checksums: enable them!
  • 14. PGCONF.EU 2017 Db connections 101 ✓ max_connections is a hard limit ✓ PostgreSQL will reject connections over this number ✓ Users not happy ✓ Default is 100 ✓ “My app has more 100 concurrent users!” Solution is obvious: raise max_connections!
  • 15. PGCONF.EU 2017 Db connections 101 ✓ One process per connection (excl. parallelism!) ✓ One process handled by one core ✓ How many cores do you have? ✓ Sure, you have a multi-process, time-sharing OS but what is the scheduling overhead with many processes? Even worse: cache trashing! Solution is obvious: raise max_connections!
  • 16. PGCONF.EU 2017 Db connections 101 pg_bench, scale 2000, m4.large (2 vCPU, 8GB RAM, 1k IOPS # concurrent connections
  • 17. PGCONF.EU 2017 Db connections 101 pg_bench, scale 2000, m4.large (2 vCPU, 8GB RAM, 1k IOPS # concurrent connections
  • 18. PGCONF.EU 2017 Db connections 101 ✓ Solution is obvious: lower max_connections! ✓ But how we solve the connection refused problem? ✓ PgBouncer! ✓ Size your connections almost 1:1 pgbouncer:max_conns ✓ Use this formula: Connections= Cores % effective utilization connection x scale factor
  • 19. PGCONF.EU 2017 shared_buffers ✓ The first recommendation everybody tells you ✓ Set it to 1/4th of RAM and effective_cache_size 3/4th ✓ Done! ✓ ¼ too low on low memory, too high on high memory ✓ Benchmark, benchmark, benchmark ✓ Is the db dedicated in the host? OS memory? ✓ How much memory other PostgreSQL parts use, like maintenance_work_mem or all the memory used by query processes?
  • 20. PGCONF.EU 2017 work_mem ✓ Max local process memory used for operations like sort and joins in queries ✓ Not written in stone: users can SET it overriding its value ✓ But if more memory is used, it spills to disk (and may use different algorithm) reducing performance ✓ Not the same if you are OLTP, OLAP, DW (small to very large) ✓ Raise it from defaults, but don’t forget it could be times (max_connections * max nodes query)
  • 21. PGCONF.EU 2017 Other memory/disk tunables ✓ maintenance_work_mem: vacuum, create index, check FKs…. raise it ✓ {min,max}_wal_size: it’s only disk space, but too low will cause excessive checkpoints. Make min at least 1GB, max several GB up to 50-100GB. ✓ stats_temp_directory: run on a not very small RAMdisk
  • 22. PGCONF.EU 2017 This requires restart, think carefully ✓ listen_addresses (take care with ‘*’), port ✓ ssl: activate only if needed, use pooling! ✓ huge_pages: benchmark, benchmark, benchmark (typically off) ✓ shared_preload_libraries: add your extensions beforehand! ✓ logging_collector: on ✓ wal_level: replica or *logical* ✓ archive_mode, archive_command = '/bin/true' if you don't use archiving ✓ cluster_name
  • 23. PGCONF.EU 2017 The tyranny of max_* ✓ Most of the max_* also require restart ✓ Sometimes hard to estimate, but restarting the database is pretty bad: raise limits and control usage ✓ max_wal_senders: replicas, backups, make room ✓ max_replication_slots ✓ max_worker_processes, max_parallel_workers_per_gather, max_parallel_workers ✓ autovacuum_max_workers (# cores for cleanup?) ✓ max_prepared_transactions (2PC, 0 by default)
  • 24. PGCONF.EU 2017 Autovacuum / vacuum ✓ Almost always too conservative ✓ Bloat is one of the most frequent operational burdens ✓ Hard to get it right: analyze and re-tune periodically ✓ Some parameters are set to “-1” which means “look at these numbers from the vacuum parameters” ✓ autovacuum_{vacuum,analyze}_scale_factor: you may override on a per-table level
  • 25. PGCONF.EU 2017 Autovacuum / vacuum General advice: ✓ Raise vacuum_cost_limit significantly ✓ Reduce autovacuum_vacuum_cost_delay ✓ Use more autovacuum_max_workers if you have many cores
  • 26. PGCONF.EU 2017 Checkpoints and bgwriter ✓ You typically want to spread checkpoints farther apart (raise checkpoint_timeout) ✓ min_wal_size 1GB min ✓ Log checkpoints and look for warnings ✓ Raise checkpoint_completion_target, eg. 0.9, but study your I/O patterns, shared_buffers, wal size ✓ Increase bgwriter activity, very conservative default: ✓ Decrease bgwriter_delay ✓ Increase bgwriter_lru_maxpages ‣ Decrease bgwriter_delay ‣ Increase bgwriter_lru_maxpages
  • 27. PGCONF.EU 2017 Logging ✓ “Only” 24 parameters (plus some others) ✓ Spend some time here, It pays of when analyzing your db ✓ Turn on: ‣ logging_collector ‣ log_checkpoints ‣ log_connections, log_disconnections
  • 28. PGCONF.EU 2017 Other interesting parameters ✓ password_encryption use SHA-256 if possible (>= PG 10) ✓ effective_io_concurrency (how many “spindles” your I/O has?) ✓ max_standby_{archive,streaming}_delay and hot_standby_feedbak: keep replication query conflicts burden on the primary or secondaries? ✓ default_statistics_target: if setting by table is not your job ✓ Adjust the random_page_cost / seq_page_cost (4.0 / 1.0 by default), so that it is lower on SSD (start with 1.x) or indexes may not be used when it could be beneficial.
  • 29. PGCONF.EU 2017 Was that too much? Tools to help?
  • 30. PGCONF.EU 2017 Was that too much? Tools to help?
  • 31. PGCONF.EU 2017 Was that too much? Tools to help?
  • 32. PGCONF.EU 2017 (IMVHO) PostgreSQL wants a new configuration tool
  • 34. PGCONF.EU 2017 postgresqlco.nf ✓ Web configuration tool ✓ Drag&drop your postgresql.conf and tune it! ✓ Integrated help ✓ Recommendations ✓ Easy search & filtering ✓ Create your configurations ✓ Download as postgresql.conf, json, yaml, SQL ✓ Rest API
  • 35. PGCONF.EU 2017 Subscribe on postgresqlco.nf to become a beta tester!