RocksDB+ZenFS的安装及测试(Fedora 37)

 

安装

  • 安装libzbd依赖库及libzbd:
    复制代码
    //依赖
    yum install m4
    yum install autoconf
    yum install libtool
    yum install automake
    
    //下载libzbd库
    git clone https://github.com/westerndigitalcorporation/libzbd.git
    
    //编译
    sh ./autogen.sh
    ./configure
    make
    //安装 sudo make install
    复制代码

     

  • 安装gflags:https://github.com/gflags/gflags/blob/master/INSTALL.md
    复制代码
    git clone https://github.com/gflags/gflags.git
    cd gflags
    mkdir build && cd build
    ccmake ..
    
      - Press 'c' to configure the build system and 'e' to ignore warnings.
      - Set CMAKE_INSTALL_PREFIX and other CMake variables and options.
      - Continue pressing 'c' until the option 'g' is available.
      - Then press 'g' to generate the configuration files for GNU Make.
    
    make
    make install
    复制代码

     

  • 安装snappy:
    yum install snappy-devel

     

  • rocksdb+zenfs:https://github.com/westerndigitalcorporation/zenfs
    git clone https://github.com/facebook/rocksdb.git
    cd rocksdb
    git clone https://github.com/westerndigitalcorporation/zenfs plugin/zenfs
    DEBUG_LEVEL=0 ROCKSDB_PLUGINS=zenfs make -j48 db_bench install
    cd plugin/zenfs/util
    make

    修改scheduler

    echo deadline > /sys/class/block/nvme0n2/queue/scheduler
  • create zenfs:
    [root@fedora util]# ./zenfs mkfs --zbd=nvme0n2 --aux_path=/home/yao/files/locklog
    ZenFS file system created. Free space: 970377 MB

     

  • 测试:
    复制代码
    [root@fedora rocksdb]# ./db_bench --fs_uri=zenfs://dev:nvme0n2 --benchmarks=fillrandom --use_direct_io_for_flush_and_compaction
    Set seed to 1681386400373723 because --seed was 0
    Initializing RocksDB Options from the specified file
    Initializing RocksDB Options from command-line flags
    Integrated BlobDB: blob cache disabled
    RocksDB:    version 8.2.0
    Date:       Thu Apr 13 19:46:45 2023
    CPU:        12 * Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz
    CPUCache:   12288 KB
    Keys:       16 bytes each (+ 0 bytes user-defined timestamp)
    Values:     100 bytes each (50 bytes after compression)
    Entries:    1000000
    Prefix:    0 bytes
    Keys per prefix:    0
    RawSize:    110.6 MB (estimated)
    FileSize:   62.9 MB (estimated)
    Write rate: 0 bytes/second
    Read rate: 0 ops/second
    Compression: Snappy
    Compression sampling rate: 0
    Memtablerep: SkipListFactory
    Perf Level: 1
    ------------------------------------------------
    Initializing RocksDB Options from the specified file
    Initializing RocksDB Options from command-line flags
    Integrated BlobDB: blob cache disabled
    DB path: [rocksdbtest/dbbench]
    fillrandom   :       1.721 micros/op 581101 ops/sec 1.721 seconds 1000000 operations;   64.3 MB/s
    复制代码

     

  • zenfs performance test
    cd /home/yao/files/rocksdb/plugins/zenfs/util/tests
    ./zenfs_base_performance.sh nvme0n2[ <zonefs mountpoint> ]
posted @   完全感覚Dreamer  阅读(220)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!
点击右上角即可分享
微信分享提示