GithubHelp home page GithubHelp logo

stonet-research / zns-tools Goto Github PK

View Code? Open in Web Editor NEW
16.0 2.0 5.0 11.17 MB

A set of tools for understanding F2FS usage of ZNS devices, which allow for identifying the on-device locations of files and inodes, mapping the data layout of F2FS files to ZNS zones, and a tracing framework that records I/O activity for ZNS devices and generates visuals of various operational aspects.

License: GNU General Public License v3.0

C 75.81% Makefile 0.30% Shell 1.90% M4 0.44% Python 8.43% Roff 13.12%
end-to-end profiling tracing zns

zns-tools's People

Contributors

krien avatar nicktehrany avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

zns-tools's Issues

Memory Bug Retrieving Extents

There is still a memory error, and sometimes retrieving extents does not work and returns an error. Command run is from zns-contracts-bench zone-size workload

user@stosys:~/src/zns-tools$ sudo ./src/zns.segmap -d /mnt/f2fs
zns.segmap: malloc.c:2617: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
Aborted
user@stosys:~/src/zns-tools$ sudo ./src/zns.segmap -d /mnt/f2fs/gc.0.0
Error: [main:740] retrieving extents for /mnt/f2fs/gc.0.0

zns.trace Plotting dimension issue

For very large devices the dimensions are wrong on the heatmap.
Also, the differentiation between non existent values (where the heatmap has no respective zones because we the heatmp is always dimension^2 and number of zones may not be) and 0 values (e.g., 0 zone resets issued to a zone). With lower values it also becomes challenging to differentiate 0 and 1 values (these should have totally different colors).

Extent retrieval progress

On long running (large files) runs it may be beneficial to see how far we are. Can possibly show some progress based on the total number of extents (if we can get this with fcntl before starting) or accumulate the size of extents retrieved over the file size of the file that is being mapped (or of all files being mapped), and show this in a progress indicator.

Parallel extent retrieval

Runs with many files can take very long. We can fix this by retrieving extents in parallel.
To avoid messes with parallel extent retrieval I would simply do each file in parallel and combine the retrieved extents in the end.
Other possible enhancements we can make to speed the processes up?

For such operations long options, where there will be a lot of output, it may be beneficial to always go to a file with the log unless specified otherwise?

BUG: Floating point exception in zns.fiemap

Running zns.fiemap gives Floating exception.

How to reproduce:

sudo mkfs.f2fs -f -m -c /dev/nullb0 /dev/nullb1
sudo mount -t f2fs /dev/nullb1 /mnt/f2fs
sudo ./src/zns.fiemap -f /mnt/f2fs/db0/CURRENT

With RocksDB load:

 sudo ./db_bench --db=/mnt/f2fs/db0 --wal_dir=/mnt/f2fs/wal0 --benchmarks=overwrite,stats --use_direct_io_for_flush_and_compaction -value_size=1024 --key_size=64 --num=1000000 --target_file_size_base=$((1024*64)) --max_bytes_for_level_base=$((1024 * 1024 * 2))  --compression_type=none --threads=1 --max_bytes_for_level_multiplier=4 --num_levels=4

Automate ZNS detection

Can automate detection of ZNS by reading the superlock and identifying the devices. As is done in fsck.f2fs tool in init_sb_info().

zns.semap summaries

To the segmap report we can add counters or a sort of summary on the segment/segment range on what was there. Similar to the hole summaries for fiemap. Number of files, number of extents, average sizes, etc.

Zone mapping for extents crossing zone boundary

If the zone size == zone cap, then extents can map across zones (since they are still contiguous) but in the zones we show we have the ending lba of the extent past the zone going into the next zone

Avoid sorting extents

The extents don't need to be sorted, just iterated through once then can directly be assigned to zones (i.e., some data structure for the zone mapping and its contents) and then dump the data structure as the report (no longer on the fly report printing).

Will also make json dumping the data a lot simpler, just dump the data structure.

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.