Skip to content

mohammedgqudah/ff

Repository files navigation

ff

A toolkit for testing and studying filesystems



This is my personal toolkit for studying filesystems in Linux. The ff crate serves as a utility for mounting, and dealing with filesysems in all binaries.

  • ff-cache: Show or evict cached pages for a file.
  • ff-trace-fsync: See how fsync behaves under different conditions (e.g. block IO errors, multiple open file handles, different filesystems)
  • ff-bench-fsync: Benchmark syncing data to disk using different methods (whether it's an fsync call, or a filesystem mounted with the sync option, or a file opened with O_SYNC etc...)

ff-cache

Show or evict cached pages in the page cache.

It is similar to vmtouch but you can show dirty pages and inspect page mapping flags.

$ ff-cache target.txt
                Resident Pages: 0/2560 0B/10MiB
$ ff-cache target.txt
                Resident Pages: 12/2560 48KiB/10MiB
$ sudo ff-cache target.txt --dirty
                Resident Pages: 13/2561 52KiB/10.00MiB
                Dirty Pages: 1/2561
                             2560
$ sudo ff-cache target.txt -e
                Evicted 13/2561 52KiB/10.00MiB
$ sudo ff-cache target.txt --dirty
                Resident Pages: 1/2561 4KiB/10.00MiB
                Dirty Pages: 0/2561

ff-trace-fsync

ff-bench-fsync

benchmark fsync(2) and related system calls.

asciicast

creating a drive partition for benchmarking and testing

ff needs a partition that will be used to do all sorts of tests and benchmarks, it will refuse to work if the partition label is not ff-bench, which can be set using parted

sudo parted /dev/<YOUR_DRIVE> name <TESTING_PART_NUMBER> ff-bench

About

filesystem toolkit

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors