SlideShare a Scribd company logo
1 of 43
Download to read offline
PostgreSQL on ZFS
Bits Hopefully Structured the way you Left Them:

The scary parts followed by a Happy Ending™.
“All good lightning talks have a little FUD.”
… except it’s not FUD.
… and few care or are aware

(thank you cloud providers!)
Cloud providers have duped a generation of
operators into thinking bitrot does not exist.
It does. The reality has been hidden from plain sight,
but it’s there… lurking… silently, waiting…
–Many (myself included)
"If you are not using ZFS, you are losing data."
This has been studied recently for SSDs…
ECC on Flash works until it doesn’t.
Probability will rip your face if you do not acknowledge
its existence and its control over your life.
TL;DR: 4.2% -> 34% of SSDs have one UBER per year
TL;DR: 4.2% -> 34% of SSDs have one UBER per year
How many SSDs in that shiny box 'ya got there?
How many boxes are running?
TL;DR: 4.2% -> 34% of SSDs have one UBER per year
How many SSDs in that shiny box 'ya got there?
How many boxes are running?
(1-(1-uberRate)^(numDisks)) = Probability of UBER/server/year
(1-(1-0.042)^(20)) = 58%
(1-(1-0.34)^(20)) = 99.975%
External Factors for UBER on SSDs:
• Temperature
• Bus Power Consumption
• Data Written by the System Software
• Workload changes due to SSD failure
In a Datacenter…
…no-one can hear your bits scream.
Well, maybe they can…
Take care of your bits.
Your bits are taking care of you.
Take care of your bits.
Your bits are taking care of you.
Answer their cry for help.
Similar studies and research exist for:
• Fibre Channel
• SAS
• SATA
• Tape
• SANs
• Cloud Object Stores
"Groupon’s Deal on FreeBSD"

FreeBSD Journal, July/August 2015
https://www.freebsdfoundation.org/past-issues/freebsd-in-the-enterprise/

https://www.freebsdfoundation.org/wp-content/uploads/2015/12/vol2_no4_groupon.pdf
PostgreSQL and ZFS were meant for each other
PostgreSQL and ZFS were meant for each other
• Because bitrot happens
PostgreSQL and ZFS were meant for each other
• Because bitrot happens
• Because its fast
PostgreSQL and ZFS were meant for each other
• Because bitrot happens
• Because its fast
2-4µs/pwrite(2)!!
PostgreSQL and ZFS were meant for each other
• Because bitrot happens
• Because its fast
PostgreSQL and ZFS were meant for each other
• Because bitrot happens
• Because its fast
PostgreSQL and ZFS were meant for each other
• Because bitrot happens
• Because its fast
P.S. This was observed on 10K RPM spinning rust.
PostgreSQL and ZFS were meant for each other
• Because bitrot happens
• Because its fast
• Because restoring from backups is AWFUL!
# zfsnap snapshot -rv -a 25h tank/pgdata

# zfs list -r -t snapshot
# zfs rollback -r tank/pgdata@hourly-2016-09-14_14.52.00—25h
PostgreSQL and ZFS were meant for each other
• Because bitrot happens
• Because its fast
• Because restoring from backups is AWFUL!
# zfsnap snapshot -rv -a 25h tank/pgdata

# zfs list -r -t snapshot
# zfs rollback -r tank/pgdata@hourly-2016-09-14_14.52.00—25h
This happens in seconds!

It’s YUGE people, absolutely YUGE!
PostgreSQL and ZFS were meant for each other
• Because bitrot happens
• Because its fast
• Because restoring from backups is AWFUL!
• Because compression is a performance win,
even on SSDs
# zfs set compression=lz4 tank/pgdata
(wtb publishing of benchmarks any year now…
you know who you are…)
PostgreSQL and ZFS were meant for each other
• Because bitrot happens
• Because its fast
• Because restoring from backups is AWFUL!
• Because compression is a performance win,
even on SSDs
• Because compression is a space win (2.2:1
compression for most PG data)
PostgreSQL and ZFS were meant for each other
• Because bitrot happens
• Because its fast
• Because restoring from backups is AWFUL!
• Because compression is a performance win,
even on SSDs
• Because compression is a space win (2.2:1
compression for most PG data)
• Because zfs snap; zfs send; ssh… ; zfs recv
PostgreSQL and ZFS were meant for each other
• Because bitrot happens
• Because its fast
• Because restoring from backups is AWFUL!
• Because compression is a performance win,
even on SSDs
• Because compression is a space win (2.2:1
compression for most PG data)
• Because zfs snap; zfs send; ssh… ; zfs recv
• Because caching compressed records is win
https://www.illumos.org/issues/6950
It even runs on Linux!
It even runs on Linux!
Don’t become cranky and
jaded and relearn the
perils of data sadness.
Winning Strategy
Winning Strategy
Be aware.
But take the Blue Pill.
+
Not running PostgreSQL on ZFS is tantamount
to professional negligence. Discuss.

More Related Content

What's hot

Btrfs by Chris Mason
Btrfs by Chris MasonBtrfs by Chris Mason
Btrfs by Chris Mason
Terry Wang
 
B tree file system
B tree file systemB tree file system
B tree file system
Dinesh Gupta
 
ZFS
ZFSZFS
LizardFS-WhitePaper-Eng-v3.9.2-web
LizardFS-WhitePaper-Eng-v3.9.2-webLizardFS-WhitePaper-Eng-v3.9.2-web
LizardFS-WhitePaper-Eng-v3.9.2-web
Szymon Haly
 

What's hot (20)

Comparison of-foss-distributed-storage
Comparison of-foss-distributed-storageComparison of-foss-distributed-storage
Comparison of-foss-distributed-storage
 
Btrfs and Snapper - The Next Steps from Pure Filesystem Features to Integrati...
Btrfs and Snapper - The Next Steps from Pure Filesystem Features to Integrati...Btrfs and Snapper - The Next Steps from Pure Filesystem Features to Integrati...
Btrfs and Snapper - The Next Steps from Pure Filesystem Features to Integrati...
 
Btrfs current status and_future_prospects
Btrfs current status and_future_prospectsBtrfs current status and_future_prospects
Btrfs current status and_future_prospects
 
LinuxCon_2013_NA_Eckermann_Filesystems_btrfs.pdf
LinuxCon_2013_NA_Eckermann_Filesystems_btrfs.pdfLinuxCon_2013_NA_Eckermann_Filesystems_btrfs.pdf
LinuxCon_2013_NA_Eckermann_Filesystems_btrfs.pdf
 
Btrfs by Chris Mason
Btrfs by Chris MasonBtrfs by Chris Mason
Btrfs by Chris Mason
 
LUG-BG 2017 - Rangel Ivanov - Spread some butter - BTRFS
LUG-BG 2017 - Rangel Ivanov - Spread some butter - BTRFSLUG-BG 2017 - Rangel Ivanov - Spread some butter - BTRFS
LUG-BG 2017 - Rangel Ivanov - Spread some butter - BTRFS
 
Postgresql on NFS - J.Battiato, pgday2016
Postgresql on NFS - J.Battiato, pgday2016Postgresql on NFS - J.Battiato, pgday2016
Postgresql on NFS - J.Battiato, pgday2016
 
RAID, Replication, and You
RAID, Replication, and YouRAID, Replication, and You
RAID, Replication, and You
 
ZFS Talk Part 1
ZFS Talk Part 1ZFS Talk Part 1
ZFS Talk Part 1
 
Bluestore
BluestoreBluestore
Bluestore
 
OSDC 2016 - Interesting things you can do with ZFS by Allan Jude&Benedict Reu...
OSDC 2016 - Interesting things you can do with ZFS by Allan Jude&Benedict Reu...OSDC 2016 - Interesting things you can do with ZFS by Allan Jude&Benedict Reu...
OSDC 2016 - Interesting things you can do with ZFS by Allan Jude&Benedict Reu...
 
B tree file system
B tree file systemB tree file system
B tree file system
 
ZFS in 30 minutes
ZFS in 30 minutesZFS in 30 minutes
ZFS in 30 minutes
 
ZFS
ZFSZFS
ZFS
 
Bsdtw17: allan jude: zfs: advanced integration
Bsdtw17: allan jude: zfs: advanced integrationBsdtw17: allan jude: zfs: advanced integration
Bsdtw17: allan jude: zfs: advanced integration
 
ZFS
ZFSZFS
ZFS
 
Performance comparison of Distributed File Systems on 1Gbit networks
Performance comparison of Distributed File Systems on 1Gbit networksPerformance comparison of Distributed File Systems on 1Gbit networks
Performance comparison of Distributed File Systems on 1Gbit networks
 
Filesystem Showdown: What a Difference a Decade Makes
Filesystem Showdown: What a Difference a Decade MakesFilesystem Showdown: What a Difference a Decade Makes
Filesystem Showdown: What a Difference a Decade Makes
 
Zfs Nuts And Bolts
Zfs Nuts And BoltsZfs Nuts And Bolts
Zfs Nuts And Bolts
 
LizardFS-WhitePaper-Eng-v3.9.2-web
LizardFS-WhitePaper-Eng-v3.9.2-webLizardFS-WhitePaper-Eng-v3.9.2-web
LizardFS-WhitePaper-Eng-v3.9.2-web
 

Similar to PostgreSQL on ZFS Lightning Talk

Similar to PostgreSQL on ZFS Lightning Talk (20)

Zfs intro v2
Zfs intro v2Zfs intro v2
Zfs intro v2
 
FreeNAS Guide 9.10.pdf
FreeNAS Guide 9.10.pdfFreeNAS Guide 9.10.pdf
FreeNAS Guide 9.10.pdf
 
The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...
The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...
The Proto-Burst Buffer: Experience with the flash-based file system on SDSC's...
 
Congratsyourthedbatoo
CongratsyourthedbatooCongratsyourthedbatoo
Congratsyourthedbatoo
 
Using ZFS file system with MySQL
Using ZFS file system with MySQLUsing ZFS file system with MySQL
Using ZFS file system with MySQL
 
SSD-Bondi.pptx
SSD-Bondi.pptxSSD-Bondi.pptx
SSD-Bondi.pptx
 
ZFSperftools2012
ZFSperftools2012ZFSperftools2012
ZFSperftools2012
 
Drobo products ppt
Drobo products pptDrobo products ppt
Drobo products ppt
 
PostgreSQL: The Time-Series Database You (Actually) Want
PostgreSQL: The Time-Series Database You (Actually) WantPostgreSQL: The Time-Series Database You (Actually) Want
PostgreSQL: The Time-Series Database You (Actually) Want
 
Life as a GlusterFS Consultant with Ivan Rossi
Life as a GlusterFS Consultant with Ivan RossiLife as a GlusterFS Consultant with Ivan Rossi
Life as a GlusterFS Consultant with Ivan Rossi
 
IMCSummit 2015 - Day 1 Developer Track - Open-Source In-Memory Platforms: Ben...
IMCSummit 2015 - Day 1 Developer Track - Open-Source In-Memory Platforms: Ben...IMCSummit 2015 - Day 1 Developer Track - Open-Source In-Memory Platforms: Ben...
IMCSummit 2015 - Day 1 Developer Track - Open-Source In-Memory Platforms: Ben...
 
GlusterFS w/ Tiered XFS
GlusterFS w/ Tiered XFS  GlusterFS w/ Tiered XFS
GlusterFS w/ Tiered XFS
 
Kafka on ZFS: Better Living Through Filesystems
Kafka on ZFS: Better Living Through Filesystems Kafka on ZFS: Better Living Through Filesystems
Kafka on ZFS: Better Living Through Filesystems
 
The Right Data for the Right Job
The Right Data for the Right JobThe Right Data for the Right Job
The Right Data for the Right Job
 
Distro Recipes 2013 : My ${favorite_linux_distro} is slow!
Distro Recipes 2013 : My ${favorite_linux_distro} is slow!Distro Recipes 2013 : My ${favorite_linux_distro} is slow!
Distro Recipes 2013 : My ${favorite_linux_distro} is slow!
 
Drobo range ppt v.1.6
Drobo range ppt v.1.6Drobo range ppt v.1.6
Drobo range ppt v.1.6
 
Vancouver bug enterprise storage and zfs
Vancouver bug   enterprise storage and zfsVancouver bug   enterprise storage and zfs
Vancouver bug enterprise storage and zfs
 
Open Source Data Deduplication
Open Source Data DeduplicationOpen Source Data Deduplication
Open Source Data Deduplication
 
Get Your GeekOn With Ron - Session Two: Local Storage vs Centralized Storage ...
Get Your GeekOn With Ron - Session Two: Local Storage vs Centralized Storage ...Get Your GeekOn With Ron - Session Two: Local Storage vs Centralized Storage ...
Get Your GeekOn With Ron - Session Two: Local Storage vs Centralized Storage ...
 
The basic concept of Linux FIleSystem
The basic concept of Linux FIleSystemThe basic concept of Linux FIleSystem
The basic concept of Linux FIleSystem
 

More from Sean Chittenden

More from Sean Chittenden (12)

BSDCan '19 Core Update
BSDCan '19 Core UpdateBSDCan '19 Core Update
BSDCan '19 Core Update
 
FreeBSD VPC Introduction
FreeBSD VPC IntroductionFreeBSD VPC Introduction
FreeBSD VPC Introduction
 
Universal Userland
Universal UserlandUniversal Userland
Universal Userland
 
Life Cycle of Metrics, Alerting, and Performance Monitoring in Microservices
Life Cycle of Metrics, Alerting, and Performance Monitoring in MicroservicesLife Cycle of Metrics, Alerting, and Performance Monitoring in Microservices
Life Cycle of Metrics, Alerting, and Performance Monitoring in Microservices
 
Codified PostgreSQL Schema
Codified PostgreSQL SchemaCodified PostgreSQL Schema
Codified PostgreSQL Schema
 
Incrementalism: An Industrial Strategy For Adopting Modern Automation
Incrementalism: An Industrial Strategy For Adopting Modern AutomationIncrementalism: An Industrial Strategy For Adopting Modern Automation
Incrementalism: An Industrial Strategy For Adopting Modern Automation
 
Production Readiness Strategies in an Automated World
Production Readiness Strategies in an Automated WorldProduction Readiness Strategies in an Automated World
Production Readiness Strategies in an Automated World
 
FreeBSD: Dev to Prod
FreeBSD: Dev to ProdFreeBSD: Dev to Prod
FreeBSD: Dev to Prod
 
Dynamic Database Credentials: Security Contingency Planning
Dynamic Database Credentials: Security Contingency PlanningDynamic Database Credentials: Security Contingency Planning
Dynamic Database Credentials: Security Contingency Planning
 
PostgreSQL High-Availability and Geographic Locality using consul
PostgreSQL High-Availability and Geographic Locality using consulPostgreSQL High-Availability and Geographic Locality using consul
PostgreSQL High-Availability and Geographic Locality using consul
 
Modern tooling to assist with developing applications on FreeBSD
Modern tooling to assist with developing applications on FreeBSDModern tooling to assist with developing applications on FreeBSD
Modern tooling to assist with developing applications on FreeBSD
 
Creating PostgreSQL-as-a-Service at Scale
Creating PostgreSQL-as-a-Service at ScaleCreating PostgreSQL-as-a-Service at Scale
Creating PostgreSQL-as-a-Service at Scale
 

Recently uploaded

Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Monica Sydney
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
ayvbos
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptx
galaxypingy
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
gajnagarg
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Monica Sydney
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
ydyuyu
 

Recently uploaded (20)

best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptx
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 

PostgreSQL on ZFS Lightning Talk

  • 1. PostgreSQL on ZFS Bits Hopefully Structured the way you Left Them:
 The scary parts followed by a Happy Ending™.
  • 2. “All good lightning talks have a little FUD.”
  • 3. … except it’s not FUD.
  • 4. … and few care or are aware
 (thank you cloud providers!)
  • 5. Cloud providers have duped a generation of operators into thinking bitrot does not exist. It does. The reality has been hidden from plain sight, but it’s there… lurking… silently, waiting…
  • 6. –Many (myself included) "If you are not using ZFS, you are losing data."
  • 7. This has been studied recently for SSDs…
  • 8.
  • 9. ECC on Flash works until it doesn’t. Probability will rip your face if you do not acknowledge its existence and its control over your life.
  • 10.
  • 11.
  • 12. TL;DR: 4.2% -> 34% of SSDs have one UBER per year
  • 13. TL;DR: 4.2% -> 34% of SSDs have one UBER per year How many SSDs in that shiny box 'ya got there? How many boxes are running?
  • 14. TL;DR: 4.2% -> 34% of SSDs have one UBER per year How many SSDs in that shiny box 'ya got there? How many boxes are running? (1-(1-uberRate)^(numDisks)) = Probability of UBER/server/year (1-(1-0.042)^(20)) = 58% (1-(1-0.34)^(20)) = 99.975%
  • 15. External Factors for UBER on SSDs: • Temperature • Bus Power Consumption • Data Written by the System Software • Workload changes due to SSD failure
  • 16. In a Datacenter… …no-one can hear your bits scream.
  • 17.
  • 19. Take care of your bits. Your bits are taking care of you.
  • 20. Take care of your bits. Your bits are taking care of you. Answer their cry for help.
  • 21. Similar studies and research exist for: • Fibre Channel • SAS • SATA • Tape • SANs • Cloud Object Stores
  • 22. "Groupon’s Deal on FreeBSD"
 FreeBSD Journal, July/August 2015 https://www.freebsdfoundation.org/past-issues/freebsd-in-the-enterprise/
 https://www.freebsdfoundation.org/wp-content/uploads/2015/12/vol2_no4_groupon.pdf
  • 23. PostgreSQL and ZFS were meant for each other
  • 24. PostgreSQL and ZFS were meant for each other • Because bitrot happens
  • 25. PostgreSQL and ZFS were meant for each other • Because bitrot happens • Because its fast
  • 26. PostgreSQL and ZFS were meant for each other • Because bitrot happens • Because its fast 2-4µs/pwrite(2)!!
  • 27. PostgreSQL and ZFS were meant for each other • Because bitrot happens • Because its fast
  • 28. PostgreSQL and ZFS were meant for each other • Because bitrot happens • Because its fast
  • 29. PostgreSQL and ZFS were meant for each other • Because bitrot happens • Because its fast P.S. This was observed on 10K RPM spinning rust.
  • 30. PostgreSQL and ZFS were meant for each other • Because bitrot happens • Because its fast • Because restoring from backups is AWFUL! # zfsnap snapshot -rv -a 25h tank/pgdata
 # zfs list -r -t snapshot # zfs rollback -r tank/pgdata@hourly-2016-09-14_14.52.00—25h
  • 31. PostgreSQL and ZFS were meant for each other • Because bitrot happens • Because its fast • Because restoring from backups is AWFUL! # zfsnap snapshot -rv -a 25h tank/pgdata
 # zfs list -r -t snapshot # zfs rollback -r tank/pgdata@hourly-2016-09-14_14.52.00—25h This happens in seconds!
 It’s YUGE people, absolutely YUGE!
  • 32. PostgreSQL and ZFS were meant for each other • Because bitrot happens • Because its fast • Because restoring from backups is AWFUL! • Because compression is a performance win, even on SSDs # zfs set compression=lz4 tank/pgdata (wtb publishing of benchmarks any year now… you know who you are…)
  • 33. PostgreSQL and ZFS were meant for each other • Because bitrot happens • Because its fast • Because restoring from backups is AWFUL! • Because compression is a performance win, even on SSDs • Because compression is a space win (2.2:1 compression for most PG data)
  • 34. PostgreSQL and ZFS were meant for each other • Because bitrot happens • Because its fast • Because restoring from backups is AWFUL! • Because compression is a performance win, even on SSDs • Because compression is a space win (2.2:1 compression for most PG data) • Because zfs snap; zfs send; ssh… ; zfs recv
  • 35. PostgreSQL and ZFS were meant for each other • Because bitrot happens • Because its fast • Because restoring from backups is AWFUL! • Because compression is a performance win, even on SSDs • Because compression is a space win (2.2:1 compression for most PG data) • Because zfs snap; zfs send; ssh… ; zfs recv • Because caching compressed records is win https://www.illumos.org/issues/6950
  • 36. It even runs on Linux!
  • 37. It even runs on Linux! Don’t become cranky and jaded and relearn the perils of data sadness.
  • 38.
  • 40. Winning Strategy Be aware. But take the Blue Pill.
  • 41. +
  • 42.
  • 43. Not running PostgreSQL on ZFS is tantamount to professional negligence. Discuss.