Reiser4 - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

Reiser4

Description:

Reiser4. By Hans Reiser. Owner/Architect. Namesys Corporation. Reiser4 New Features Overview ... Reiser's Caching Principle: Increasing temperature variance ... – PowerPoint PPT presentation

Number of Views:122
Avg rating:3.0/5.0
Slides: 25
Provided by: onager
Category:
Tags: hans | reiser | reiser4

less

Transcript and Presenter's Notes

Title: Reiser4


1
Reiser4
  • By Hans Reiser
  • Owner/Architect
  • Namesys Corporation

2
Reiser4 New Features Overview
  • Performance
  • Dancing trees (squeeze on flush)
  • BLOBs replaced with extents on the twig level
  • Allocate on flush ala XFS
  • encrypt on flush (unique to us)
  • Wandering logs
  • Bottom up locking
  • Repacker (debugging and tweaking now)
  • Plugins make it easy to extend
  • Transactions (no isolation this year, only
    atomicity)
  • Online growing, shrinking, repacking
  • Uses transactions and flush plugins
  • Inheritance (work in progress)
  • API effective for small files (debugging now)
  • Attributes implemented as file plugins
  • Constraints (not completed)
  • Hidden files

3
Items and Keys
  • Objects are chopped up into items so that they
    fit into nodes
  • Every item has a key
  • Items are fully ordered in the tree by their key
  • Changing key assignment algorithm can completely
    change what is aggregated with what without
    changing much code

4
B-trees

5
BTrees

6
Fanout Matters A Lot
  • In V3 seeks tended to get added when balancing
    changed who the parent was
  • Increasing fanout and allocating on flush
    improved that in V4
  • Fanout affects cachability of internal nodes
  • Reisers Caching Principle Increasing
    temperature variance improves caching
  • Segregating pointers from data increases
    temperature variance

7
Segregation Can Increase Temperature Variance
  • If two sets of objects have different average
    temperatures
  • And they are stored in larger containers that are
    the units of caching (e.g. nodes in a tree)
  • Segregating them can increase the temperature
    variance

8
Reiser3 (and most databases, since they use BLOBs
also) Unbalanced The Tree

9
Reiser4 Balanced Tree Diagram

10
Dancing Trees
  • Traditional trees employ fixed criteria for
    balancing
  • Squeeze adjacent dirty nodes all the way to the
    left when balancing
  • Let repacker deal with singletons.

11
Locking
  • Hi Priority/ Lo Priority
  • Left and down is low priority
  • Right and up are high priority
  • If low priority thread fails to get a lock held
    by a high priority thread it checks if anyone
    high priority is waiting for one of its locks and
    if they are it yields to them
  • Sometimes when a low priority direction lock is
    desired but not needed, it may be better to just
    live without it for the relatively rare cases
    where it is already held.

12
Wandering Logs
  • Joys of WAFL
  • Neither relocation ala WAFL nor write twice
    journaling are always optimal
  • Write twice is optimal when making small changes
    and then reading before a repacker can run
  • Fixed size and location journal vs. wandering
  • Tool kit approach to design rather than a belief
    that screwdrivers are better than hammers.

13
Atomic Filesystem
  • Full transactional infrastructure in place
  • Currently all fs operations are atomic.
  • Sys_reiser4 allows performing any 64 assignments
    as atoms
  • Limit is arbitrary and no limit for trusted
    processes can be granted
  • Mail servers, version control, many applications
    could improve their performance as a result

14
Online Repacker/Resizer/Defragger
  • 80 of files dont move for long periods of time
  • Repack once a week, and 80 of files are
    perfectly laid out for reads
  • Joys of LFS

15
Reducing the Effort of Hacking
  • Plugins
  • File plugins
  • Directory plugins
  • Hash plugins
  • Security plugins
  • Key assigment plugins
  • Node and item search plugins

16
(No Transcript)
17
Key Assignment
  • Keys for filebodies have same order as keys for
    first directory entry they are created with
  • X2 performance increase for operations in readdir
    order (e.g. cp r)
  • Keys are larger ?
  • This change took Nikita 3 days.

18
Miscellaneous
  • Inserting and appending to items in increasing
    order requires no shifting inside node
  • Timestamps and mkfsids make fsck more effective
  • Putting directory entries near file bodies is
    better
  • Better directory readahead code

19
Benchmarks
  • ..\Desktop\v4marks.html

20
Reiser4 Talk Review
  • Performance
  • Dancing trees (squeeze on flush)
  • BLOBs replaced with extents on the twig level
  • Allocate on flush ala XFS
  • encrypt on flush (unique to us)
  • Wandering logs
  • Bottom up locking
  • Repacker (debugging and tweaking now)
  • Plugins make it easy to extend
  • Transactions (no isolation this year, only
    atomicity)
  • Online growing, shrinking, repacking
  • Uses transactions and flush plugins
  • Inheritance (work in progress)
  • API effective for small files (debugging now)
  • Attributes implemented as file plugins
  • Constraints (not completed)
  • Hidden files

21
Reiser5
  • Writes followed by reads at another location must
    be limited by network transmission latency
  • Caching can help with most of the rest

22
Features
  • Globally Scalable
  • Location Transparent
  • Consistent
  • Multi-level Caching
  • Auto-Migrating
  • Per File Specifiably Available
  • Encryption Based Security

23
Hashing vs. trees
  • Why trees not hashing are used in reiser4
  • Same performance principle applies to distributed
    filesystems

24
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com