SlideShare uma empresa Scribd logo
1 de 23
Baixar para ler offline
© 2ndQuadrant Limited 2010
Developing
PostgreSQL
Performance
© 2ndQuadrant Limited 2010
Performance Comparisons
© 2ndQuadrant Limited 2010
PostgreSQL Performance Gain:
Single Node Improvements
7.3.x (est) 7.4.x (est) 8.0.21 8.1.17 8.2.13 8.3.7 8.4.1
0.00%
20.00%
40.00%
60.00%
80.00%
100.00%
120.00%
Peak RO TPS
Peak RW TPS
© 2ndQuadrant Limited 2010
What this talk is about
• History of performance analysis &
performance development
• Lessons learned
• Where next?
© 2ndQuadrant Limited 2010
Who Am I?
• Simon Riggs
• Major Developer on PostgreSQL project
• CTO, 2ndQuadrant
• Database Architect at Abbey National Bank
Technical Advisor RDBMS Procurement
© 2ndQuadrant Limited 2010
Why performance matters
• User Experience (Response time)
• Headroom for growth (Selection Risk)
• Total Cost of Ownership (Cost profile)
© 2ndQuadrant Limited 2010
Dramatis Personae
• Simon Riggs
• Mark Wong
• Jonah Harris
• Pavan Deolassee
• Manfred Koizar
• Tom Lane
• Greg Smith
• Heikki Linnakangas
• Greg Stark
• Jan Wieck
© 2ndQuadrant Limited 2010
Performance Analysis
7.3.x (est) 7.4.x (est) 8.0.21 8.1.17 8.2.13 8.3.7 8.4.1
0.00%
20.00%
40.00%
60.00%
80.00%
100.00%
120.00%
Peak RO TPS
Peak RW TPS
Laptop
Server-based
No re-analysis!
© 2ndQuadrant Limited 2010
Lessons
• Need proper workload analysis
• Laptop-only analysis is never good enough
• Regular re-analysis is needed for each release
© 2ndQuadrant Limited 2010
Target Workloads
• Various workloads, all different
– High Volume Transactions
• Read Only
• Read Write
– Data Warehouse
• Very Large Query
• Data Loading
• Different approaches required
• Different development areas
© 2ndQuadrant Limited 2010
Data Warehouse
• Optimizer Improvements (all)
• Partitioning (8.1, 9.1)
• Sort Improvements (8.2-8.3)
• WAL avoidance (8.3-9.0)
• Hash Join skew avoidance (8.4)
© 2ndQuadrant Limited 2010
Real transactional benchmark!
• Unisys sponsored benchmarks on 32-way
• No way to analyse SQL execution time
• EXPLAIN won't work on parameterised
statements
• Bgwriter gave negative performance benefit
• Context switch storms
• Massively untuned!
© 2ndQuadrant Limited 2010
Breakthroughs
• Full stack analysis
• Event targeting
• Scalability Analysis
© 2ndQuadrant Limited 2010
Full stack analysis
• Algorithms
• Libraries/Modules
• Compiler Optimisation
• OS Layer Optimisation
• Physical Layer
• Hardware
© 2ndQuadrant Limited 2010
Event targeting
• Reject the smoothness assumption:
performance is not lost by constant friction
• Events
– Traffic Jams
– Phase changes
– Black Swans
• Don't look at the totals and averages
• Look at the behaviour
© 2ndQuadrant Limited 2010
Scalability Analysis
• Resource sharing rules
• Fine-grained Locking
• Lock avoidance
• Minimise
• Partition
• Dependency Removal
© 2ndQuadrant Limited 2010
Developments
Buffer Alignment (7.4)
Buffer Management (8.0)
Buffer Manager (8.1)
Lock Manager (8.2)
Cache Line optimisation (8.2)
Snapshot Management (8.3)
Buffer recycling (8.3)
© 2ndQuadrant Limited 2010
Results
© 2ndQuadrant Limited 2010
Conclusions
To conclude the above, I think it's safe to say
that if we have known PostgreSQL as a slow
beast, it's time to re-think (or measure) that,
because it has gained quite much performance
and scalability in the last three years.
Not to speak about its features.
György Vilmos
http://suckit.blog.hu/2009/09/29/postgresql_history
© 2ndQuadrant Limited 2010
Where next?
• Transactional Workloads
– Smoothness (+10-20%)
– Indexing (+10-20%)
• Data Warehouse
– Indexing
– Partitioning
– Many available techniques
© 2ndQuadrant Limited 2010
Performance Future
7.3.x (est) 7.4.x (est) 8.0.21 8.1.17 8.2.13 8.3.7 8.4.1
0.00%
20.00%
40.00%
60.00%
80.00%
100.00%
120.00%
Peak RO TPS
Peak RW TPS
© 2ndQuadrant Limited 2010
Radical Steps
• Architecture is Critical
• New options in the DBMS
• Mixed mode
• Plus, changes for multi-node scalability
– Otherwise ignored during this talk
© 2ndQuadrant Limited 2010
PostgreSQL Books
• http://www.2ndQuadrant.com/books/

Mais conteúdo relacionado

Mais procurados

Quickly Testing Legacy C++ Code with Approval Tests
Quickly Testing Legacy C++ Code with Approval TestsQuickly Testing Legacy C++ Code with Approval Tests
Quickly Testing Legacy C++ Code with Approval Tests
Clare Macrae
 
Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...
Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...
Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...
Carlos Sierra
 

Mais procurados (20)

Postgre sql vs oracle
Postgre sql vs oraclePostgre sql vs oracle
Postgre sql vs oracle
 
SQL in the Hybrid World
SQL in the Hybrid WorldSQL in the Hybrid World
SQL in the Hybrid World
 
Adding unit tests with tSQLt to the database deployment pipeline
Adding unit tests with tSQLt to the database deployment pipelineAdding unit tests with tSQLt to the database deployment pipeline
Adding unit tests with tSQLt to the database deployment pipeline
 
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 1
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 1Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 1
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 1
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
 
Query Parallelism in PostgreSQL: What's coming next?
Query Parallelism in PostgreSQL: What's coming next?Query Parallelism in PostgreSQL: What's coming next?
Query Parallelism in PostgreSQL: What's coming next?
 
MySQL document_store
MySQL document_storeMySQL document_store
MySQL document_store
 
Real World Java 9
Real World Java 9Real World Java 9
Real World Java 9
 
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...
 
Weaving Through the Mesh: Making Sense of Istio and Overlapping Technologies
Weaving Through the Mesh: Making Sense of Istio and Overlapping TechnologiesWeaving Through the Mesh: Making Sense of Istio and Overlapping Technologies
Weaving Through the Mesh: Making Sense of Istio and Overlapping Technologies
 
PuppetConf 2017: Test First Approach for Puppet on Windows- Miro Sommer, Hiscox
PuppetConf 2017: Test First Approach for Puppet on Windows- Miro Sommer, HiscoxPuppetConf 2017: Test First Approach for Puppet on Windows- Miro Sommer, Hiscox
PuppetConf 2017: Test First Approach for Puppet on Windows- Miro Sommer, Hiscox
 
MySQL Cluster (NDB) - Best Practices Percona Live 2017
MySQL Cluster (NDB) - Best Practices Percona Live 2017MySQL Cluster (NDB) - Best Practices Percona Live 2017
MySQL Cluster (NDB) - Best Practices Percona Live 2017
 
Quickly Testing Legacy C++ Code with Approval Tests
Quickly Testing Legacy C++ Code with Approval TestsQuickly Testing Legacy C++ Code with Approval Tests
Quickly Testing Legacy C++ Code with Approval Tests
 
Select Star: Unified Batch & Streaming with Flink SQL & Pulsar
Select Star: Unified Batch & Streaming with Flink SQL & PulsarSelect Star: Unified Batch & Streaming with Flink SQL & Pulsar
Select Star: Unified Batch & Streaming with Flink SQL & Pulsar
 
Mini Session - Using GDB for Profiling
Mini Session - Using GDB for ProfilingMini Session - Using GDB for Profiling
Mini Session - Using GDB for Profiling
 
Refactoring to Java 8 (QCon New York)
Refactoring to Java 8 (QCon New York)Refactoring to Java 8 (QCon New York)
Refactoring to Java 8 (QCon New York)
 
Ohio Linux Fest -- MySQL's NoSQL
Ohio Linux Fest -- MySQL's NoSQLOhio Linux Fest -- MySQL's NoSQL
Ohio Linux Fest -- MySQL's NoSQL
 
How to find and fix your Oracle application performance problem
How to find and fix your Oracle application performance problemHow to find and fix your Oracle application performance problem
How to find and fix your Oracle application performance problem
 
Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...
Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...
Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...
 
MySQL NoSQL APIs
MySQL NoSQL APIsMySQL NoSQL APIs
MySQL NoSQL APIs
 

Destaque

Проблемы производительности open source библиотек
Проблемы производительности open source библиотекПроблемы производительности open source библиотек
Проблемы производительности open source библиотек
Vladimir Sitnikov
 
PostgreSQL и JDBC: выжимаем все соки
PostgreSQL и JDBC: выжимаем все сокиPostgreSQL и JDBC: выжимаем все соки
PostgreSQL и JDBC: выжимаем все соки
Vladimir Sitnikov
 
Подводные камни в нагрузочном тестировании
Подводные камни в нагрузочном тестированииПодводные камни в нагрузочном тестировании
Подводные камни в нагрузочном тестировании
Vladimir Sitnikov
 

Destaque (20)

PostgreSQL and JDBC: striving for high performance
PostgreSQL and JDBC: striving for high performancePostgreSQL and JDBC: striving for high performance
PostgreSQL and JDBC: striving for high performance
 
Logical Replication in PostgreSQL - FLOSSUK 2016
Logical Replication in PostgreSQL - FLOSSUK 2016Logical Replication in PostgreSQL - FLOSSUK 2016
Logical Replication in PostgreSQL - FLOSSUK 2016
 
PostgreSQL performance improvements in 9.5 and 9.6
PostgreSQL performance improvements in 9.5 and 9.6PostgreSQL performance improvements in 9.5 and 9.6
PostgreSQL performance improvements in 9.5 and 9.6
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performance
 
Postgres in Production - Best Practices 2014
Postgres in Production - Best Practices 2014Postgres in Production - Best Practices 2014
Postgres in Production - Best Practices 2014
 
The hitchhiker's guide to PostgreSQL
The hitchhiker's guide to PostgreSQLThe hitchhiker's guide to PostgreSQL
The hitchhiker's guide to PostgreSQL
 
Трудовые будни инженера производительности
Трудовые будни инженера производительностиТрудовые будни инженера производительности
Трудовые будни инженера производительности
 
Семантика final полей в java
Семантика final полей в javaСемантика final полей в java
Семантика final полей в java
 
A step-by-step approach toward high quality OutOfMemoryError analysis
A step-by-step approach toward high quality OutOfMemoryError analysisA step-by-step approach toward high quality OutOfMemoryError analysis
A step-by-step approach toward high quality OutOfMemoryError analysis
 
Final field semantics
Final field semanticsFinal field semantics
Final field semantics
 
Implement your own profiler with blackjack and fun
Implement your own profiler with blackjack and funImplement your own profiler with blackjack and fun
Implement your own profiler with blackjack and fun
 
Проблемы производительности open source библиотек
Проблемы производительности open source библиотекПроблемы производительности open source библиотек
Проблемы производительности open source библиотек
 
PostgreSQL и JDBC: выжимаем все соки
PostgreSQL и JDBC: выжимаем все сокиPostgreSQL и JDBC: выжимаем все соки
PostgreSQL и JDBC: выжимаем все соки
 
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
 
Streaming huge databases using logical decoding
Streaming huge databases using logical decodingStreaming huge databases using logical decoding
Streaming huge databases using logical decoding
 
Enterprise PostgreSQL - EDB's answer to conventional Databases
Enterprise PostgreSQL - EDB's answer to conventional DatabasesEnterprise PostgreSQL - EDB's answer to conventional Databases
Enterprise PostgreSQL - EDB's answer to conventional Databases
 
Подводные камни в нагрузочном тестировании
Подводные камни в нагрузочном тестированииПодводные камни в нагрузочном тестировании
Подводные камни в нагрузочном тестировании
 
PGDay UK 2016 -- Performace for queries with grouping
PGDay UK 2016 -- Performace for queries with groupingPGDay UK 2016 -- Performace for queries with grouping
PGDay UK 2016 -- Performace for queries with grouping
 
Multimaster
MultimasterMultimaster
Multimaster
 
Logical replication with pglogical
Logical replication with pglogicalLogical replication with pglogical
Logical replication with pglogical
 

Semelhante a Developing PostgreSQL Performance, Simon Riggs

Developing PostgreSQL performance (Simon Riggs)
Developing PostgreSQL performance (Simon Riggs)Developing PostgreSQL performance (Simon Riggs)
Developing PostgreSQL performance (Simon Riggs)
Ontico
 

Semelhante a Developing PostgreSQL Performance, Simon Riggs (20)

Developing PostgreSQL performance (Simon Riggs)
Developing PostgreSQL performance (Simon Riggs)Developing PostgreSQL performance (Simon Riggs)
Developing PostgreSQL performance (Simon Riggs)
 
Three signs your architecture is too small for big data. Camp IT December 2014
Three signs your architecture is too small for big data.  Camp IT December 2014Three signs your architecture is too small for big data.  Camp IT December 2014
Three signs your architecture is too small for big data. Camp IT December 2014
 
PostgreSQL as a Strategic Tool
PostgreSQL as a Strategic ToolPostgreSQL as a Strategic Tool
PostgreSQL as a Strategic Tool
 
XtremIO
XtremIOXtremIO
XtremIO
 
MicroProfile Panel - Sept 2016
MicroProfile Panel - Sept 2016MicroProfile Panel - Sept 2016
MicroProfile Panel - Sept 2016
 
#NEOTYSPAC performance testing shift left
#NEOTYSPAC performance testing shift left#NEOTYSPAC performance testing shift left
#NEOTYSPAC performance testing shift left
 
Cognos Dynamic Cubes:Set To Retire Transformer?: 10.2.2 Update: Pros & Cons
Cognos Dynamic Cubes:Set To Retire Transformer?: 10.2.2 Update: Pros & ConsCognos Dynamic Cubes:Set To Retire Transformer?: 10.2.2 Update: Pros & Cons
Cognos Dynamic Cubes:Set To Retire Transformer?: 10.2.2 Update: Pros & Cons
 
SQL Server 2008 Migration
SQL Server 2008 MigrationSQL Server 2008 Migration
SQL Server 2008 Migration
 
Data center insights summit 2015 disruptive force of clouds
Data center insights summit 2015   disruptive force of cloudsData center insights summit 2015   disruptive force of clouds
Data center insights summit 2015 disruptive force of clouds
 
Cloud design principles
Cloud design principlesCloud design principles
Cloud design principles
 
KoprowskiT_SQLRelay2014#3_Bristol_FromPlanToBackupToCloud
KoprowskiT_SQLRelay2014#3_Bristol_FromPlanToBackupToCloudKoprowskiT_SQLRelay2014#3_Bristol_FromPlanToBackupToCloud
KoprowskiT_SQLRelay2014#3_Bristol_FromPlanToBackupToCloud
 
Speeding Time to Insight with a Modern ELT Approach
Speeding Time to Insight with a Modern ELT ApproachSpeeding Time to Insight with a Modern ELT Approach
Speeding Time to Insight with a Modern ELT Approach
 
SQL azure database for DBA
SQL azure database for DBASQL azure database for DBA
SQL azure database for DBA
 
Azure Application Architecture Guide ~Design principles for Azure application...
Azure Application Architecture Guide ~Design principles for Azure application...Azure Application Architecture Guide ~Design principles for Azure application...
Azure Application Architecture Guide ~Design principles for Azure application...
 
StarlingX - Project Onboarding
StarlingX - Project OnboardingStarlingX - Project Onboarding
StarlingX - Project Onboarding
 
Cognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & TricksCognos Performance Tuning Tips & Tricks
Cognos Performance Tuning Tips & Tricks
 
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
 
Surviving the Crisis With the Help of Oracle Database Resource Manager
Surviving the Crisis With the Help of Oracle Database Resource ManagerSurviving the Crisis With the Help of Oracle Database Resource Manager
Surviving the Crisis With the Help of Oracle Database Resource Manager
 
Qardio experience with Core Data
Qardio experience with Core DataQardio experience with Core Data
Qardio experience with Core Data
 
Building Tungsten Clusters with PostgreSQL Hot Standby and Streaming Replication
Building Tungsten Clusters with PostgreSQL Hot Standby and Streaming ReplicationBuilding Tungsten Clusters with PostgreSQL Hot Standby and Streaming Replication
Building Tungsten Clusters with PostgreSQL Hot Standby and Streaming Replication
 

Mais de Fuenteovejuna

Facebook, Robert Johnson
Facebook, Robert JohnsonFacebook, Robert Johnson
Facebook, Robert Johnson
Fuenteovejuna
 
Интеграция открытых технологий и взаимодействие со сторонними проектами в усл...
Интеграция открытых технологий и взаимодействие со сторонними проектами в усл...Интеграция открытых технологий и взаимодействие со сторонними проектами в усл...
Интеграция открытых технологий и взаимодействие со сторонними проектами в усл...
Fuenteovejuna
 
Shared Personalization Service - How To Scale to 15K RPS, Patrice Pelland
Shared Personalization Service - How To Scale to 15K RPS, Patrice PellandShared Personalization Service - How To Scale to 15K RPS, Patrice Pelland
Shared Personalization Service - How To Scale to 15K RPS, Patrice Pelland
Fuenteovejuna
 
Оптимизация одного из топовых приложений для социальной сети ВКонтакте: 1000 ...
Оптимизация одного из топовых приложений для социальной сети ВКонтакте: 1000 ...Оптимизация одного из топовых приложений для социальной сети ВКонтакте: 1000 ...
Оптимизация одного из топовых приложений для социальной сети ВКонтакте: 1000 ...
Fuenteovejuna
 
Практическое создание крупного масштабируемого web 20 c нуля, Дмитрий Бородин
Практическое создание крупного масштабируемого web 20 c нуля, Дмитрий БородинПрактическое создание крупного масштабируемого web 20 c нуля, Дмитрий Бородин
Практическое создание крупного масштабируемого web 20 c нуля, Дмитрий Бородин
Fuenteovejuna
 
Social Monitoring Tool codename Looking Glass, Patrice Pelland
Social Monitoring Tool codename Looking Glass, Patrice PellandSocial Monitoring Tool codename Looking Glass, Patrice Pelland
Social Monitoring Tool codename Looking Glass, Patrice Pelland
Fuenteovejuna
 
Профилирование памяти в приложениях на Python, Антон Грицай
Профилирование памяти в приложениях на Python, Антон ГрицайПрофилирование памяти в приложениях на Python, Антон Грицай
Профилирование памяти в приложениях на Python, Антон Грицай
Fuenteovejuna
 
Компиляция скриптов PHP. Алексей Романенко
Компиляция скриптов PHP. Алексей РоманенкоКомпиляция скриптов PHP. Алексей Романенко
Компиляция скриптов PHP. Алексей Романенко
Fuenteovejuna
 
Сервер-агрегатор на python (аля Xscript FEST), Сумин Андрей, Сабуренков Михаи...
Сервер-агрегатор на python (аля Xscript FEST), Сумин Андрей, Сабуренков Михаи...Сервер-агрегатор на python (аля Xscript FEST), Сумин Андрей, Сабуренков Михаи...
Сервер-агрегатор на python (аля Xscript FEST), Сумин Андрей, Сабуренков Михаи...
Fuenteovejuna
 
Использование 0MQ для построения low latency распределёных систем, Андрей Охл...
Использование 0MQ для построения low latency распределёных систем, Андрей Охл...Использование 0MQ для построения low latency распределёных систем, Андрей Охл...
Использование 0MQ для построения low latency распределёных систем, Андрей Охл...
Fuenteovejuna
 
Некоторые аспекты влияния сходимости протокола BGP на доступность сетевых рес...
Некоторые аспекты влияния сходимости протокола BGP на доступность сетевых рес...Некоторые аспекты влияния сходимости протокола BGP на доступность сетевых рес...
Некоторые аспекты влияния сходимости протокола BGP на доступность сетевых рес...
Fuenteovejuna
 
Тандемные DDoS-атаки. Проблематика уязвимостей в спецификации TCP IP (фундаме...
Тандемные DDoS-атаки. Проблематика уязвимостей в спецификации TCP IP (фундаме...Тандемные DDoS-атаки. Проблематика уязвимостей в спецификации TCP IP (фундаме...
Тандемные DDoS-атаки. Проблематика уязвимостей в спецификации TCP IP (фундаме...
Fuenteovejuna
 
Динамика DDoS-атак в России, Александр Лямин
Динамика DDoS-атак в России, Александр ЛяминДинамика DDoS-атак в России, Александр Лямин
Динамика DDoS-атак в России, Александр Лямин
Fuenteovejuna
 
Быстрое развёртывание шаблонов и статики в Mail.ru, Николай Кондратов
Быстрое развёртывание шаблонов и статики в Mail.ru, Николай КондратовБыстрое развёртывание шаблонов и статики в Mail.ru, Николай Кондратов
Быстрое развёртывание шаблонов и статики в Mail.ru, Николай Кондратов
Fuenteovejuna
 
Extreme Cloud Storage on FreeBSD, Андрей Пантюхин
Extreme Cloud Storage on FreeBSD, Андрей ПантюхинExtreme Cloud Storage on FreeBSD, Андрей Пантюхин
Extreme Cloud Storage on FreeBSD, Андрей Пантюхин
Fuenteovejuna
 
Мониторинг XXI-век, Алиса Смирнова, Дима Никоненко
Мониторинг XXI-век, Алиса Смирнова, Дима НиконенкоМониторинг XXI-век, Алиса Смирнова, Дима Никоненко
Мониторинг XXI-век, Алиса Смирнова, Дима Никоненко
Fuenteovejuna
 
Native Client, Евгений Эльцин
Native Client, Евгений ЭльцинNative Client, Евгений Эльцин
Native Client, Евгений Эльцин
Fuenteovejuna
 
Tarantool Silverbox, Юрий Востриков
Tarantool Silverbox, Юрий ВостриковTarantool Silverbox, Юрий Востриков
Tarantool Silverbox, Юрий Востриков
Fuenteovejuna
 
Real time indexes in Sphinx, Yaroslav Vorozhko
Real time indexes in Sphinx, Yaroslav VorozhkoReal time indexes in Sphinx, Yaroslav Vorozhko
Real time indexes in Sphinx, Yaroslav Vorozhko
Fuenteovejuna
 
Sphinx для высоко-нагруженных и масштабируемых проектов, Вячеслав Крюков
Sphinx для высоко-нагруженных и масштабируемых проектов, Вячеслав КрюковSphinx для высоко-нагруженных и масштабируемых проектов, Вячеслав Крюков
Sphinx для высоко-нагруженных и масштабируемых проектов, Вячеслав Крюков
Fuenteovejuna
 

Mais de Fuenteovejuna (20)

Facebook, Robert Johnson
Facebook, Robert JohnsonFacebook, Robert Johnson
Facebook, Robert Johnson
 
Интеграция открытых технологий и взаимодействие со сторонними проектами в усл...
Интеграция открытых технологий и взаимодействие со сторонними проектами в усл...Интеграция открытых технологий и взаимодействие со сторонними проектами в усл...
Интеграция открытых технологий и взаимодействие со сторонними проектами в усл...
 
Shared Personalization Service - How To Scale to 15K RPS, Patrice Pelland
Shared Personalization Service - How To Scale to 15K RPS, Patrice PellandShared Personalization Service - How To Scale to 15K RPS, Patrice Pelland
Shared Personalization Service - How To Scale to 15K RPS, Patrice Pelland
 
Оптимизация одного из топовых приложений для социальной сети ВКонтакте: 1000 ...
Оптимизация одного из топовых приложений для социальной сети ВКонтакте: 1000 ...Оптимизация одного из топовых приложений для социальной сети ВКонтакте: 1000 ...
Оптимизация одного из топовых приложений для социальной сети ВКонтакте: 1000 ...
 
Практическое создание крупного масштабируемого web 20 c нуля, Дмитрий Бородин
Практическое создание крупного масштабируемого web 20 c нуля, Дмитрий БородинПрактическое создание крупного масштабируемого web 20 c нуля, Дмитрий Бородин
Практическое создание крупного масштабируемого web 20 c нуля, Дмитрий Бородин
 
Social Monitoring Tool codename Looking Glass, Patrice Pelland
Social Monitoring Tool codename Looking Glass, Patrice PellandSocial Monitoring Tool codename Looking Glass, Patrice Pelland
Social Monitoring Tool codename Looking Glass, Patrice Pelland
 
Профилирование памяти в приложениях на Python, Антон Грицай
Профилирование памяти в приложениях на Python, Антон ГрицайПрофилирование памяти в приложениях на Python, Антон Грицай
Профилирование памяти в приложениях на Python, Антон Грицай
 
Компиляция скриптов PHP. Алексей Романенко
Компиляция скриптов PHP. Алексей РоманенкоКомпиляция скриптов PHP. Алексей Романенко
Компиляция скриптов PHP. Алексей Романенко
 
Сервер-агрегатор на python (аля Xscript FEST), Сумин Андрей, Сабуренков Михаи...
Сервер-агрегатор на python (аля Xscript FEST), Сумин Андрей, Сабуренков Михаи...Сервер-агрегатор на python (аля Xscript FEST), Сумин Андрей, Сабуренков Михаи...
Сервер-агрегатор на python (аля Xscript FEST), Сумин Андрей, Сабуренков Михаи...
 
Использование 0MQ для построения low latency распределёных систем, Андрей Охл...
Использование 0MQ для построения low latency распределёных систем, Андрей Охл...Использование 0MQ для построения low latency распределёных систем, Андрей Охл...
Использование 0MQ для построения low latency распределёных систем, Андрей Охл...
 
Некоторые аспекты влияния сходимости протокола BGP на доступность сетевых рес...
Некоторые аспекты влияния сходимости протокола BGP на доступность сетевых рес...Некоторые аспекты влияния сходимости протокола BGP на доступность сетевых рес...
Некоторые аспекты влияния сходимости протокола BGP на доступность сетевых рес...
 
Тандемные DDoS-атаки. Проблематика уязвимостей в спецификации TCP IP (фундаме...
Тандемные DDoS-атаки. Проблематика уязвимостей в спецификации TCP IP (фундаме...Тандемные DDoS-атаки. Проблематика уязвимостей в спецификации TCP IP (фундаме...
Тандемные DDoS-атаки. Проблематика уязвимостей в спецификации TCP IP (фундаме...
 
Динамика DDoS-атак в России, Александр Лямин
Динамика DDoS-атак в России, Александр ЛяминДинамика DDoS-атак в России, Александр Лямин
Динамика DDoS-атак в России, Александр Лямин
 
Быстрое развёртывание шаблонов и статики в Mail.ru, Николай Кондратов
Быстрое развёртывание шаблонов и статики в Mail.ru, Николай КондратовБыстрое развёртывание шаблонов и статики в Mail.ru, Николай Кондратов
Быстрое развёртывание шаблонов и статики в Mail.ru, Николай Кондратов
 
Extreme Cloud Storage on FreeBSD, Андрей Пантюхин
Extreme Cloud Storage on FreeBSD, Андрей ПантюхинExtreme Cloud Storage on FreeBSD, Андрей Пантюхин
Extreme Cloud Storage on FreeBSD, Андрей Пантюхин
 
Мониторинг XXI-век, Алиса Смирнова, Дима Никоненко
Мониторинг XXI-век, Алиса Смирнова, Дима НиконенкоМониторинг XXI-век, Алиса Смирнова, Дима Никоненко
Мониторинг XXI-век, Алиса Смирнова, Дима Никоненко
 
Native Client, Евгений Эльцин
Native Client, Евгений ЭльцинNative Client, Евгений Эльцин
Native Client, Евгений Эльцин
 
Tarantool Silverbox, Юрий Востриков
Tarantool Silverbox, Юрий ВостриковTarantool Silverbox, Юрий Востриков
Tarantool Silverbox, Юрий Востриков
 
Real time indexes in Sphinx, Yaroslav Vorozhko
Real time indexes in Sphinx, Yaroslav VorozhkoReal time indexes in Sphinx, Yaroslav Vorozhko
Real time indexes in Sphinx, Yaroslav Vorozhko
 
Sphinx для высоко-нагруженных и масштабируемых проектов, Вячеслав Крюков
Sphinx для высоко-нагруженных и масштабируемых проектов, Вячеслав КрюковSphinx для высоко-нагруженных и масштабируемых проектов, Вячеслав Крюков
Sphinx для высоко-нагруженных и масштабируемых проектов, Вячеслав Крюков
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

Developing PostgreSQL Performance, Simon Riggs

  • 1. © 2ndQuadrant Limited 2010 Developing PostgreSQL Performance
  • 2. © 2ndQuadrant Limited 2010 Performance Comparisons
  • 3. © 2ndQuadrant Limited 2010 PostgreSQL Performance Gain: Single Node Improvements 7.3.x (est) 7.4.x (est) 8.0.21 8.1.17 8.2.13 8.3.7 8.4.1 0.00% 20.00% 40.00% 60.00% 80.00% 100.00% 120.00% Peak RO TPS Peak RW TPS
  • 4. © 2ndQuadrant Limited 2010 What this talk is about • History of performance analysis & performance development • Lessons learned • Where next?
  • 5. © 2ndQuadrant Limited 2010 Who Am I? • Simon Riggs • Major Developer on PostgreSQL project • CTO, 2ndQuadrant • Database Architect at Abbey National Bank Technical Advisor RDBMS Procurement
  • 6. © 2ndQuadrant Limited 2010 Why performance matters • User Experience (Response time) • Headroom for growth (Selection Risk) • Total Cost of Ownership (Cost profile)
  • 7. © 2ndQuadrant Limited 2010 Dramatis Personae • Simon Riggs • Mark Wong • Jonah Harris • Pavan Deolassee • Manfred Koizar • Tom Lane • Greg Smith • Heikki Linnakangas • Greg Stark • Jan Wieck
  • 8. © 2ndQuadrant Limited 2010 Performance Analysis 7.3.x (est) 7.4.x (est) 8.0.21 8.1.17 8.2.13 8.3.7 8.4.1 0.00% 20.00% 40.00% 60.00% 80.00% 100.00% 120.00% Peak RO TPS Peak RW TPS Laptop Server-based No re-analysis!
  • 9. © 2ndQuadrant Limited 2010 Lessons • Need proper workload analysis • Laptop-only analysis is never good enough • Regular re-analysis is needed for each release
  • 10. © 2ndQuadrant Limited 2010 Target Workloads • Various workloads, all different – High Volume Transactions • Read Only • Read Write – Data Warehouse • Very Large Query • Data Loading • Different approaches required • Different development areas
  • 11. © 2ndQuadrant Limited 2010 Data Warehouse • Optimizer Improvements (all) • Partitioning (8.1, 9.1) • Sort Improvements (8.2-8.3) • WAL avoidance (8.3-9.0) • Hash Join skew avoidance (8.4)
  • 12. © 2ndQuadrant Limited 2010 Real transactional benchmark! • Unisys sponsored benchmarks on 32-way • No way to analyse SQL execution time • EXPLAIN won't work on parameterised statements • Bgwriter gave negative performance benefit • Context switch storms • Massively untuned!
  • 13. © 2ndQuadrant Limited 2010 Breakthroughs • Full stack analysis • Event targeting • Scalability Analysis
  • 14. © 2ndQuadrant Limited 2010 Full stack analysis • Algorithms • Libraries/Modules • Compiler Optimisation • OS Layer Optimisation • Physical Layer • Hardware
  • 15. © 2ndQuadrant Limited 2010 Event targeting • Reject the smoothness assumption: performance is not lost by constant friction • Events – Traffic Jams – Phase changes – Black Swans • Don't look at the totals and averages • Look at the behaviour
  • 16. © 2ndQuadrant Limited 2010 Scalability Analysis • Resource sharing rules • Fine-grained Locking • Lock avoidance • Minimise • Partition • Dependency Removal
  • 17. © 2ndQuadrant Limited 2010 Developments Buffer Alignment (7.4) Buffer Management (8.0) Buffer Manager (8.1) Lock Manager (8.2) Cache Line optimisation (8.2) Snapshot Management (8.3) Buffer recycling (8.3)
  • 18. © 2ndQuadrant Limited 2010 Results
  • 19. © 2ndQuadrant Limited 2010 Conclusions To conclude the above, I think it's safe to say that if we have known PostgreSQL as a slow beast, it's time to re-think (or measure) that, because it has gained quite much performance and scalability in the last three years. Not to speak about its features. György Vilmos http://suckit.blog.hu/2009/09/29/postgresql_history
  • 20. © 2ndQuadrant Limited 2010 Where next? • Transactional Workloads – Smoothness (+10-20%) – Indexing (+10-20%) • Data Warehouse – Indexing – Partitioning – Many available techniques
  • 21. © 2ndQuadrant Limited 2010 Performance Future 7.3.x (est) 7.4.x (est) 8.0.21 8.1.17 8.2.13 8.3.7 8.4.1 0.00% 20.00% 40.00% 60.00% 80.00% 100.00% 120.00% Peak RO TPS Peak RW TPS
  • 22. © 2ndQuadrant Limited 2010 Radical Steps • Architecture is Critical • New options in the DBMS • Mixed mode • Plus, changes for multi-node scalability – Otherwise ignored during this talk
  • 23. © 2ndQuadrant Limited 2010 PostgreSQL Books • http://www.2ndQuadrant.com/books/