SeaweedFS学习笔记:Benchmark性能测试工具

用法

./weed benchmark -h
Example: weed benchmark -master=localhost:9333 -c=10 -n=100000
Default Usage:
  -c int
        number of concurrent write or read processes (default 16)
  -collection string
        write data to this collection (default "benchmark")
  -cpuprofile string
        cpu profile output file
  -debug
        verbose debug information
  -deletePercent int
        the percent of writes that are deletes
  -disk string
        [hdd|ssd|<tag>] hard drive or solid state drive or any tag
  -fsync
        flush data to disk after write
  -list string
        list of uploaded file ids (default "/tmp/benchmark_list.txt")
  -master string
        SeaweedFS master location (default "localhost:9333")
  -maxCpu int
        maximum number of CPUs. 0 means all available CPUs
  -n int
        number of files to write for each thread (default 1048576)
  -options string
        a file of command line options, each line in optionName=optionValue format
  -read
        enable read (default true)
  -readSequentially
        randomly read by ids from "-list" specified file
  -replication string
        replication type (default "000")
  -size int
        simulated file size in bytes, with random(0~63) bytes padding (default 1024)
  -write
        enable write (default true)
Description:
  benchmark on an empty SeaweedFS file system.

  Two tests during benchmark:
  1) write lots of small files to the system
  2) read the files out

  The file content is mostly zeros, but no compression is done.

  You can choose to only benchmark read or write.
  During write, the list of uploaded file ids is stored in "-list" specified file.
  You can also use your own list of file ids to run read test.

  Write speed and read speed will be collected.
  The numbers are used to get a sense of the system.
  Usually your network or the hard drive is the real bottleneck.

  Another thing to watch is whether the volumes are evenly distributed
  to each volume server. Because the 7 more benchmark volumes are randomly distributed
  to servers with free slots, it's highly possible some servers have uneven amount of
  benchmark volumes. To remedy this, you can use this to grow the benchmark volumes
  before starting the benchmark command:
    http://localhost:9333/vol/grow?collection=benchmark&count=5

  After benchmarking, you can clean up the written data by deleting the benchmark collection
    http://localhost:9333/col/delete?collection=benchmark

默认情况下,benchmark会先生成文件写入到SeaweedFS,测试写性能,而后从SeaweedFS读取文件,测试读性能。仅测试写性能或者读性能亦可, 可以通过-list指定fid的路径。

测试完成后,可以通过以下命令清理benchmark测试数据

http://localhost:9333/col/delete?collection=benchmark

例子

20并发,测试100000个文件的写读性能(先写后读),文件平均大小为2048 bytes,复制模式为001

./weed benchmark -master=192.168.209.3:9333 -c=20 -n=100000 -replication=001 -size=2048

写入性能:
在这里插入图片描述


读取性能:
在这里插入图片描述

参考文档下载

《小文件存储SeaweedFS技术指南》

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

修破立生

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值