memfs a fuse memory file system
play

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


  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

  2. Introduction memfs Evaluation Conclusion and Future Work Introduction 1 Introduction memfs 2 Evaluation 3 Conclusion and Future Work 4 2 / 18

  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

  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

  5. Introduction memfs Evaluation Conclusion and Future Work Introduction 1 memfs 2 Overview /opts directory Complex Operations Evaluation 3 Conclusion and Future Work 4 5 / 18

  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

  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

  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

  9. Introduction memfs Evaluation Conclusion and Future Work Introduction 1 memfs 2 Evaluation 3 Evaluation Costs Conclusion and Future Work 4 9 / 18

  10. Introduction memfs Evaluation Conclusion and Future Work Evaluation 125,000 Files 700000 memfs (Hash memfs (Binary tmpfs Table) Tree) 600000 500000 400000 ops/s 300000 200000 100000 0 rmdir close access readdir unlink mkdir create stat chmod link delete 10 / 18

  11. Introduction memfs Evaluation Conclusion and Future Work Evaluation 512,000 Files 700000 memfs (Hash memfs (Binary tmpfs Table) Tree) 600000 500000 400000 ops/s 300000 200000 100000 0 rmdir close access readdir unlink mkdir create stat chmod link delete 11 / 18

  12. Introduction memfs Evaluation Conclusion and Future Work Evaluation 1,000,000 Files 45000 memfs (Hash memfs (Binary Table) Tree) 40000 35000 30000 25000 ops/s 20000 15000 10000 5000 0 rmdir close access readdir unlink mkdir create stat chmod link delete 12 / 18

  13. Introduction memfs Evaluation Conclusion and Future Work Evaluation memfs (Hash Table) 60000 125,000 Files 512,000 Files 1,000,000 Files 50000 40000 30000 ops/s 20000 10000 0 rmdir close access readdir unlink mkdir create stat chmod link delete 13 / 18

  14. Introduction memfs Evaluation Conclusion and Future Work Evaluation memfs (Binary Tree) 60000 125,000 Files 512,000 Files 1,000,000 Files 50000 40000 30000 ops/s 20000 10000 0 rmdir close access readdir unlink mkdir create stat chmod link delete 14 / 18

  15. Introduction memfs Evaluation Conclusion and Future Work Evaluation tmpfs 700000 125,000 Files 512,000 Files 600000 500000 400000 ops/s 300000 200000 100000 0 rmdir close access readdir unlink mkdir create stat chmod link delete 15 / 18

  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

  17. Introduction memfs Evaluation Conclusion and Future Work Introduction 1 memfs 2 Evaluation 3 Conclusion and Future Work 4 Conclusion and Future Work 17 / 18

  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

Recommend


More recommend