Linux and the Flash Storage Revolution

Transcription

Linux and the Flash Storage Revolution
Linux and the
Flash Revolution
Roland Dreier
@rolanddreier
June 2014
© 2014 Pure Storage, Inc. | 1
Intro to flash
• Who
still has a disk Ipod?
• Who
has switched to a laptop
with an SSD?
– Did you notice the
difference?
© 2014 Pure Storage, Inc. | 2
Intro to flash
• Who
still has a disk Ipod?
• Who
has switched to a laptop
with an SSD?
– Did you notice the
difference?
© 2014 Pure Storage, Inc. | 3
Intro to flash
• Who
still has a disk Ipod?
• Who
has switched to a laptop
with an SSD?
– Did you notice the
difference?
© 2014 Pure Storage, Inc. | 4
Intro to flash
• Who
still has a disk Ipod?
• Who
has switched to a laptop
with an SSD?
– Did you notice the
difference?
• Who's
running data center
apps on disk?
© 2014 Pure Storage, Inc. | 5
Flash memory
• Hold
electrons in a floating
gate
• Bottom
–
line:
Fast reads without seek
time
–
Writes / erases slower,
and wear out flash
–
Need ECC, wear leveling
–
[ Retention time, read
disturb ]
© 2014 Pure Storage, Inc. | 6
Flash memory
• Hold
electrons in a floating
gate
• Bottom
–
line:
Fast reads without seek
time
–
Writes / erases slower,
and wear out flash
–
Need ECC, wear leveling
–
[ Retention time, read
disturb ]
© 2014 Pure Storage, Inc. | 7
Flash memory
• Hold
electrons in a floating
gate
• Bottom
–
line:
Fast reads without seek
time
–
Writes / erases slower,
and wear out flash
–
Need ECC, wear leveling
–
[ Retention time, read
disturb ]
© 2014 Pure Storage, Inc. | 8
Flash memory
• Hold
electrons in a floating
gate
• Bottom
–
line:
Fast reads without seek
time
–
Writes / erases slower,
and wear out flash
–
Need ECC, wear leveling
–
[ Retention time, read
disturb ]
© 2014 Pure Storage, Inc. | 9
Flash memory
• Hold
electrons in a floating
gate
• Bottom
–
line:
Fast reads without seek
time
–
Writes / erases slower,
and wear out flash
–
Need ECC, wear leveling
–
[ Retention time, read
disturb ]
© 2014 Pure Storage, Inc. | 10
Implications of flash
• Disk
optimizations like “avoid seeks” or “read sequentially”
no longer apply
• Need
new sophistication (somewhere) to handle flash
management and GC
• How
–
do SSDs usually fail in practice?
Not flash wear-out...
© 2014 Pure Storage, Inc. | 11
Implications of flash
• Disk
optimizations like “avoid seeks” or “read sequentially”
no longer apply
• Need
new sophistication (somewhere) to handle flash
management and GC
• How
–
do SSDs usually fail in practice?
Not flash wear-out...
© 2014 Pure Storage, Inc. | 12
Implications of flash
• Disk
optimizations like “avoid seeks” or “read sequentially”
no longer apply
• Need
new sophistication (somewhere) to handle flash
management and GC
• How
–
–
do SSDs usually fail in practice?
Not flash wear-out...
Firmware bugs!
© 2014 Pure Storage, Inc. | 13
Future non-volatile memory
• Many
candidates to replace
both RAM and flash
– MRAM
–
PCM
–
ReRAM, memristors,
carbon nanotubes, etc.
• These
technologies are farther
away than they appear
• Flash
is closer than it appears
© 2014 Pure Storage, Inc. | 14
Future non-volatile memory
• Many
candidates to replace
both RAM and flash
– MRAM
–
PCM
–
ReRAM, memristors,
carbon nanotubes, etc.
• These
technologies are farther
away than they appear
• Flash
is closer than it appears
© 2014 Pure Storage, Inc. | 15
Future non-volatile memory
• Many
candidates to replace
both RAM and flash
– MRAM
–
PCM
–
ReRAM, memristors,
carbon nanotubes, etc.
• These
technologies are farther
away than they appear
• Flash
is closer than it appears
© 2014 Pure Storage, Inc. | 16
Where to stick your flash
• Memory
bus
• PCIe
• SSDs
• External
boxes (“AFA” / “SSA”)
© 2014 Pure Storage, Inc. | 17
Where to stick your flash
• Memory
bus
• PCIe
• SSDs
• External
boxes (“AFA” / “SSA”)
© 2014 Pure Storage, Inc. | 18
Where to stick your flash
• Memory
bus
• PCIe
• SSDs
• External
boxes (“AFA” / “SSA”)
© 2014 Pure Storage, Inc. | 19
Where to stick your flash
• Memory
bus
• PCIe
• SSDs
• External
boxes (“AFA” / “SSA”)
© 2014 Pure Storage, Inc. | 20
Where to stick your flash
• Memory
bus
• PCIe
• SSDs
• External
–
boxes (“AFA” / “SSA”)
Appliance or array?
–
FC, iSCSI, IB,… ?
© 2014 Pure Storage, Inc. | 21
Linux tech
© 2014 Pure Storage, Inc. | 22
Free space management
• Help
GC
• Discard
• fstrim
AKA TRIM AKA UNMAP
vs. -o discard
© 2014 Pure Storage, Inc. | 23
Free space management
• Help
GC
• Discard
• fstrim
AKA TRIM AKA UNMAP
vs. -o discard
© 2014 Pure Storage, Inc. | 24
Free space management
• Help
GC
• Discard
• fstrim
AKA TRIM AKA UNMAP
vs. -o discard
© 2014 Pure Storage, Inc. | 25
Caching
• dm-cache
and bcache
• Performance
is highly
dependent on workload
© 2014 Pure Storage, Inc. | 26
Caching
• dm-cache
and bcache
• Performance
is highly
dependent on workload
– One disk IO can ruin your
whole second
© 2014 Pure Storage, Inc. | 27
NVMe
• New
storage protocol optimized for high perf, parallel devices
• nvme
driver in Linux since kernel 3.6
© 2014 Pure Storage, Inc. | 28
block mq
• Storage
• Don't
devices and CPUs are getting more parallel
want a single lock per storage device
• Making
its way upstream now
© 2014 Pure Storage, Inc. | 29
Are you using flash?
Your competitors are.
© 2014 Pure Storage, Inc. | 30
Thank You!
© 2014 Pure Storage, Inc. | 31