Giter VIP home page Giter VIP logo

tifs-on-tifs's Introduction

tifs-on-tifs

Run TiFS (on TiKV) on TiFS

Why would you do this?

As with most of my random projects, this started as a combination of boredom and "because I could". This serves almost no practical purpose, but it does show off TiFS with a real world use case.

What is TiFS?

TiFS is a POSIX filesystem driver implemented on top of TiKV.

https://pingcap.com/blog/tifs-a-tikv-based-partition-tolerant-strictly-consistent-file-system

How do I use it?

Start the first tier PD and TiKV.

$ docker-compose up -d pd0 tikv0

Mount the first tier TiFS.

$ docker-compose up -d tifs0

Make sure the mount succeeded.

$ mount | grep mnt/tifs0

Start the second tier PD and TiKV.

$ docker-compose up -d pd1 tikv1

Mount the second tier TiFS.

$ docker-compose up -d tifs1

Make sure the mount succeeded.

$ mount | grep mnt/tifs1

Cleaning up

Stop the containers.

$ docker-compose down

Unmount the filesystems.

$ sudo umount -f /mnt/tifs0 /mnt/tifs1

Remove the mount dirs.

$ sudo rm -rf /mnt/tifs0 /mnt/tifs1

How well does it perform?

This setup has terrible performance, but that's not really the point.

First tier TiFS:

$ time dd if=/dev/zero of=/mnt/tifs0/big.file bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 39.9818 s, 2.6 MB/s

real    0m40.077s
user    0m0.000s
sys     0m0.082s

Second tier TiFS:

$ time dd if=/dev/zero of=/mnt/tifs1/big.file bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 296.319 s, 354 kB/s

real    4m56.658s
user    0m0.005s
sys     0m0.072s

tifs-on-tifs's People

Contributors

agaffney avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.