memfs A FUSE Memory File System Softwarepraktikum f ur - - PowerPoint PPT Presentation

memfs a fuse memory file system
SMART_READER_LITE
LIVE PREVIEW

memfs A FUSE Memory File System Softwarepraktikum f ur - - PowerPoint PPT Presentation

Introduction memfs Evaluation Conclusion and Future Work memfs A FUSE Memory File System Softwarepraktikum f ur Fortgeschrittene Michael Kuhn Parallele und Verteilte Systeme Institut f ur Informatik Ruprecht-Karls-Universit at


slide-1
SLIDE 1

Introduction memfs Evaluation Conclusion and Future Work

memfs – A FUSE Memory File System

Softwarepraktikum f¨ ur Fortgeschrittene Michael Kuhn

Parallele und Verteilte Systeme Institut f¨ ur Informatik Ruprecht-Karls-Universit¨ at Heidelberg

2008-10-28

1 / 18

slide-2
SLIDE 2

Introduction memfs Evaluation Conclusion and Future Work

1

Introduction Introduction

2

memfs

3

Evaluation

4

Conclusion and Future Work

2 / 18

slide-3
SLIDE 3

Introduction memfs Evaluation Conclusion and Future Work Introduction

FUSE

Goal was to measure the overhead of the FUSE ctfs indicated that FUSE introduces significant overhead when a large number of files is processed FUSE file systems run in user space

They use the special device /dev/fuse to communicate with the kernel part of FUSE

More expensive context switches have to be performed

3 / 18

slide-4
SLIDE 4

Introduction memfs Evaluation Conclusion and Future Work Introduction

memfs

What?

A FUSE memory file system Like tmpfs

Why?

Measure FUSE overhead

Eliminate the influence of the relatively slow hard disk

tmpfs for normal users

4 / 18

slide-5
SLIDE 5

Introduction memfs Evaluation Conclusion and Future Work

1

Introduction

2

memfs Overview /opts directory Complex Operations

3

Evaluation

4

Conclusion and Future Work

5 / 18

slide-6
SLIDE 6

Introduction memfs Evaluation Conclusion and Future Work Overview

Works like any other file system Selectable backends for directory entries

Currently hash tables and balanced binary trees are supported

chmod, chown, open and utimens are merely empty stubs

fileop will not run without those

Idea: Use empty operations to measure FUSE overhead

6 / 18

slide-7
SLIDE 7

Introduction memfs Evaluation Conclusion and Future Work /opts directory

Like /proc, just for memfs Can configure options at runtime Currently only no data is supported

Discards any data written to a file Returns bogus data File size is updated correctly

For example:

$ echo 1 > $HOME/memfs/opts/no data $ cat $HOME/memfs/opts/no data

7 / 18

slide-8
SLIDE 8

Introduction memfs Evaluation Conclusion and Future Work Complex Operations

Some FUSE file system operations are complex

They are internally made up of several file system operations

setattr()

After chmod(), chown(), truncate() and utimens() an implicit getattr() is performed

lookup()

After create(), mknod(), mkdir(), symlink(), and link() an implicit getattr() is performed

close() does not do (too much) implicit work

Let’s use that one

8 / 18

slide-9
SLIDE 9

Introduction memfs Evaluation Conclusion and Future Work

1

Introduction

2

memfs

3

Evaluation Evaluation Costs

4

Conclusion and Future Work

9 / 18

slide-10
SLIDE 10

Introduction memfs Evaluation Conclusion and Future Work Evaluation

mkdir rmdir create close stat access chmod readdir link unlink delete 100000 200000 300000 400000 500000 600000 700000 125,000 Files memfs (Hash Table) memfs (Binary Tree) tmpfs

  • ps/s

10 / 18

slide-11
SLIDE 11

Introduction memfs Evaluation Conclusion and Future Work Evaluation

mkdir rmdir create close stat access chmod readdir link unlink delete 100000 200000 300000 400000 500000 600000 700000 512,000 Files memfs (Hash Table) memfs (Binary Tree) tmpfs

  • ps/s

11 / 18

slide-12
SLIDE 12

Introduction memfs Evaluation Conclusion and Future Work Evaluation

mkdir rmdir create close stat access chmod readdir link unlink delete 5000 10000 15000 20000 25000 30000 35000 40000 45000 1,000,000 Files memfs (Hash Table) memfs (Binary Tree)

  • ps/s

12 / 18

slide-13
SLIDE 13

Introduction memfs Evaluation Conclusion and Future Work Evaluation

mkdir rmdir create close stat access chmod readdir link unlink delete 10000 20000 30000 40000 50000 60000 memfs (Hash Table) 125,000 Files 512,000 Files 1,000,000 Files

  • ps/s

13 / 18

slide-14
SLIDE 14

Introduction memfs Evaluation Conclusion and Future Work Evaluation

mkdir rmdir create close stat access chmod readdir link unlink delete 10000 20000 30000 40000 50000 60000 memfs (Binary Tree) 125,000 Files 512,000 Files 1,000,000 Files

  • ps/s

14 / 18

slide-15
SLIDE 15

Introduction memfs Evaluation Conclusion and Future Work Evaluation

mkdir rmdir create close stat access chmod readdir link unlink delete 100000 200000 300000 400000 500000 600000 700000 tmpfs 125,000 Files 512,000 Files

  • ps/s

15 / 18

slide-16
SLIDE 16

Introduction memfs Evaluation Conclusion and Future Work Costs

tmpfs

Mode switch into the kernel Mode switch out of the kernel

memfs

Mode switch into the kernel Context switch into memfs Context switch out of memfs Mode switch out of the kernel

16 / 18

slide-17
SLIDE 17

Introduction memfs Evaluation Conclusion and Future Work

1

Introduction

2

memfs

3

Evaluation

4

Conclusion and Future Work Conclusion and Future Work

17 / 18

slide-18
SLIDE 18

Introduction memfs Evaluation Conclusion and Future Work Conclusion and Future Work

memfs is a memory file system that is configurable at runtime

Can be easily extended to use arbitrary data structures as backends Basis for benchmarking and – hopefully – tuning of FUSE with large amounts of files

It is hard to measure the overhead with empty stub operations

FUSE performs implicit getattr() calls for most of them release() is one of the few operations that can be used Should give a good estimate of the possible maximum that FUSE is capable of Modify the FUSE user-space library to make the implicit getattr() calls conditional

18 / 18