quFiles: The right file at the right time Kaushik Veeraraghavan - - PowerPoint PPT Presentation

qufiles the right file at the right time
SMART_READER_LITE
LIVE PREVIEW

quFiles: The right file at the right time Kaushik Veeraraghavan - - PowerPoint PPT Presentation

quFiles: The right file at the right time Kaushik Veeraraghavan Jason Flinn Ed Nightingale * Brian Noble University of Michigan *Microsoft Research (Redmond) Users need different data for different contexts Screen size & Network


slide-1
SLIDE 1

quFiles: The right file at the right time

Kaushik Veeraraghavan Jason Flinn Ed Nightingale* Brian Noble University of Michigan *Microsoft Research (Redmond)

slide-2
SLIDE 2

Users need different data for different contexts

Kaushik Veeraraghavan 2

Users want to see the right file at the right time

Screen size & battery lifetime Platform Network bandwidth & latency

slide-3
SLIDE 3
  • Problem: each application builds both, an adaptation

system and a data management system

  • Our contribution: common abstraction for context-

aware data management

Free developers to build interesting adaptation schemes!

Decouple adaptation from management

Kaushik Veeraraghavan 3

Energy-aware adaptation: SOSP ‘99 Distillation: ASPLOS ‘96

Proxy

slide-4
SLIDE 4

Layer context-awareness in existing FS

  • The way data is presented to users can be different from

how it is stored

– Change the interface used to access data

Kaushik Veeraraghavan 4

  • Create new context-aware systems by just writing policies
  • We built two new applications in a couple weeks!
  • Existing applications that use the file system become

context-aware without any modification

slide-5
SLIDE 5
  • quFiles multiplex different views of a single logical object
  • Context-aware mechanism selects the best representation

quFiles: a unifying abstraction

5 Kaushik Veeraraghavan

slide-6
SLIDE 6

Talk outline

  • What are quFiles?
  • Design & Implementation
  • Case studies
  • Evaluation
  • Related work
  • Conclusion

Kaushik Veeraraghavan 6

slide-7
SLIDE 7

Life of a quFile

  • Utility creates alternate representations of video

quFile utility foo.mp4 foo_low.mp4 foo.tivo

7 Kaushik Veeraraghavan

/videos/foo.qufile

  • Utility creates a quFile and moves representations into it

~~~ ~~~ ~~~ ~~~ ~~~ ~~~

  • Links in the policies
slide-8
SLIDE 8

Name policy: choosing the right name

  • Name policy: 0 or more file names

Kaushik Veeraraghavan 8

foo.mp4 foo.tivo foo.mp4 Name policy: If (device == TiVo) { return “foo.tivo”; } else { return “foo.mp4”; }

  • Policy may dynamically instantiate a new name
slide-9
SLIDE 9

Content policy: choosing the right content

Kaushik Veeraraghavan 9

  • Content policy: specific content for file name
  • Policy may dynamically create a new file and content

foo.mp4 foo.tivo foo.mp4

slide-10
SLIDE 10

quFile edit and cache policies

  • Edit policy: allow, disallow or version
  • Cache policy: which representation to cache

Kaushik Veeraraghavan 10

foo.mp4 foo.tivo foo.mp4 ALLOW DISALLOW

slide-11
SLIDE 11

% % ls video.qufile.raw %

quFiles support multiple views

  • Raw view: shows all contents i.e. representations, policies,…

11 Kaushik Veeraraghavan

~~~ ~~~ ~~~ ~~~ ~~~ ~~~

% ls video.qufile.highres %

  • Custom view: policy may return any representation it wishes
  • No application modification is required to see other views
slide-12
SLIDE 12

Talk outline

  • What are quFiles?
  • Design & Implementation
  • Case studies
  • Evaluation
  • Related work
  • Conclusion

Kaushik Veeraraghavan 12

slide-13
SLIDE 13
  • Cache policy: use spare storage to cache WAV
  • Name & content policy: return WAV if cached, else mp3
  • 4-11% battery lifetime gain; lines of policy code: 94

Power management

13 Kaushik Veeraraghavan

slide-14
SLIDE 14

Copy-on-write versioning

  • Custom versions view

– Name policy: returns names of all past versions (1, 2 or more) – Content policy: dynamically generates past version

  • Lines of policy code: 55

Kaushik Veeraraghavan 14

$ ls paper V $ ls paper.qufile.yesterday V3 $ ls paper.qufile.versions V1 V2 V3

  • Edit policy: save information to an undo log
slide-15
SLIDE 15

Resource-aware directory listing

  • Default view: list files viewable given network quality
  • Custom “all’’ view: “currently_unplayable” suffix
  • Lines of policy code: 98

15 Kaushik Veeraraghavan

slide-16
SLIDE 16

Application-aware adaptation: Odyssey

  • Name: bar.jpeg to all clients
  • Content: best image served in 1 second
  • Edit: disallows content writes, allows metadata writes
  • Lines of policy code: 82

16 Kaushik Veeraraghavan

bar.jpeg bar.jpeg bar.jpeg

slide-17
SLIDE 17

Talk outline

  • What are quFiles?
  • Design & Implementation
  • Case studies
  • Evaluation
  • Related work
  • Conclusion

Kaushik Veeraraghavan 17

slide-18
SLIDE 18

quFiles are easy to implement and use

Component Name Content Edit Cache Total Power Management 32 18 8 36 94 Copy-on-write versioning 29 18 8 N/A 55 Security 20 33 8 N/A 61 Resource-aware directory listing 64 26 8 N/A 98 Odyssey 23 27 32 N/A 82 Platform spec. video display 31 30 8 43 112

Kaushik Veeraraghavan 18

  • quFiles are easy to incorporate in a file system
  • quFiles add 1,600 lines to BlueFS’s 28,000.
  • Almost all policies (see table) require less than 100 lines.
  • Each case study in a week or two. Some 1-2 days.
slide-19
SLIDE 19

Micro-benchmark: Directory listing overhead

  • Worst-case quFile overhead as there’s no activity to amortize cost

– Only 3% overhead for warm; 0.5 ms overhead per file for cold

19 Kaushik Veeraraghavan

50 100 150 200 Time (milliseconds)

No replication quFile-Odyssey Replication

5 10 15 Time (milliseconds)

No replication quFile-Odyssey Replication

Warm Cold

  • quFiles are 2X-3X better than Replication
slide-20
SLIDE 20

Kernel grep

  • grep Linux 2.6.24 source: grep –Rn “foo” linux (9 occurrences)
  • 1% overhead for warm; 6% overhead for scenario

Warm Cold

20 Kaushik Veeraraghavan

20 40 60 Time (seconds)

BlueFS quFile quFile versions view

1 2 Time (seconds)

BlueFS quFile quFile versions view

  • Search all versions: grep –Rn “foo” linux.qufile.versions (18 occurrences)
  • 2X overhead in warm; 31% in cold case
slide-21
SLIDE 21

Related work

  • Semantic File System

– Only expands name space but not content

  • Adaptation systems: Ninja, Odyssey, Puppeteer, …

– No application or OS modification, no proxy. Adaptation policies.

  • Partial-replication: Cymbiosis, PRACTI, Perspective

– Filter-based caching policies can be augmented with context

  • Dynamic resolution of file content: OS X bundles, AFS @sys

– General abstraction w/o baking resolution policies in FS

  • Materialized views in databases

– Context-aware generation of views; operate on data without schema

Kaushik Veeraraghavan 21

slide-22
SLIDE 22
  • quFiles provide first-class support for context in file systems

– Multiplex different views onto single logical object – Context-aware policies select the best view

  • Context-aware systems can be easily built by simply

providing quFile policies

  • Thank you!

Conclusion

22 Kaushik Veeraraghavan

slide-23
SLIDE 23

Kaushik Veeraraghavan 23

slide-24
SLIDE 24

Building blocks of quFiles

  • Policies are file system extensions

– User-level software fault isolation is fine

  • File system change notifications

– To trigger quFile utilities (automation)

  • File system should support directories
  • Context library

– Simple to build: ours is ~250 LOC

24 Kaushik Veeraraghavan

slide-25
SLIDE 25

Why put quFiles in the file system and not middleware, library, …

  • Any application that uses the file system now

becomes context-aware

– Transparency ensures backward compatibility

  • quFiles are a simple abstraction in the FS

– Hooking into POSIX API is simple – readdir, lookup, commit_write, unlink, rename

25 Kaushik Veeraraghavan

slide-26
SLIDE 26

Case study applicability

  • Local & Distributed file systems

– Resource management

  • E.g.: if battery is low, display low-res video

– Copy-on-write versioning – Context-aware redaction

  • Distributed file systems

– Resource-aware directory listing – Application-aware adaptation: Odyssey

Kaushik Veeraraghavan 26

slide-27
SLIDE 27

Andrew-style make

  • Make Linux 2.6.24 kernel

– quFile: version all source files (.c, .h or .S) – 19,844 of 23,062 files

  • Negligible overhead for warm, 1% overhead for cold scenario

Kaushik Veeraraghavan 27

Warm Cold

100 200 300 400 500 Time (seconds)

without quFiles with quFiles

100 200 300 400 500 Time (seconds)

without quFiles with quFiles