Your SlideShare is downloading. ×
0
ZFS Channel Programs
Proposed Project
Background: Administrative Ops & Synctasks
● ZFS administrative operations are done
transactionally as part of “synctasks”...
What are the problems?
● The time between txgs can be 10+ seconds.
a. When doing consecutive operations each one
blocks fo...
What are the problems?
● Only transactionally consistent within synctask.
a. Forces logic into user space that could be
mo...
What are the problems?
● Encourages more and more complicated
synctasks in the kernel for correct behavior
● zfs destroy -...
Solution: ZFS Channel Programs
● Send a stream of instructions into the kernel for
execution by ZFS in syncing context.
● ...
Sample Channel Program
zfs destroy -r
for snap in zfs.snapshots_of(target)
zfs.destroy(snap)
zfs.destroy(target)
Plan of Action
Refactor existing sync task code to unify shared
execution paths.
Add Lua interpreter to kernel, implement ...
Upcoming SlideShare
Loading in...5
×

OpenZFS Channel programs

511

Published on

Talk by Chris Siden & Max Grossman at the 2013 OpenZFS Developer Summit

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
511
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
17
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "OpenZFS Channel programs"

  1. 1. ZFS Channel Programs Proposed Project
  2. 2. Background: Administrative Ops & Synctasks ● ZFS administrative operations are done transactionally as part of “synctasks”. Examples: ● zfs create ● zfs snapshot ● zfs set ● ‘zfs’ command sends ioctl to kernel ● Kernel queues operation’s synctask for execution ● synctasks are processed at the end of each txg in syncing context (holds config lock for write) ● User must wait for txg to complete
  3. 3. What are the problems? ● The time between txgs can be 10+ seconds. a. When doing consecutive operations each one blocks for 10+ seconds. b. Example: Delphix stores VMs on ZFS and keeps metadata in ZFS properties, simple operations like “create VM” take 30+ seconds waiting for synctasks
  4. 4. What are the problems? ● Only transactionally consistent within synctask. a. Forces logic into user space that could be more efficiently/correctly implemented in the kernel b. Example: zfs destroy -r gathers the list of snapshots to destroy in open context from userland. Also destroy of snapshots and destroy of filesystem are separate transactions.
  5. 5. What are the problems? ● Encourages more and more complicated synctasks in the kernel for correct behavior ● zfs destroy -p ● zfs rollback -p ● zfs snapshot <snap>,<snap>,... ● zfs snapshot (unless property is set)
  6. 6. Solution: ZFS Channel Programs ● Send a stream of instructions into the kernel for execution by ZFS in syncing context. ● Being in syncing context guarantees atomicity, consistent state changes, single-TXG execution. ● Enables rapid development of new “sync tasks” from existing intrinsics.
  7. 7. Sample Channel Program zfs destroy -r for snap in zfs.snapshots_of(target) zfs.destroy(snap) zfs.destroy(target)
  8. 8. Plan of Action Refactor existing sync task code to unify shared execution paths. Add Lua interpreter to kernel, implement ZFS intrinsics (destroy, snapshot, etc) as extensions to the Lua language that call into refactored sync tasks. Add ZFS Lua iterators, e.g. children(fs), snapshots (fs), etc.
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×