SlideShare uma empresa Scribd logo
1 de 41
Baixar para ler offline
Firebird and RAID


Choosing the right RAID configuration for
                Firebird.


              Paul Reeves
               IBPhoenix

     mail: preeves@ibphoenix.com
Introduction

Disc drives have become so cheap that im-
plementing RAID for a firebird server is now
very affordable.
Intended Audience
 It is hard enough to sell clients your applica-
tion, never mind get them to invest in a suit-
able server.
 Your clients don't have much of an in-house
IT dept.
 Your Sys Admins don't see why you need a
dedicated RAID array for your departmental
server.
        Unintended Audience
If you are working for a company that can
afford a million dollar SAN this talk may not
be much use to you.
The focus of this talk

Primarily looking at the day to day perform-
ance issues that underly RAID
Data recovery is not really considered.
However data recovery is heavily impacted
by choice of RAID.
What is RAID?

 Redundant Array of Inexpensive Discs

Redundant – if one disc fails the system continues.

Array – Discs grouped together bring better performance.

Inexpensive – Many cheap discs combined can work bet-

ter than more expensive discs.
RAID is NOT

An alternative backup strategy

RAID exists to overcome disc failure, not

data corruption.

Data corruption is copied to all discs so al-

ways make sure you make backups.
Redundancy has a price

All RAID implementations require writing to
more than one disc.
Database updates can actually become
slower (in extreme cases).
Forget about the fancy RAID names
There are just two basic types of RAID configuration
 Mirrored
 Parity

And there is two types of No RAID at all
 JBOD
 Disc striping (concatenating) – RAID 0
JBOD

Just a Bunch Of Discs

Where would we be without acronyms?
RAID 0
Good for creating very large
discs

A disaster waiting to happen.

Not much use for database
storage.

 Becomes very useful when
combined with other RAID
levels.
Mirrored RAID

 Maintain identical data on
two or more discs

 Each disc in the array
requires a write.

Usually implemented as
RAID 1 or RAID 10
Parity RAID
Writes data blocks on every N discs -1 plus parity
block(s).

Distribution of data and parity blocks is evenly
distributed across all discs.

All discs in array must
be written to.

 Calculating parity costs
read I/O.

Usually implemented as
RAID 5, RAID 50, RAID 6 or RAID 60.
Combining RAID levels.
 Two or more arrays are concatenated to make a
larger array.
Choosing the correct RAID level
 Calculating Hard Disc performance
IOPS – Input / Output Operations Per Second

 For hard drives we first need to calculate average
latency:

     Avg Latency = (60 / RPMs / 2) * 1000

We then take the average seek time for the drive
and derive the IOPS:
     IOPS = 1000 / (avg latency + avg seek)
A rough guide to IOPS for different
          disc speeds
Manufacturers don't always provide full specifica-
tions but we can make a good guess.

 RPM        Avg     Avg      RIOPS    Avg    WIOPS
          Latency   Read              Write
                    Seek              Seek
  5,400      5.56     9.40       66    10.50     62
  7,200      4.17     8.50       79     9.50     73
 10,000      3.00     3.80      147     4.40    135
 15,000      2.00     3.50      182     4.00    167
What does IOPS really mean?

IOPS is a theoretical value.
As such it has no relation to actual data
throughput.
IOPS indicates the maximum number of
times per second that a drive could
randomly read or write to a disc.
Random and Sequential Access
    - not what they seem
Sequential access is almost non-existent on
a server if more than one process is
accessing the disc

Random is rarely random – usually several
blocks can be written in a single I/O.
The Write Penalty
RAID     Min. No.   Write     Comment
Level    Disks      Penalty
JBOD /      1          1      One disc. One write.
RAID 0
RAID 1      2          2      Write penalty is directly related to the
                              number of disks in the mirror. For three
                              disks the penalty is 3.
RAID 5      3          4      Every write requires a read of the data
                              block in the stripe, a read of the
                              existing parity block then the actual
                              write of the updated data block and
                              parity block.
RAID 6      4          6      As for RAID 5 except extra parity block
                              requires an additional read and write
Calculating RAID performance
There is a simple formula:

( ( DISK_WIOPS * NO_DISCS * %WRITES )
     / WRITE_PENALTY )

+ ( DISK_RIOPS * NO_DISCS * %READS )

= Theoretical maximum random IOPS for a given
array.
Using Two or Three Discs in a RAID
Four Disc RAID configurations
Six Disc RAID configurations
Eight Disc RAID configurations
Can slower discs be better value than faster
                  discs?
Summary of Theory
Adding discs increases available IOPS.
The Write Penalty is real.
Write intensive applications always benefit from
Mirrored RAID.
For a given number of discs Mirrored RAID will
always outperform Parity RAID in Random I/O
unless the database is read only.
So much for theory.

What about reality?
First, you need a RAID Controller

Firmware based RAID controllers
Software based RAID controllers
Hardware based RAID controllers
Firmware RAID

AKA Fake RAID or Bios RAID.
Usually built into Motherboard or on cheap disc controller
cards.
Not easily portable in the event of failure.
Requires CPU and RAM from host.
It brings the benefit of configuration in the bios.
  By extension, this allows the O/S to boot from the RAID.
  But it also renders remote recovery a problem.
Software RAID

Part of the O/S
No special hardware required
Requires CPU and RAM from Host.
No Vendor Lock-in.
Portable – if Host fails just pop the discs into an-
other computer.
Linux implementation rich in functionality – aims to
provide top class RAID support.
No BBU
Hardware RAID

CPU independent
Built-in cache
Battery backup of cache
Ease of configuration
Multi-platform client GUI (HP, IBM?)
Disc monitoring
Hot spares
Hot swapping
Vendor lock-in.
A word about Stripe/Strip size

What is it?
Does it affect RAID choice?
Does it affect FB page size?
RAID, Strip and Page Size
RAID Performance in the real world

Case study – HP Smart Array 410
Case study – s/w RAID on Linux
INSERTS comparison HW RAID
INSERTS comparison SW RAID
UPDATES comparison HW RAID
UPDATES comparison SW RAID
SELECTS comparison HW RAID
SELECTS comparison SW RAID




Results similar to HW RAID
And what about SSD in all this?
 SSD raises the bar – IOPS do increase massively.
 Wear Levelling, TRIM, Garbage Collection and
Write Amplification pose real problems for database
use especially for MLC based flash drives.
 RAID and TRIM don't (yet) work together.
 Not all SSDs are created equal – check bench-
marks from a reliable h/w test site.
 Don't believe the manufacturers specs.
  Do your own real world tests.
 Smaller drives seem to have poorer performance!
 Price / Capacity ratio is still a hindrance to uptake.
 SS Drives can still fail and when they do, failure is
total.
Conclusion

 We've compared parity and mirrored RAID at the
fundamental, theoretical level.

We've also looked at some real world examples
of RAID.

 Although parity RAID can be tweaked it cannot
out perform a mirrored RAID implementation of
the same spec when deploying a database
server.

Mais conteúdo relacionado

Mais procurados

Synology RAID F1 final
Synology RAID F1 finalSynology RAID F1 final
Synology RAID F1 final
Josh Chambers
 
lenovo_storage_d3284_ds
lenovo_storage_d3284_dslenovo_storage_d3284_ds
lenovo_storage_d3284_ds
John Marquis
 

Mais procurados (20)

NetServ - CD / DVD Server + NAS Storage – PrimeArray
NetServ - CD / DVD Server + NAS Storage – PrimeArrayNetServ - CD / DVD Server + NAS Storage – PrimeArray
NetServ - CD / DVD Server + NAS Storage – PrimeArray
 
Performance evolution of raid
Performance evolution of raidPerformance evolution of raid
Performance evolution of raid
 
Demystifying Storage - Building large SANs
Demystifying  Storage - Building large SANsDemystifying  Storage - Building large SANs
Demystifying Storage - Building large SANs
 
SEMINAR
SEMINARSEMINAR
SEMINAR
 
Raid data recovery Tips
Raid data recovery TipsRaid data recovery Tips
Raid data recovery Tips
 
Understanding RAID Controller
Understanding RAID ControllerUnderstanding RAID Controller
Understanding RAID Controller
 
Raid- Redundant Array of Inexpensive Disks
Raid- Redundant Array of Inexpensive DisksRaid- Redundant Array of Inexpensive Disks
Raid- Redundant Array of Inexpensive Disks
 
Raid
RaidRaid
Raid
 
RAID
RAIDRAID
RAID
 
RAID
RAIDRAID
RAID
 
Raid 5
Raid 5Raid 5
Raid 5
 
Linux admin
Linux adminLinux admin
Linux admin
 
Raid intro
Raid introRaid intro
Raid intro
 
CaSSanDra: An SSD Boosted Key-Value Store
CaSSanDra: An SSD Boosted Key-Value StoreCaSSanDra: An SSD Boosted Key-Value Store
CaSSanDra: An SSD Boosted Key-Value Store
 
Cassandra Day SV 2014: Designing Commodity Storage in Apache Cassandra
Cassandra Day SV 2014: Designing Commodity Storage in Apache CassandraCassandra Day SV 2014: Designing Commodity Storage in Apache Cassandra
Cassandra Day SV 2014: Designing Commodity Storage in Apache Cassandra
 
Demystifying Storage
Demystifying  StorageDemystifying  Storage
Demystifying Storage
 
JetStor NAS 724UXD Dual Controller Active-Active ZFS Based
JetStor NAS 724UXD Dual Controller Active-Active ZFS BasedJetStor NAS 724UXD Dual Controller Active-Active ZFS Based
JetStor NAS 724UXD Dual Controller Active-Active ZFS Based
 
Synology RAID F1 final
Synology RAID F1 finalSynology RAID F1 final
Synology RAID F1 final
 
Raid level 4
Raid level 4Raid level 4
Raid level 4
 
lenovo_storage_d3284_ds
lenovo_storage_d3284_dslenovo_storage_d3284_ds
lenovo_storage_d3284_ds
 

Semelhante a Firebird and RAID

112667416 raid-seminar
112667416 raid-seminar112667416 raid-seminar
112667416 raid-seminar
abhivicram
 
Presentation On RAID(Redundant Array Of Independent Disks) Basics
Presentation On RAID(Redundant Array Of Independent Disks) BasicsPresentation On RAID(Redundant Array Of Independent Disks) Basics
Presentation On RAID(Redundant Array Of Independent Disks) Basics
Kuber Chandra
 

Semelhante a Firebird and RAID (20)

Raid
Raid Raid
Raid
 
GeoVision : CCTV Solutions : RAID vs Non-RAID System for Storing Surveillance...
GeoVision : CCTV Solutions : RAID vs Non-RAID System for Storing Surveillance...GeoVision : CCTV Solutions : RAID vs Non-RAID System for Storing Surveillance...
GeoVision : CCTV Solutions : RAID vs Non-RAID System for Storing Surveillance...
 
Raid+controllers
Raid+controllersRaid+controllers
Raid+controllers
 
Raid (Redundant Array of Inexpensive Disks) in Computer Architecture
Raid (Redundant Array of Inexpensive Disks) in Computer ArchitectureRaid (Redundant Array of Inexpensive Disks) in Computer Architecture
Raid (Redundant Array of Inexpensive Disks) in Computer Architecture
 
Raid the redundant array of independent disks technology overview
Raid the redundant array of independent disks technology overviewRaid the redundant array of independent disks technology overview
Raid the redundant array of independent disks technology overview
 
1.2 raid
1.2  raid1.2  raid
1.2 raid
 
What is R.A.I.D?
What is R.A.I.D?What is R.A.I.D?
What is R.A.I.D?
 
RAID seminar
RAID seminarRAID seminar
RAID seminar
 
112667416 raid-seminar
112667416 raid-seminar112667416 raid-seminar
112667416 raid-seminar
 
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 ...
 
RAID CAAL
RAID CAALRAID CAAL
RAID CAAL
 
RAID-CONFIGURATION (2023).pptx
RAID-CONFIGURATION (2023).pptxRAID-CONFIGURATION (2023).pptx
RAID-CONFIGURATION (2023).pptx
 
Presentation On RAID(Redundant Array Of Independent Disks) Basics
Presentation On RAID(Redundant Array Of Independent Disks) BasicsPresentation On RAID(Redundant Array Of Independent Disks) Basics
Presentation On RAID(Redundant Array Of Independent Disks) Basics
 
RAID (redundant array of independent disks)
RAID  (redundant array of independent disks)RAID  (redundant array of independent disks)
RAID (redundant array of independent disks)
 
Present of Raid and Its Type
Present of Raid and Its TypePresent of Raid and Its Type
Present of Raid and Its Type
 
RAID LEVELS
RAID LEVELSRAID LEVELS
RAID LEVELS
 
Raid and its levels
Raid and its levelsRaid and its levels
Raid and its levels
 
Various raid levels pros & cons
Various raid levels pros & consVarious raid levels pros & cons
Various raid levels pros & cons
 
Raid
RaidRaid
Raid
 
RAID
RAIDRAID
RAID
 

Mais de Mind The Firebird

Tips for using Firebird system tables
Tips for using Firebird system tablesTips for using Firebird system tables
Tips for using Firebird system tables
Mind The Firebird
 
A year in the life of Firebird .Net provider
A year in the life of Firebird .Net providerA year in the life of Firebird .Net provider
A year in the life of Firebird .Net provider
Mind The Firebird
 
How Firebird transactions work
How Firebird transactions workHow Firebird transactions work
How Firebird transactions work
Mind The Firebird
 
Orphans, Corruption, Careful Write, and Logging
Orphans, Corruption, Careful Write, and LoggingOrphans, Corruption, Careful Write, and Logging
Orphans, Corruption, Careful Write, and Logging
Mind The Firebird
 

Mais de Mind The Firebird (20)

Tips for using Firebird system tables
Tips for using Firebird system tablesTips for using Firebird system tables
Tips for using Firebird system tables
 
Using Azure cloud and Firebird to develop applications easily
Using Azure cloud and Firebird to develop applications easilyUsing Azure cloud and Firebird to develop applications easily
Using Azure cloud and Firebird to develop applications easily
 
A year in the life of Firebird .Net provider
A year in the life of Firebird .Net providerA year in the life of Firebird .Net provider
A year in the life of Firebird .Net provider
 
How Firebird transactions work
How Firebird transactions workHow Firebird transactions work
How Firebird transactions work
 
SuperServer in Firebird 3
SuperServer in Firebird 3SuperServer in Firebird 3
SuperServer in Firebird 3
 
Copycat presentation
Copycat presentationCopycat presentation
Copycat presentation
 
Using ТРСС to study Firebird performance
Using ТРСС to study Firebird performanceUsing ТРСС to study Firebird performance
Using ТРСС to study Firebird performance
 
Overview of RedDatabase 2.5
Overview of RedDatabase 2.5Overview of RedDatabase 2.5
Overview of RedDatabase 2.5
 
Creating logs for data auditing in FirebirdSQL
Creating logs for data auditing in FirebirdSQLCreating logs for data auditing in FirebirdSQL
Creating logs for data auditing in FirebirdSQL
 
Firebird Performance counters in details
Firebird Performance counters in detailsFirebird Performance counters in details
Firebird Performance counters in details
 
Understanding Numbers in Firebird SQL
Understanding Numbers in Firebird SQLUnderstanding Numbers in Firebird SQL
Understanding Numbers in Firebird SQL
 
Threading through InterBase, Firebird, and beyond
Threading through InterBase, Firebird, and beyondThreading through InterBase, Firebird, and beyond
Threading through InterBase, Firebird, and beyond
 
New SQL Features in Firebird 3, by Vlad Khorsun
New SQL Features in Firebird 3, by Vlad KhorsunNew SQL Features in Firebird 3, by Vlad Khorsun
New SQL Features in Firebird 3, by Vlad Khorsun
 
Orphans, Corruption, Careful Write, and Logging
Orphans, Corruption, Careful Write, and LoggingOrphans, Corruption, Careful Write, and Logging
Orphans, Corruption, Careful Write, and Logging
 
Firebird release strategy and roadmap for 2015/2016
Firebird release strategy and roadmap for 2015/2016Firebird release strategy and roadmap for 2015/2016
Firebird release strategy and roadmap for 2015/2016
 
Nbackup and Backup: Internals, Usage strategy and Pitfalls, by Dmitry Kuzmenk...
Nbackup and Backup: Internals, Usage strategy and Pitfalls, by Dmitry Kuzmenk...Nbackup and Backup: Internals, Usage strategy and Pitfalls, by Dmitry Kuzmenk...
Nbackup and Backup: Internals, Usage strategy and Pitfalls, by Dmitry Kuzmenk...
 
Working with Large Firebird databases
Working with Large Firebird databasesWorking with Large Firebird databases
Working with Large Firebird databases
 
Stored procedures in Firebird
Stored procedures in FirebirdStored procedures in Firebird
Stored procedures in Firebird
 
Firebird on Linux
Firebird on LinuxFirebird on Linux
Firebird on Linux
 
Superchaging big production systems on Firebird: transactions, garbage, maint...
Superchaging big production systems on Firebird: transactions, garbage, maint...Superchaging big production systems on Firebird: transactions, garbage, maint...
Superchaging big production systems on Firebird: transactions, garbage, maint...
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
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
 

Último (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.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...
 
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...
 
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
 
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
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 

Firebird and RAID

  • 1. Firebird and RAID Choosing the right RAID configuration for Firebird. Paul Reeves IBPhoenix mail: preeves@ibphoenix.com
  • 2. Introduction Disc drives have become so cheap that im- plementing RAID for a firebird server is now very affordable.
  • 3. Intended Audience It is hard enough to sell clients your applica- tion, never mind get them to invest in a suit- able server. Your clients don't have much of an in-house IT dept. Your Sys Admins don't see why you need a dedicated RAID array for your departmental server. Unintended Audience If you are working for a company that can afford a million dollar SAN this talk may not be much use to you.
  • 4. The focus of this talk Primarily looking at the day to day perform- ance issues that underly RAID Data recovery is not really considered. However data recovery is heavily impacted by choice of RAID.
  • 5. What is RAID? Redundant Array of Inexpensive Discs Redundant – if one disc fails the system continues. Array – Discs grouped together bring better performance. Inexpensive – Many cheap discs combined can work bet- ter than more expensive discs.
  • 6. RAID is NOT An alternative backup strategy RAID exists to overcome disc failure, not data corruption. Data corruption is copied to all discs so al- ways make sure you make backups.
  • 7. Redundancy has a price All RAID implementations require writing to more than one disc. Database updates can actually become slower (in extreme cases).
  • 8. Forget about the fancy RAID names There are just two basic types of RAID configuration Mirrored Parity And there is two types of No RAID at all JBOD Disc striping (concatenating) – RAID 0
  • 9. JBOD Just a Bunch Of Discs Where would we be without acronyms?
  • 10. RAID 0 Good for creating very large discs A disaster waiting to happen. Not much use for database storage. Becomes very useful when combined with other RAID levels.
  • 11. Mirrored RAID Maintain identical data on two or more discs Each disc in the array requires a write. Usually implemented as RAID 1 or RAID 10
  • 12. Parity RAID Writes data blocks on every N discs -1 plus parity block(s). Distribution of data and parity blocks is evenly distributed across all discs. All discs in array must be written to. Calculating parity costs read I/O. Usually implemented as RAID 5, RAID 50, RAID 6 or RAID 60.
  • 13. Combining RAID levels. Two or more arrays are concatenated to make a larger array.
  • 14. Choosing the correct RAID level Calculating Hard Disc performance IOPS – Input / Output Operations Per Second For hard drives we first need to calculate average latency: Avg Latency = (60 / RPMs / 2) * 1000 We then take the average seek time for the drive and derive the IOPS: IOPS = 1000 / (avg latency + avg seek)
  • 15. A rough guide to IOPS for different disc speeds Manufacturers don't always provide full specifica- tions but we can make a good guess. RPM Avg Avg RIOPS Avg WIOPS Latency Read Write Seek Seek 5,400 5.56 9.40 66 10.50 62 7,200 4.17 8.50 79 9.50 73 10,000 3.00 3.80 147 4.40 135 15,000 2.00 3.50 182 4.00 167
  • 16. What does IOPS really mean? IOPS is a theoretical value. As such it has no relation to actual data throughput. IOPS indicates the maximum number of times per second that a drive could randomly read or write to a disc.
  • 17. Random and Sequential Access - not what they seem Sequential access is almost non-existent on a server if more than one process is accessing the disc Random is rarely random – usually several blocks can be written in a single I/O.
  • 18. The Write Penalty RAID Min. No. Write Comment Level Disks Penalty JBOD / 1 1 One disc. One write. RAID 0 RAID 1 2 2 Write penalty is directly related to the number of disks in the mirror. For three disks the penalty is 3. RAID 5 3 4 Every write requires a read of the data block in the stripe, a read of the existing parity block then the actual write of the updated data block and parity block. RAID 6 4 6 As for RAID 5 except extra parity block requires an additional read and write
  • 19. Calculating RAID performance There is a simple formula: ( ( DISK_WIOPS * NO_DISCS * %WRITES ) / WRITE_PENALTY ) + ( DISK_RIOPS * NO_DISCS * %READS ) = Theoretical maximum random IOPS for a given array.
  • 20. Using Two or Three Discs in a RAID
  • 21. Four Disc RAID configurations
  • 22. Six Disc RAID configurations
  • 23. Eight Disc RAID configurations
  • 24. Can slower discs be better value than faster discs?
  • 25. Summary of Theory Adding discs increases available IOPS. The Write Penalty is real. Write intensive applications always benefit from Mirrored RAID. For a given number of discs Mirrored RAID will always outperform Parity RAID in Random I/O unless the database is read only.
  • 26. So much for theory. What about reality?
  • 27. First, you need a RAID Controller Firmware based RAID controllers Software based RAID controllers Hardware based RAID controllers
  • 28. Firmware RAID AKA Fake RAID or Bios RAID. Usually built into Motherboard or on cheap disc controller cards. Not easily portable in the event of failure. Requires CPU and RAM from host. It brings the benefit of configuration in the bios. By extension, this allows the O/S to boot from the RAID. But it also renders remote recovery a problem.
  • 29. Software RAID Part of the O/S No special hardware required Requires CPU and RAM from Host. No Vendor Lock-in. Portable – if Host fails just pop the discs into an- other computer. Linux implementation rich in functionality – aims to provide top class RAID support. No BBU
  • 30. Hardware RAID CPU independent Built-in cache Battery backup of cache Ease of configuration Multi-platform client GUI (HP, IBM?) Disc monitoring Hot spares Hot swapping Vendor lock-in.
  • 31. A word about Stripe/Strip size What is it? Does it affect RAID choice? Does it affect FB page size?
  • 32. RAID, Strip and Page Size
  • 33. RAID Performance in the real world Case study – HP Smart Array 410 Case study – s/w RAID on Linux
  • 39. SELECTS comparison SW RAID Results similar to HW RAID
  • 40. And what about SSD in all this? SSD raises the bar – IOPS do increase massively. Wear Levelling, TRIM, Garbage Collection and Write Amplification pose real problems for database use especially for MLC based flash drives. RAID and TRIM don't (yet) work together. Not all SSDs are created equal – check bench- marks from a reliable h/w test site. Don't believe the manufacturers specs. Do your own real world tests. Smaller drives seem to have poorer performance! Price / Capacity ratio is still a hindrance to uptake. SS Drives can still fail and when they do, failure is total.
  • 41. Conclusion We've compared parity and mirrored RAID at the fundamental, theoretical level. We've also looked at some real world examples of RAID. Although parity RAID can be tweaked it cannot out perform a mirrored RAID implementation of the same spec when deploying a database server.