查看: 2|回复: 0

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

[复制链接]

3

主题

0

回帖

0

积分

热心网友

金币
0
阅读权限
220
精华
0
威望
0
贡献
0
在线时间
0 小时
注册时间
2009-8-28
发表于 2023-4-13 11:23:00 | 显示全部楼层 |阅读模式

 

安装

  • 安装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> ]


来源:https://www.cnblogs.com/freckley/p/17312869.html
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

相关侵权、举报、投诉及建议等,请发 E-mail:qiongdian@foxmail.com

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部