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 @ 2023-04-13 11:23  完全感覚Dreamer  阅读(308)  评论(0)    收藏  举报