Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Simon A. F. Lund
CNEX Labs
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 1
Open-Channel SSD
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 2
Open-Channel SSD
• Media
• Controller
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 3
Open-Channel SSD
• Media
• Controller
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 4
Open-Channel SSD: Drive Model
Logical Block
Chunk
Parallel Unit
Group of Parallel Units
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 5
Open-Channel SSD: Addressing
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 6
Open-Channel SSD: Chunk
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 7
Open-Channel SSD: Chunk IO Constraints
nvme-cli
https://github.com/linux-nvme/nvme-cli
SPDK
https://github.com/spdk/spdk
libnvme
https://github.com/hgst/libnvme
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 10
liblightnvm: overview
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 11
liblightnvm: Usages
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 12
liblightnvm: Usages
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 13
liblightnvm: Usages
nvm_cmd_idfy
struct nvm_dev
nvm_dev_openf(ident, flags)
nvm_dev_get_wsopt(dev)
nvm_dev_get_geo(dev)
struct nvm_geo
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 15
liblightnvm: OCSSD Device Attributes
DEMO: nvm_cmd_idfy
https://asciinema.org/a/WJJMxRKsgAq0GIbWlfhIA
GZDl
nvm_cmd_rprt
Retrieve chunk descriptors for all chunks
Retrieve chunk descriptors for all chunks in a
parallel unit
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 17
liblightnvm: OCSSD Media State
nvm_cmd_rprt
Retrieve chunk descriptors for all chunks
Retrieve chunk descriptors for all chunks in a
parallel unit
nvm_cmd_rprt_arbs
Provides N arbitrary chunk addresses in the
requested state in distinct parallel units
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 18
liblightnvm: OCSSD Media State
DEMO
https://asciinema.org/a/XGppr2Yjdc90fsoyLCPVCx
0sc
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 19
liblightnvm: OCSSD Addressing
struct nvm_addr
Geometric accessors
Address translation is handled by the library
User does not need to know about the LBAF
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 20
liblightnvm: OCSSD Addressing
struct nvm_addr
Geometric accessors
Address translation is handled by the library
User does not need to know about the LBAF
nvm_dev_gen2dev
nvm_dev_dev2gen
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 21
liblightnvm: OCSSD Addressing
DEMO
https://asciinema.org/a/tFwlWRMq0DwwvK5oq5b
CuBpty
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 22
liblightnvm: OCSSD IO Commands
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 23
liblightnvm: OCSSD IO Commands
DEMO
https://asciinema.org/a/iq8hoPAYpXSqY5Jgq67Sr
bA1Q
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 24
liblightnvm: OCSSD IO Command Options
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 25
liblightnvm: OCSSD IO Command Options
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 26
liblightnvm: OCSSD IO Command Options
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 28
liblightnvm: OCSSD IO Command Options
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 29
liblightnvm: OCSSD IO Command Options
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 30
liblightnvm: OCSSD IO Command Options
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 31
liblightnvm: OCSSD IO Command Options
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 32
liblightnvm: OCSSD IO Command Options
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 33
liblightnvm: OCSSD IO Command Options
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 34
liblightnvm: Striping
chunk0 chunk1 chunk2 chunk3 chunk0 chunk1 chunk2 chunk3
VERT HORZ
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 35
liblightnvm: Striping
chunk0 chunk1 chunk2 chunk3 chunk0 chunk1 chunk2 chunk3
VERT HORZ
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 36
liblightnvm: Striping Caveat
chunk0 chunk1 chunk2 chunk3
Constraints amplified
Write-cache increase
MWC x k
Optimal write-size
WS_OPT x k
Minimal write is intact
HORZ
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 37
liblightnvm: OCSSD ASYNC IO Example
DEMO
https://asciinema.org/a/8bo7Ma0DWqqZaMQRelG
WDNTaf
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 38
liblightnvm: Abstractions
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 39
liblightnvm: Abstractions
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 40
liblightnvm: Abstractions
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 41
liblightnvm: Virtual Block
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 42
liblightnvm: Virtual Block
Traditional IO Semantics
nvm_vblk_write(*vblk, *buf, count)
nvm_vblk_read(*vblk, *buf, count)
nvm_vblk_pread(*vblk, *buf, count, offset)
Agnostic to media and spec. variation
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 43
liblightnvm: Virtual Block
DEMO
https://asciinema.org/a/HnPa9smu8W6HoeyaqC6
DavBeo
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 44
liblightnvm: Append-Only Streams
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 45
liblightnvm: Append-Only Streams
Traditional IO Semantics
aos_write(sid, *buf, count)
aos_read(sid, *buf, count)
aos_pread(sid, *buf, count, read)
Agnostic to media and spec. variation
Encapsulates geometry and addressing
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 46
liblightnvm: Append-Only Streams
DEMO
https://asciinema.org/a/ljb7fhetCKmRCd79G8cbYp
aic
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 47
liblightnvm: Summary
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 48
Roadmap: Persistent CMB interface
Raw IO oriented
nvm_cmb_write nvm_cmb_io_write
nvm_cmd_read nvm_cmb_io_read
nvm_cmd_io_push
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 49
Roadmap: Spec. support
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 50
Roadmap: Related tools
nvm_ui
Web interface for management of PBLK
instances, NVMoF targets, subsystems and
ports
Visualization of IO stats. in real-time
CIJOE
Toolchain for QA, test, and development
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 51
Roadmap: Collaboration
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 52
Roadmap: Collaboration
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 53
Thanks
SRC http://github.com/OpenChannelSSD/liblightnvm
DOC http://lightnvm.io/liblightnvm
MAIL slund@cnexlabs.com
www.linkedin.com/in/simonlund
2018 Storage Developer Conference. © CNEX Labs, Inc. All Rights Reserved. 54