qufiles: the right file at the right time - snia...2010 storage developer conference. kaushk i...

27
2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved Kaushik Veeraraghavan Jason Flinn Ed Nightingale * Brian Noble University of Michigan *Microsoft Research (Redmond) quFiles: The right file at the right time 1

Upload: others

Post on 26-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

Kaushik VeeraraghavanJason Flinn

Ed Nightingale*

Brian Noble

University of Michigan*Microsoft Research (Redmond)

quFiles: The right file at the right time

1

Page 2: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

Users want to see the right file at the right time

Screen size &battery lifetime Platform Network bandwidth

& latency

Different data for different contexts

2

Page 3: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

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!

Energy-aware adaptation: SOSP ‘99

Distillation: ASPLOS ‘96

Proxy

Decouple adaptation & management

3

Page 4: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

Layer context-awareness in FS

The way data is presented to users can be different from how it is stored Change the interface used to access data

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

4

Page 5: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

quFiles: a unifying abstraction

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

5

Page 6: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

Talk outline

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

6

Page 7: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

Life of a quFile

Utility creates alternate representations of video

quFile utilityfoo.mp4

foo_low.mp4 foo.tivo/videos/foo.qufile

~~~~~~~~~

~~~~~~~~~

Utility creates a quFile and moves representations into it

Links in the policies

7

Page 8: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

Name policy: choose right name

Name policy: 0 or more file names

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

8

Page 9: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

Content policy: choose right content

foo.mp4

foo.tivo

foo.mp4

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

9

Page 10: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

quFile edit and cache policies

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

foo.mp4

foo.tivo

foo.mp4

ALLOW

DISALLOW

10

Page 11: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

% % ls video.qufile.raw%

quFiles support multiple views

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

~~~~~~~~~

~~~~~~~~~

% ls video.qufile.highres%

Custom view: policy may return any representation it wishes No application modification is required to see other views

11

Page 12: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

Talk outline

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

12

Page 13: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

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

Page 14: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

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

$ ls paper

V

$ ls paper.qufile.yesterday

V3

$ ls paper.qufile.versions

V1 V2 V3

Edit policy: save information to an undo log

14

Page 15: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

Resource-aware directory listing

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

15

Page 16: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

bar.jpeg

bar.jpeg

bar.jpeg

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

Page 17: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

Talk outline

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

17

Page 18: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

quFiles are easy to implement & 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

quFiles are easy to incorporate in a file system quFiles only add 1600 lines to BlueFS’s 28,000.

Almost all policies (see table) require less than 100 lines. Each case study implemented in one-two weeks. Some 1-2 days.

18

Page 19: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

Micro-benchmark: Directory listing

Worst-case quFile overhead (no activity to amortize cost) Only 3% overhead for warm; 0.5 ms overhead per file for cold

0

50

100

150

200

Tim

e (m

illis

econ

ds)

No replication quFile-Odyssey Replication

0

5

10

15

Tim

e (m

illis

econ

ds)

No replication quFile-Odyssey Replication

Warm Cold

quFiles are 2X-3X better than replication

19

Page 20: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

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

Warm Cold0

100

200

300

400

500

Tim

e (s

econ

ds)

without quFiles with quFiles

0

100

200

300

400

500

Tim

e (s

econ

ds)

without quFiles with quFiles

20

Page 21: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

Kernel grep

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

Warm Cold0

20

40

60

Tim

e (s

econ

ds)

BlueFS quFile quFile versions view

0

1

2

Tim

e (s

econ

ds)

BlueFS quFile quFile versions view

Search all versions: grep –Rn “foo” linux.qufile.versions (18 hits) 2X overhead in warm; 31% for cold

21

Page 22: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

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

22

Page 23: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

Conclusion

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

23

Page 24: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

24

Page 25: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

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

25

Page 26: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

Why put quFiles in the file system?

Any application that uses the file system now becomes context-aware Transparency ensures backward compatibility

quFiles are a simple abstraction in the file system Hooking into POSIX API is simple readdir, lookup, commit_write, unlink, rename

26

Page 27: quFiles: The right file at the right time - SNIA...2010 Storage Developer Conference. Kaushk i Veeraraghavan All Rights Reserved Andrew-style make Make Linux 2.6.24 kernel quFile:

2010 Storage Developer Conference. Kaushik Veeraraghavan All Rights Reserved

Case study applicability

Local & Distributed file systemsResource management

E.g.: if battery is low, display low-res videoCopy-on-write versioningContext-aware redaction

Distributed file systemsResource-aware directory listingApplication-aware adaptation: Odyssey

27