SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
Êàê PostgreSQL ðàáîòàåò ñ äèñêîì 
Èëüÿ Êîñìîäåìüÿíñêèé 
ik@postgresql-consulting.com
Ïëàí 
 Çà÷åì áàçå äèñê? 
 ×òî îñîáåííîãî â ðàáîòå ñ äèñêîì ó PostgreSQL? 
 Ïîòåíöèàëüíûå óçêèå ìåñòà 
 Ìîíèòîðèíã äèñêîâîé íàãðóçêè 
 Âûáîð àïïàðàòíîãî îáåñïå÷åíèÿ äëÿ ñåðâåðà ñ PostgreSQL 
 Íàñòðîéêà
Çà÷åì áàçå äèñê? 
 ×èòàòü ñòðàíèöû ñ äèñêà 
 Ïèñàòü Write Ahead Log (WAL) 
 Ñèíõðîíèçèðîâàòü WAL ñ õðàíèëèùåì (CHECKPOINT)
Çà÷åì áàçå äèñê? 
 ×èòàòü ñòðàíèöû ñ äèñêà 
 Ïèñàòü Write Ahead Log (WAL) 
 Ñèíõðîíèçèðîâàòü WAL ñ õðàíèëèùåì (CHECKPOINT) 
Ñïåöèôèêà PostgreSQL 
 autovacuum 
 pg_clog 
 tmp, äèñêîâûå ñîðòèðîâêè, õýøèðîâàíèå
Çà÷åì áàçå äèñê? 
 ×èòàòü ñòðàíèöû ñ äèñêà 
 Ïèñàòü Write Ahead Log (WAL) 
 Ñèíõðîíèçèðîâàòü WAL ñ õðàíèëèùåì (CHECKPOINT) 
Ñïåöèôèêà PostgreSQL 
 autovacuum 
 pg_clog 
 tmp, äèñêîâûå ñîðòèðîâêè, õýøèðîâàíèå
Æèçíåííûé öèêë ñòðàíèöû â PostgreSQL 
shared_buers 
l 
êýø ÎÑ 
l 
äèñêè
Checkpoint 
Äëÿ ÷åãî íóæåí? 
 ×èñòûåñòðàíèöû ïîäíèìàþòñÿâ shared_buers, åñëè õîòü îäèí tuple 
èçìåíèëñÿ, ñòðàíèöà ïîìå÷àåòñÿ êàê ãðÿçíàÿ 
 COMMIT; íå âîçâðàùàåò óïðàâëåíèÿ, ïîêà ñòðàíèöà íå çàïèñàíà â WAL 
 Âðåìÿ îò âðåìåíè ïðîèñõîäèò CHECKPOINT: ãðÿçíûå ñòðàíèöû èç 
shared_buers ïèøóòñÿ íà äèñê (fsync) 
 Ïðè áîëüøèõ çíà÷åíèÿõ shared_buers âîçíèêàþò ïðîáëåìû
Checkpoint 
Äèàãíîñòèêà 
 Âñïëåñêè íà ìîíèòîðèíãå äèñêîâîé óòèëèçàöèè (iostat -d -x 1, ïîñëåäíÿÿ 
êîëîíêà, %util) 
 pg_stat_bgwriter
pg_stat_bgwriter 
pgbench=# select * from pg_stat_bgwriter ; 
-[ RECORD 1 ]---------+------------------------------ 
checkpoints_timed | 29 
checkpoints_req | 13 
checkpoint_write_time | 206345 
checkpoint_sync_time | 9989 
buffers_checkpoint | 67720 
buffers_clean | 1046 
maxwritten_clean | 0 
buffers_backend | 48142 
buffers_backend_fsync | 0 
buffers_alloc | 30137 
stats_reset | 2014-10-24 17:59:15.812002-04 
postgres=# select pg_stat_reset_shared(’bgwriter’); 
-[ RECORD 1 ]--------+- 
pg_stat_reset_shared |
×òî äåëàòü? 
Hardware: RAID 
 Äåøåâûé RAID êîíòðîëëåð - çëî, óæ ëó÷øå software RAID 
 RAID êîíòðîëëåð äîëæåí áûòü ñ áàòàðåéêîé 
 Ïðîèçâîäèòåëè: megaraid èëè perc - OK, à íàïðèìåð HP èëè ARECA - íå 
âñåãäà 
 Áàòàðåéêà - ïðèñóòñòâóåò è èñïðàâíà 
 cache mode ! write back 
 io mode ! direct 
 Disk Write Cache Mode ! disabled
×òî äåëàòü? 
Hardware: Äèñêè 
 2,5SAS (âïîëíå áûâàåò 15K) - seek â 2-3 ðàçà áûñòðåå ÷åì 3,5 
 Íå âñå SSD îäèíàêîâî ïîëåçíû: enterprise level Intel p3700 vs desktop-level 
Samsung 
 Èñïîëüçîâàòü òîëüêî SSD äëÿ PostgreSQL îçíà÷àåò áûòü ãîòîâûìè ê ðÿäó 
ïðîáëåì 
 RAID 1+0 
 Eñëè íåò õîðîøèõ äèñêîâ èëè êîíòðîëëåðà - synchronous_commit ! o
×òî äåëàòü? 
Ôàéëîâàÿ ñèñòåìà 
 xfs èëè ext4 - ÎÊ, zfs è ïðî÷èå lvm - íå ïðî ïðîèçâîäèòåëüíîñòü 
 barrier=0, noatime
×òî äåëàòü? 
Îïåðàöèîííàÿ ñèñòåìà 
 Ïî óìîë÷àíèþ vm:dirty_ratio = 20 vm:dirty_background_ratio = 10 - ïëîõî 
 Áîëåå ðàçóìíûå çíà÷åíèÿ vm:dirty_background_bytes = 67108864 
vm:dirty_bytes = 536870912 (512Mb êýø íà RAID) 
 Åñëè íåò êýøà íà RAID - ðàçäåëèòü íà 4
×òî äåëàòü? 
postgresql.conf 
 wal_buers (768kB ! 16Mb) 
 checkpoint_segments (3 - ÷åêïîéíò êàæäûå 48Mb ! 256 - 4Gb) 
 checkpoint_timeout = 60 (÷òî ïåðâîå íàñòóïèò) 
 checkpoint_completion_target = 0:9 (äëÿ ðàñïðåäåëåíèÿ ÷åêïîéíòîâ)
Êàê ñåáÿ ïðîâåðèòü? 
pgdev@pg-dev-deb:~$ tt_pg/bin/pg_test_fsync 
5 seconds per test 
O_DIRECT supported on this platform for open_datasync and open_sync. 
Compare file sync methods using one 8kB write: 
(in wal_sync_method preference order, except fdatasync 
is Linux’s default) 
open_datasync 11396.056 ops/sec 88 usecs/op 
fdatasync 11054.894 ops/sec 90 usecs/op 
fsync 10692.608 ops/sec 94 usecs/op 
fsync_writethrough n/a 
open_sync 67.045 ops/sec 14915 usecs/op 
Compare file sync methods using two 8kB writes: 
(in wal_sync_method preference order, except fdatasync
Íåáîëüøàÿ õèòðîñòü: ïóñòü bgwriter ðàáîòàåò 
postgres=# select name, setting, context, max_val, min_val from pg_settings where name ~ ’bgwr’; 
name | setting | context | max_val | min_val 
-------------------------+---------+---------+---------+--------- 
bgwriter_delay | 200 | sighup | 10000 | 10 
bgwriter_lru_maxpages | 100 | sighup | 1000 | 0 
bgwriter_lru_multiplier | 2 | sighup | 10 | 0 
(3 rows)
Ïðî ÷òî íå çàáûòü: autovacuum 
postgres=# select name, setting, context from pg_settings where category ~ ’Autovacuum’; 
name | setting | context 
-------------------------------------+-----------+------------ 
autovacuum | on | sighup 
autovacuum_analyze_scale_factor | 0.02 | sighup 
autovacuum_analyze_threshold | 50 | sighup 
autovacuum_freeze_max_age | 200000000 | postmaster 
autovacuum_max_workers | 3 | postmaster 
autovacuum_multixact_freeze_max_age | 400000000 | postmaster 
autovacuum_naptime | 60 | sighup 
autovacuum_vacuum_cost_delay | 20 | sighup 
autovacuum_vacuum_cost_limit | -1 | sighup 
autovacuum_vacuum_scale_factor | 0.001 | sighup 
autovacuum_vacuum_threshold | 50 | sighup 
(11 rows)
Âîïðîñû? 
ik@postgresql-consulting.com

Contenu connexe

Tendances

PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016
PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016
PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016Tomas Vondra
 
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)Ontico
 
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 WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PGConf APAC
 
Pgbr 2013 postgres on aws
Pgbr 2013   postgres on awsPgbr 2013   postgres on aws
Pgbr 2013 postgres on awsEmanuel Calvo
 
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 timesAleksander Alekseev
 
PostgreSQL Replication in 10 Minutes - SCALE
PostgreSQL Replication in 10  Minutes - SCALEPostgreSQL Replication in 10  Minutes - SCALE
PostgreSQL Replication in 10 Minutes - SCALEPostgreSQL Experts, Inc.
 
Troubleshooting PostgreSQL with pgCenter
Troubleshooting PostgreSQL with pgCenterTroubleshooting PostgreSQL with pgCenter
Troubleshooting PostgreSQL with pgCenterAlexey Lesovsky
 
Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...
Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...
Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...PostgreSQL-Consulting
 
Logical replication with pglogical
Logical replication with pglogicalLogical replication with pglogical
Logical replication with pglogicalUmair Shahid
 
100500 способов кэширования в Oracle Database или как достичь максимальной ск...
100500 способов кэширования в Oracle Database или как достичь максимальной ск...100500 способов кэширования в Oracle Database или как достичь максимальной ск...
100500 способов кэширования в Oracle Database или как достичь максимальной ск...Ontico
 
Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Alexey Lesovsky
 
Out of the box replication in postgres 9.4(pg confus)
Out of the box replication in postgres 9.4(pg confus)Out of the box replication in postgres 9.4(pg confus)
Out of the box replication in postgres 9.4(pg confus)Denish Patel
 
Troubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming ReplicationTroubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming ReplicationAlexey Lesovsky
 
Patroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyPatroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyAlexander Kukushkin
 

Tendances (20)

PostgreSQL Replication Tutorial
PostgreSQL Replication TutorialPostgreSQL Replication Tutorial
PostgreSQL Replication Tutorial
 
PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016
PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016
PostgreSQL na EXT4, XFS, BTRFS a ZFS / FOSDEM PgDay 2016
 
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
 
Shootout at the PAAS Corral
Shootout at the PAAS CorralShootout at the PAAS Corral
Shootout at the PAAS Corral
 
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 WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs
 
Pgbr 2013 postgres on aws
Pgbr 2013   postgres on awsPgbr 2013   postgres on aws
Pgbr 2013 postgres on aws
 
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
 
GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)
 
PostgreSQL Replication in 10 Minutes - SCALE
PostgreSQL Replication in 10  Minutes - SCALEPostgreSQL Replication in 10  Minutes - SCALE
PostgreSQL Replication in 10 Minutes - SCALE
 
Troubleshooting PostgreSQL with pgCenter
Troubleshooting PostgreSQL with pgCenterTroubleshooting PostgreSQL with pgCenter
Troubleshooting PostgreSQL with pgCenter
 
Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...
Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...
Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...
 
Logical replication with pglogical
Logical replication with pglogicalLogical replication with pglogical
Logical replication with pglogical
 
100500 способов кэширования в Oracle Database или как достичь максимальной ск...
100500 способов кэширования в Oracle Database или как достичь максимальной ск...100500 способов кэширования в Oracle Database или как достичь максимальной ск...
100500 способов кэширования в Oracle Database или как достичь максимальной ск...
 
Shootout at the AWS Corral
Shootout at the AWS CorralShootout at the AWS Corral
Shootout at the AWS Corral
 
Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.
 
Out of the box replication in postgres 9.4(pg confus)
Out of the box replication in postgres 9.4(pg confus)Out of the box replication in postgres 9.4(pg confus)
Out of the box replication in postgres 9.4(pg confus)
 
Troubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming ReplicationTroubleshooting PostgreSQL Streaming Replication
Troubleshooting PostgreSQL Streaming Replication
 
PostgreSQL
PostgreSQLPostgreSQL
PostgreSQL
 
Patroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyPatroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easy
 

En vedette

Linux internals for Database administrators at Linux Piter 2016
Linux internals for Database administrators at Linux Piter 2016Linux internals for Database administrators at Linux Piter 2016
Linux internals for Database administrators at Linux Piter 2016PostgreSQL-Consulting
 
Как PostgreSQL работает с диском, Илья Космодемьянский (PostgreSQL-Consulting)
Как PostgreSQL работает с диском, Илья Космодемьянский (PostgreSQL-Consulting)Как PostgreSQL работает с диском, Илья Космодемьянский (PostgreSQL-Consulting)
Как PostgreSQL работает с диском, Илья Космодемьянский (PostgreSQL-Consulting)Ontico
 
Максим Богук. Postgres-XC
Максим Богук. Postgres-XCМаксим Богук. Postgres-XC
Максим Богук. Postgres-XCPostgreSQL-Consulting
 
Илья Космодемьянский. Использование очередей асинхронных сообщений с PostgreSQL
Илья Космодемьянский. Использование очередей асинхронных сообщений с PostgreSQLИлья Космодемьянский. Использование очередей асинхронных сообщений с PostgreSQL
Илья Космодемьянский. Использование очередей асинхронных сообщений с PostgreSQLPostgreSQL-Consulting
 
#RuPostges в Yandex, эпизод 3. Что же нового в PostgreSQL 9.6
#RuPostges в Yandex, эпизод 3. Что же нового в PostgreSQL 9.6#RuPostges в Yandex, эпизод 3. Что же нового в PostgreSQL 9.6
#RuPostges в Yandex, эпизод 3. Что же нового в PostgreSQL 9.6Nikolay Samokhvalov
 
Infrastructure Monitoring with Postgres
Infrastructure Monitoring with PostgresInfrastructure Monitoring with Postgres
Infrastructure Monitoring with PostgresSteven Simpson
 
PostgreSQL Meetup Berlin at Zalando HQ
PostgreSQL Meetup Berlin at Zalando HQPostgreSQL Meetup Berlin at Zalando HQ
PostgreSQL Meetup Berlin at Zalando HQPostgreSQL-Consulting
 
Облако в Badoo год спустя - работа над ошибками, Юрий Насретдинов (Badoo)
Облако в Badoo год спустя - работа над ошибками, Юрий Насретдинов (Badoo)Облако в Badoo год спустя - работа над ошибками, Юрий Насретдинов (Badoo)
Облако в Badoo год спустя - работа над ошибками, Юрий Насретдинов (Badoo)Badoo Development
 
"Выбраться из спама - как повысить CTR рассылки без потери активности". Андре...
"Выбраться из спама - как повысить CTR рассылки без потери активности". Андре..."Выбраться из спама - как повысить CTR рассылки без потери активности". Андре...
"Выбраться из спама - как повысить CTR рассылки без потери активности". Андре...Badoo Development
 
10 things, an Oracle DBA should care about when moving to PostgreSQL
10 things, an Oracle DBA should care about when moving to PostgreSQL10 things, an Oracle DBA should care about when moving to PostgreSQL
10 things, an Oracle DBA should care about when moving to PostgreSQLPostgreSQL-Consulting
 
Приём платежей в Badoo - взгляд изнутри, Анатолий Панов (Badoo)
Приём платежей в Badoo - взгляд изнутри, Анатолий Панов (Badoo)Приём платежей в Badoo - взгляд изнутри, Анатолий Панов (Badoo)
Приём платежей в Badoo - взгляд изнутри, Анатолий Панов (Badoo)Badoo Development
 
"Sharding - patterns & antipatterns". Доклад Алексея Рыбака (Badoo) и Констан...
"Sharding - patterns & antipatterns". Доклад Алексея Рыбака (Badoo) и Констан..."Sharding - patterns & antipatterns". Доклад Алексея Рыбака (Badoo) и Констан...
"Sharding - patterns & antipatterns". Доклад Алексея Рыбака (Badoo) и Констан...Badoo Development
 
Использование Hadoop в Badoo, Валерий Старынин (Badoo)
Использование Hadoop в Badoo, Валерий Старынин (Badoo)Использование Hadoop в Badoo, Валерий Старынин (Badoo)
Использование Hadoop в Badoo, Валерий Старынин (Badoo)Badoo Development
 
Docker & Puppet - как их скрестить и надо ли вам это, Антон Турецкий (Badoo)
Docker & Puppet - как их скрестить и надо ли вам это, Антон Турецкий (Badoo)Docker & Puppet - как их скрестить и надо ли вам это, Антон Турецкий (Badoo)
Docker & Puppet - как их скрестить и надо ли вам это, Антон Турецкий (Badoo)Badoo Development
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performancePostgreSQL-Consulting
 
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya KosmodemianskyPostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya KosmodemianskyPostgreSQL-Consulting
 

En vedette (19)

Linux internals for Database administrators at Linux Piter 2016
Linux internals for Database administrators at Linux Piter 2016Linux internals for Database administrators at Linux Piter 2016
Linux internals for Database administrators at Linux Piter 2016
 
Как PostgreSQL работает с диском, Илья Космодемьянский (PostgreSQL-Consulting)
Как PostgreSQL работает с диском, Илья Космодемьянский (PostgreSQL-Consulting)Как PostgreSQL работает с диском, Илья Космодемьянский (PostgreSQL-Consulting)
Как PostgreSQL работает с диском, Илья Космодемьянский (PostgreSQL-Consulting)
 
Максим Богук. Postgres-XC
Максим Богук. Postgres-XCМаксим Богук. Postgres-XC
Максим Богук. Postgres-XC
 
Kosmodemiansky wr 2013
Kosmodemiansky wr 2013Kosmodemiansky wr 2013
Kosmodemiansky wr 2013
 
Иван Фролков. Tricky SQL
Иван Фролков. Tricky SQLИван Фролков. Tricky SQL
Иван Фролков. Tricky SQL
 
Илья Космодемьянский. Использование очередей асинхронных сообщений с PostgreSQL
Илья Космодемьянский. Использование очередей асинхронных сообщений с PostgreSQLИлья Космодемьянский. Использование очередей асинхронных сообщений с PostgreSQL
Илья Космодемьянский. Использование очередей асинхронных сообщений с PostgreSQL
 
#RuPostges в Yandex, эпизод 3. Что же нового в PostgreSQL 9.6
#RuPostges в Yandex, эпизод 3. Что же нового в PostgreSQL 9.6#RuPostges в Yandex, эпизод 3. Что же нового в PostgreSQL 9.6
#RuPostges в Yandex, эпизод 3. Что же нового в PostgreSQL 9.6
 
Infrastructure Monitoring with Postgres
Infrastructure Monitoring with PostgresInfrastructure Monitoring with Postgres
Infrastructure Monitoring with Postgres
 
PostgreSQL Meetup Berlin at Zalando HQ
PostgreSQL Meetup Berlin at Zalando HQPostgreSQL Meetup Berlin at Zalando HQ
PostgreSQL Meetup Berlin at Zalando HQ
 
Pgconfru 2015 kosmodemiansky
Pgconfru 2015 kosmodemianskyPgconfru 2015 kosmodemiansky
Pgconfru 2015 kosmodemiansky
 
Облако в Badoo год спустя - работа над ошибками, Юрий Насретдинов (Badoo)
Облако в Badoo год спустя - работа над ошибками, Юрий Насретдинов (Badoo)Облако в Badoo год спустя - работа над ошибками, Юрий Насретдинов (Badoo)
Облако в Badoo год спустя - работа над ошибками, Юрий Насретдинов (Badoo)
 
"Выбраться из спама - как повысить CTR рассылки без потери активности". Андре...
"Выбраться из спама - как повысить CTR рассылки без потери активности". Андре..."Выбраться из спама - как повысить CTR рассылки без потери активности". Андре...
"Выбраться из спама - как повысить CTR рассылки без потери активности". Андре...
 
10 things, an Oracle DBA should care about when moving to PostgreSQL
10 things, an Oracle DBA should care about when moving to PostgreSQL10 things, an Oracle DBA should care about when moving to PostgreSQL
10 things, an Oracle DBA should care about when moving to PostgreSQL
 
Приём платежей в Badoo - взгляд изнутри, Анатолий Панов (Badoo)
Приём платежей в Badoo - взгляд изнутри, Анатолий Панов (Badoo)Приём платежей в Badoo - взгляд изнутри, Анатолий Панов (Badoo)
Приём платежей в Badoo - взгляд изнутри, Анатолий Панов (Badoo)
 
"Sharding - patterns & antipatterns". Доклад Алексея Рыбака (Badoo) и Констан...
"Sharding - patterns & antipatterns". Доклад Алексея Рыбака (Badoo) и Констан..."Sharding - patterns & antipatterns". Доклад Алексея Рыбака (Badoo) и Констан...
"Sharding - patterns & antipatterns". Доклад Алексея Рыбака (Badoo) и Констан...
 
Использование Hadoop в Badoo, Валерий Старынин (Badoo)
Использование Hadoop в Badoo, Валерий Старынин (Badoo)Использование Hadoop в Badoo, Валерий Старынин (Badoo)
Использование Hadoop в Badoo, Валерий Старынин (Badoo)
 
Docker & Puppet - как их скрестить и надо ли вам это, Антон Турецкий (Badoo)
Docker & Puppet - как их скрестить и надо ли вам это, Антон Турецкий (Badoo)Docker & Puppet - как их скрестить и надо ли вам это, Антон Турецкий (Badoo)
Docker & Puppet - как их скрестить и надо ли вам это, Антон Турецкий (Badoo)
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performance
 
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya KosmodemianskyPostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
 

Similaire à Как PostgreSQL работает с диском

Filesystem Performance from a Database Perspective
Filesystem Performance from a Database PerspectiveFilesystem Performance from a Database Perspective
Filesystem Performance from a Database PerspectiveMark Wong
 
20150918 klug el performance tuning-v1.4
20150918 klug el performance tuning-v1.420150918 klug el performance tuning-v1.4
20150918 klug el performance tuning-v1.4Jinkoo Han
 
제2회난공불락 오픈소스 세미나 커널튜닝
제2회난공불락 오픈소스 세미나 커널튜닝제2회난공불락 오픈소스 세미나 커널튜닝
제2회난공불락 오픈소스 세미나 커널튜닝Tommy Lee
 
[CONFidence 2016] Dmitry Chastuhin, Dmitry Yudin - SAP, dos, dos, race condi...
[CONFidence 2016] Dmitry Chastuhin, Dmitry Yudin -  SAP, dos, dos, race condi...[CONFidence 2016] Dmitry Chastuhin, Dmitry Yudin -  SAP, dos, dos, race condi...
[CONFidence 2016] Dmitry Chastuhin, Dmitry Yudin - SAP, dos, dos, race condi...PROIDEA
 
Best Practices with PostgreSQL on Solaris
Best Practices with PostgreSQL on SolarisBest Practices with PostgreSQL on Solaris
Best Practices with PostgreSQL on SolarisJignesh Shah
 
Nagios Conference 2011 - Daniel Wittenberg - Scaling Nagios At A Giant Insur...
Nagios Conference 2011 - Daniel Wittenberg -  Scaling Nagios At A Giant Insur...Nagios Conference 2011 - Daniel Wittenberg -  Scaling Nagios At A Giant Insur...
Nagios Conference 2011 - Daniel Wittenberg - Scaling Nagios At A Giant Insur...Nagios
 
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
 
Grabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the TrunkGrabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the TrunkHarold Giménez
 
Ceph Day Melbourne - Troubleshooting Ceph
Ceph Day Melbourne - Troubleshooting Ceph Ceph Day Melbourne - Troubleshooting Ceph
Ceph Day Melbourne - Troubleshooting Ceph Ceph Community
 
Optimizing, profiling and deploying high performance Spark ML and TensorFlow ...
Optimizing, profiling and deploying high performance Spark ML and TensorFlow ...Optimizing, profiling and deploying high performance Spark ML and TensorFlow ...
Optimizing, profiling and deploying high performance Spark ML and TensorFlow ...DataWorks Summit
 
Pro PostgreSQL, OSCon 2008
Pro PostgreSQL, OSCon 2008Pro PostgreSQL, OSCon 2008
Pro PostgreSQL, OSCon 2008Robert Treat
 
Deep dive into the Rds PostgreSQL Universe Austin 2017
Deep dive into the Rds PostgreSQL Universe Austin 2017Deep dive into the Rds PostgreSQL Universe Austin 2017
Deep dive into the Rds PostgreSQL Universe Austin 2017Grant McAlister
 
Optimize + Deploy Distributed Tensorflow, Spark, and Scikit-Learn Models on GPUs
Optimize + Deploy Distributed Tensorflow, Spark, and Scikit-Learn Models on GPUsOptimize + Deploy Distributed Tensorflow, Spark, and Scikit-Learn Models on GPUs
Optimize + Deploy Distributed Tensorflow, Spark, and Scikit-Learn Models on GPUsChris Fregly
 
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRestPGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRestPGDay.Amsterdam
 
Эксплуатируем неэксплуатируемые уязвимости SAP
Эксплуатируем неэксплуатируемые уязвимости SAPЭксплуатируем неэксплуатируемые уязвимости SAP
Эксплуатируем неэксплуатируемые уязвимости SAPPositive Hack Days
 
Getting access to the SAP server via SAP Management Console
Getting access to the SAP server via SAP Management ConsoleGetting access to the SAP server via SAP Management Console
Getting access to the SAP server via SAP Management ConsoleDmitry Iudin
 
2015.07.16 Способы диагностики PostgreSQL
2015.07.16 Способы диагностики PostgreSQL2015.07.16 Способы диагностики PostgreSQL
2015.07.16 Способы диагностики PostgreSQLdev1ant
 
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 scalabilityWim Godden
 
High Performance Distributed TensorFlow with GPUs - TensorFlow Chicago Meetup...
High Performance Distributed TensorFlow with GPUs - TensorFlow Chicago Meetup...High Performance Distributed TensorFlow with GPUs - TensorFlow Chicago Meetup...
High Performance Distributed TensorFlow with GPUs - TensorFlow Chicago Meetup...Chris Fregly
 
Useful PostgreSQL Extensions
Useful PostgreSQL ExtensionsUseful PostgreSQL Extensions
Useful PostgreSQL ExtensionsEDB
 

Similaire à Как PostgreSQL работает с диском (20)

Filesystem Performance from a Database Perspective
Filesystem Performance from a Database PerspectiveFilesystem Performance from a Database Perspective
Filesystem Performance from a Database Perspective
 
20150918 klug el performance tuning-v1.4
20150918 klug el performance tuning-v1.420150918 klug el performance tuning-v1.4
20150918 klug el performance tuning-v1.4
 
제2회난공불락 오픈소스 세미나 커널튜닝
제2회난공불락 오픈소스 세미나 커널튜닝제2회난공불락 오픈소스 세미나 커널튜닝
제2회난공불락 오픈소스 세미나 커널튜닝
 
[CONFidence 2016] Dmitry Chastuhin, Dmitry Yudin - SAP, dos, dos, race condi...
[CONFidence 2016] Dmitry Chastuhin, Dmitry Yudin -  SAP, dos, dos, race condi...[CONFidence 2016] Dmitry Chastuhin, Dmitry Yudin -  SAP, dos, dos, race condi...
[CONFidence 2016] Dmitry Chastuhin, Dmitry Yudin - SAP, dos, dos, race condi...
 
Best Practices with PostgreSQL on Solaris
Best Practices with PostgreSQL on SolarisBest Practices with PostgreSQL on Solaris
Best Practices with PostgreSQL on Solaris
 
Nagios Conference 2011 - Daniel Wittenberg - Scaling Nagios At A Giant Insur...
Nagios Conference 2011 - Daniel Wittenberg -  Scaling Nagios At A Giant Insur...Nagios Conference 2011 - Daniel Wittenberg -  Scaling Nagios At A Giant Insur...
Nagios Conference 2011 - Daniel Wittenberg - Scaling Nagios At A Giant Insur...
 
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)
 
Grabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the TrunkGrabbing the PostgreSQL Elephant by the Trunk
Grabbing the PostgreSQL Elephant by the Trunk
 
Ceph Day Melbourne - Troubleshooting Ceph
Ceph Day Melbourne - Troubleshooting Ceph Ceph Day Melbourne - Troubleshooting Ceph
Ceph Day Melbourne - Troubleshooting Ceph
 
Optimizing, profiling and deploying high performance Spark ML and TensorFlow ...
Optimizing, profiling and deploying high performance Spark ML and TensorFlow ...Optimizing, profiling and deploying high performance Spark ML and TensorFlow ...
Optimizing, profiling and deploying high performance Spark ML and TensorFlow ...
 
Pro PostgreSQL, OSCon 2008
Pro PostgreSQL, OSCon 2008Pro PostgreSQL, OSCon 2008
Pro PostgreSQL, OSCon 2008
 
Deep dive into the Rds PostgreSQL Universe Austin 2017
Deep dive into the Rds PostgreSQL Universe Austin 2017Deep dive into the Rds PostgreSQL Universe Austin 2017
Deep dive into the Rds PostgreSQL Universe Austin 2017
 
Optimize + Deploy Distributed Tensorflow, Spark, and Scikit-Learn Models on GPUs
Optimize + Deploy Distributed Tensorflow, Spark, and Scikit-Learn Models on GPUsOptimize + Deploy Distributed Tensorflow, Spark, and Scikit-Learn Models on GPUs
Optimize + Deploy Distributed Tensorflow, Spark, and Scikit-Learn Models on GPUs
 
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRestPGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
 
Эксплуатируем неэксплуатируемые уязвимости SAP
Эксплуатируем неэксплуатируемые уязвимости SAPЭксплуатируем неэксплуатируемые уязвимости SAP
Эксплуатируем неэксплуатируемые уязвимости SAP
 
Getting access to the SAP server via SAP Management Console
Getting access to the SAP server via SAP Management ConsoleGetting access to the SAP server via SAP Management Console
Getting access to the SAP server via SAP Management Console
 
2015.07.16 Способы диагностики PostgreSQL
2015.07.16 Способы диагностики PostgreSQL2015.07.16 Способы диагностики PostgreSQL
2015.07.16 Способы диагностики PostgreSQL
 
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
 
High Performance Distributed TensorFlow with GPUs - TensorFlow Chicago Meetup...
High Performance Distributed TensorFlow with GPUs - TensorFlow Chicago Meetup...High Performance Distributed TensorFlow with GPUs - TensorFlow Chicago Meetup...
High Performance Distributed TensorFlow with GPUs - TensorFlow Chicago Meetup...
 
Useful PostgreSQL Extensions
Useful PostgreSQL ExtensionsUseful PostgreSQL Extensions
Useful PostgreSQL Extensions
 

Dernier

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 

Dernier (20)

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 

Как PostgreSQL работает с диском

  • 1. Êàê PostgreSQL ðàáîòàåò ñ äèñêîì Èëüÿ Êîñìîäåìüÿíñêèé ik@postgresql-consulting.com
  • 2. Ïëàí Çà÷åì áàçå äèñê? ×òî îñîáåííîãî â ðàáîòå ñ äèñêîì ó PostgreSQL? Ïîòåíöèàëüíûå óçêèå ìåñòà Ìîíèòîðèíã äèñêîâîé íàãðóçêè Âûáîð àïïàðàòíîãî îáåñïå÷åíèÿ äëÿ ñåðâåðà ñ PostgreSQL Íàñòðîéêà
  • 3. Çà÷åì áàçå äèñê? ×èòàòü ñòðàíèöû ñ äèñêà Ïèñàòü Write Ahead Log (WAL) Ñèíõðîíèçèðîâàòü WAL ñ õðàíèëèùåì (CHECKPOINT)
  • 4. Çà÷åì áàçå äèñê? ×èòàòü ñòðàíèöû ñ äèñêà Ïèñàòü Write Ahead Log (WAL) Ñèíõðîíèçèðîâàòü WAL ñ õðàíèëèùåì (CHECKPOINT) Ñïåöèôèêà PostgreSQL autovacuum pg_clog tmp, äèñêîâûå ñîðòèðîâêè, õýøèðîâàíèå
  • 5. Çà÷åì áàçå äèñê? ×èòàòü ñòðàíèöû ñ äèñêà Ïèñàòü Write Ahead Log (WAL) Ñèíõðîíèçèðîâàòü WAL ñ õðàíèëèùåì (CHECKPOINT) Ñïåöèôèêà PostgreSQL autovacuum pg_clog tmp, äèñêîâûå ñîðòèðîâêè, õýøèðîâàíèå
  • 6. Æèçíåííûé öèêë ñòðàíèöû â PostgreSQL shared_buers l êýø ÎÑ l äèñêè
  • 7. Checkpoint Äëÿ ÷åãî íóæåí? ×èñòûåñòðàíèöû ïîäíèìàþòñÿâ shared_buers, åñëè õîòü îäèí tuple èçìåíèëñÿ, ñòðàíèöà ïîìå÷àåòñÿ êàê ãðÿçíàÿ COMMIT; íå âîçâðàùàåò óïðàâëåíèÿ, ïîêà ñòðàíèöà íå çàïèñàíà â WAL Âðåìÿ îò âðåìåíè ïðîèñõîäèò CHECKPOINT: ãðÿçíûå ñòðàíèöû èç shared_buers ïèøóòñÿ íà äèñê (fsync) Ïðè áîëüøèõ çíà÷åíèÿõ shared_buers âîçíèêàþò ïðîáëåìû
  • 8. Checkpoint Äèàãíîñòèêà Âñïëåñêè íà ìîíèòîðèíãå äèñêîâîé óòèëèçàöèè (iostat -d -x 1, ïîñëåäíÿÿ êîëîíêà, %util) pg_stat_bgwriter
  • 9. pg_stat_bgwriter pgbench=# select * from pg_stat_bgwriter ; -[ RECORD 1 ]---------+------------------------------ checkpoints_timed | 29 checkpoints_req | 13 checkpoint_write_time | 206345 checkpoint_sync_time | 9989 buffers_checkpoint | 67720 buffers_clean | 1046 maxwritten_clean | 0 buffers_backend | 48142 buffers_backend_fsync | 0 buffers_alloc | 30137 stats_reset | 2014-10-24 17:59:15.812002-04 postgres=# select pg_stat_reset_shared(’bgwriter’); -[ RECORD 1 ]--------+- pg_stat_reset_shared |
  • 10. ×òî äåëàòü? Hardware: RAID Äåøåâûé RAID êîíòðîëëåð - çëî, óæ ëó÷øå software RAID RAID êîíòðîëëåð äîëæåí áûòü ñ áàòàðåéêîé Ïðîèçâîäèòåëè: megaraid èëè perc - OK, à íàïðèìåð HP èëè ARECA - íå âñåãäà Áàòàðåéêà - ïðèñóòñòâóåò è èñïðàâíà cache mode ! write back io mode ! direct Disk Write Cache Mode ! disabled
  • 11. ×òî äåëàòü? Hardware: Äèñêè 2,5SAS (âïîëíå áûâàåò 15K) - seek â 2-3 ðàçà áûñòðåå ÷åì 3,5 Íå âñå SSD îäèíàêîâî ïîëåçíû: enterprise level Intel p3700 vs desktop-level Samsung Èñïîëüçîâàòü òîëüêî SSD äëÿ PostgreSQL îçíà÷àåò áûòü ãîòîâûìè ê ðÿäó ïðîáëåì RAID 1+0 Eñëè íåò õîðîøèõ äèñêîâ èëè êîíòðîëëåðà - synchronous_commit ! o
  • 12. ×òî äåëàòü? Ôàéëîâàÿ ñèñòåìà xfs èëè ext4 - ÎÊ, zfs è ïðî÷èå lvm - íå ïðî ïðîèçâîäèòåëüíîñòü barrier=0, noatime
  • 13. ×òî äåëàòü? Îïåðàöèîííàÿ ñèñòåìà Ïî óìîë÷àíèþ vm:dirty_ratio = 20 vm:dirty_background_ratio = 10 - ïëîõî Áîëåå ðàçóìíûå çíà÷åíèÿ vm:dirty_background_bytes = 67108864 vm:dirty_bytes = 536870912 (512Mb êýø íà RAID) Åñëè íåò êýøà íà RAID - ðàçäåëèòü íà 4
  • 14. ×òî äåëàòü? postgresql.conf wal_buers (768kB ! 16Mb) checkpoint_segments (3 - ÷åêïîéíò êàæäûå 48Mb ! 256 - 4Gb) checkpoint_timeout = 60 (÷òî ïåðâîå íàñòóïèò) checkpoint_completion_target = 0:9 (äëÿ ðàñïðåäåëåíèÿ ÷åêïîéíòîâ)
  • 15. Êàê ñåáÿ ïðîâåðèòü? pgdev@pg-dev-deb:~$ tt_pg/bin/pg_test_fsync 5 seconds per test O_DIRECT supported on this platform for open_datasync and open_sync. Compare file sync methods using one 8kB write: (in wal_sync_method preference order, except fdatasync is Linux’s default) open_datasync 11396.056 ops/sec 88 usecs/op fdatasync 11054.894 ops/sec 90 usecs/op fsync 10692.608 ops/sec 94 usecs/op fsync_writethrough n/a open_sync 67.045 ops/sec 14915 usecs/op Compare file sync methods using two 8kB writes: (in wal_sync_method preference order, except fdatasync
  • 16. Íåáîëüøàÿ õèòðîñòü: ïóñòü bgwriter ðàáîòàåò postgres=# select name, setting, context, max_val, min_val from pg_settings where name ~ ’bgwr’; name | setting | context | max_val | min_val -------------------------+---------+---------+---------+--------- bgwriter_delay | 200 | sighup | 10000 | 10 bgwriter_lru_maxpages | 100 | sighup | 1000 | 0 bgwriter_lru_multiplier | 2 | sighup | 10 | 0 (3 rows)
  • 17. Ïðî ÷òî íå çàáûòü: autovacuum postgres=# select name, setting, context from pg_settings where category ~ ’Autovacuum’; name | setting | context -------------------------------------+-----------+------------ autovacuum | on | sighup autovacuum_analyze_scale_factor | 0.02 | sighup autovacuum_analyze_threshold | 50 | sighup autovacuum_freeze_max_age | 200000000 | postmaster autovacuum_max_workers | 3 | postmaster autovacuum_multixact_freeze_max_age | 400000000 | postmaster autovacuum_naptime | 60 | sighup autovacuum_vacuum_cost_delay | 20 | sighup autovacuum_vacuum_cost_limit | -1 | sighup autovacuum_vacuum_scale_factor | 0.001 | sighup autovacuum_vacuum_threshold | 50 | sighup (11 rows)