Ceph测试工具总结

本文详细介绍了如何使用fio、radosbench和mdtest工具来测试Ceph存储系统的性能。fio是一个灵活的I/O测试和基准工具,适用于多种工作负载。radosbench是Ceph内部的性能测试工具,专注于Rados层面的性能。mdtest则用于测试文件系统级别的性能。通过示例命令和结果分析,展示了不同工作负载下如4k随机读写、顺序读写等操作的IOPS和吞吐量。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

fio

Fio最初的编写目的是为了避免出于性能原因或查找/重现错误而要测试特定工作负载时编写特殊测试用例程序的麻烦。编写这样一个测试应用程序的过程可能很麻烦,尤其是在您必须经常这样做的情况下。因此,我需要一个能够模拟给定I / O工作负载而又无需一次又一次地编写定制的测试用例的工具。

命令格式

fio [options] [job options] <job files>

参数介绍

参数名称参数说明
-filename文件名称,通常为块设备路径 /dev/sdb。使用 filename=/dev/sda:/dev/sdb 来表示多个 job 的不同 filename。
-direct是否使用directIO,默认为false,direct=1开启。
-iodepth队列深度。
-thread线程数
-rw/-readwrite读写方式。包含 read、write、trim(仅用于Linux块设备和SCSI字符设备)、randread、randwrite、randtrim(仅用于Linux块设备和SCSI字符设备)、rw/readwrite、randrw 和 trimwrite。其中读写百分比默认是50/50。
-rwmixread读百分比。默认值50.
-rwmixwrite写百分比。如果rwmixread和rwmixwrite都给出了,并且它们的值加起来不等于100%,那么后者将用于覆盖前者。如果要求fio将读或写限制在某个速率,这可能会干扰给定的速率设置。如果是这样,那么分布可能是不均衡的。默认值:50。
-ioenginelibaio,rados,rbd
-bs单次 io 块文件大小。ceph 一般设为4k。
-bsrange数据块大小范围,默认单位 kb。
size每个线程读写数据量
-numjobs创建此 job 克隆数量。
-runtime总运行时长,默认单位为秒
-ramp_timeIf set, fio will run the specified workload for this amount of time before logging any performance numbers. Useful for letting performance settle before logging results, thus minimizing the runtime required for stable results. Note that the ramp_time is considered lead in time for a job, thus it will increase the total runtime if a special timeout or runtime is specified. When the unit is omitted, the value is given in seconds.可以用来减少生成稳定结果所需要的运行时间
-namejob名称,此参数还具有指示新作业开始的特殊用途。如果fio -name=job1 -name=job2,建立了两个任务,共享-name=job1之 mn 前的参数。-name之后的就是job2任务独有的参数。
-refill_buffers如果给出了这个选项,fio将在每次提交时重新填充I/O缓冲区。当然,只有在没有指定zero_buffers时才有意义。默认情况下是未设置的,也就是说,缓冲区只在init时填充,并且在可能的情况下重用其中的数据,但是如果任何verify, buffer_compress_percentage或dedupe_percentage是启用的,那么refill_buffers也会自动启用。主要作用:清空缓冲区,避免从I/O缓存命中数据。
-randrepeat使得生成的随机数据可重复,默认true。
-invalidate在启动io之前,请为此文件使缓冲区/页面缓存部分无效。 默认为true.
-norandommap一般情况下,fio在做随机IO时,将会覆盖文件的每一个block.如果这个选项设置的话,fio将只是获取一个新的随机offset,而不会查询过去的历史。这意味着一些块可能没有读或写,一些块可能要读/写很多次。在个选项与verify=互斥,并只有多个块大小(bsrange=)正在使用,因为fio只会记录完整的块的重写。
****以下为engine参数,必须写在指定的ioengine之后。
-clusternamerbd,rados参数。ceph集群名称。
-rbdnamerbd参数,RBD image名称。
-poolrbd,rados参数。存储池名称。必写。
-clientnamerbd,rados参数。指定用户名(不带’ client. ‘。前缀)用于访问Ceph集群。如果指定了clustername,则clientname应该是完整类型。id字符串。如果没有类型。前缀给定后,fio将添加’ client '。默认的。
-busy_pollrbd,rados参数。Poll store instead of waiting for completion. Usually this provides better throughput at cost of higher(up to 100%) CPU utilization.

测试用例

  1. 引擎为 libaio,采用内核挂载 rbd 设备测试

    #1. 创建 image,为避免内核不支持高级特性,指定layering特性
    rbd create --size {megabytes} {pool-name}/{image-name} --image-feature layering
    #2. 通知 kernal
    rbd map {pool-name}/{image-name}
    #3. 格式化块设备
    mkfs.ext4 {block_name}
    #4. 挂载设备
    mkdir {file_path}
    mount {block_name} {file_path}
    #5. 查看设备挂载情况
    df
    
    #4k随机写,iops
    fio -filename=/mnt/rbd-demo/fio.img -direct=1 -iodepth=32 -thread -rw=randwrite -ioengine=libaio -bs=4k -size=200m -numjobs=8 -runtime=60 -group_reporting -name=mytest 
    
    #4k随机读,iops
    fio -filename=/mnt/rbd-demo/fio.img -direct=1 -iodepth=32 -thread -rw=randread -ioengine=libaio -bs=4k -size=200m -numjobs=8 -runtime=60 -group_reporting -name=mytest 
    
    #4k随机读写,70%读,iops
    fio -filename=/mnt/rbd-demo/fio.img -direct=1 -iodepth=32 -thread -rw=randrw -rwmixread=70 -ioengine=libaio -bs=4k -size=200m -numjobs=8 -runtime=60 -group_reporting -name=mytest
    
    #1M顺序写,吞吐量
    fio -filename=/mnt/rbd-demo/fio.img -direct=1 -iodepth=32 -thread -rw=write -ioengine=libaio -bs=1M -size=200m -numjobs=8 -runtime=60 -group_reporting -name=mytest
    
    #1M顺序读,吞吐量
    fio -filename=/mnt/rbd-demo/fio.img -direct=1 -iodepth=32 -thread -rw=read -ioengine=libaio -bs=1M -size=200m -numjobs=8 -runtime=60 -group_reporting -name=mytest
    
  2. 引擎为 rados

    #4k随机写,iops
    fio -direct=1 -thread -refill_buffers -norandommap -randrepeat=0 -numjobs=1 -ioengine=rados -clientname=admin -pool=radospool -invalidate=0 -rw=randwrite -bs=4k -size=1G -runtime=60 -ramp_time=60 -iodepth=128
    
    #4k随机读,iops
    fio -direct=1 -thread -refill_buffers -norandommap -randrepeat=0 -numjobs=1 -ioengine=rados -clientname=admin -pool=radospool -invalidate=0 -rw=randread -bs=4k -size=1G -runtime=60 -ramp_time=60 -iodepth=128
    
    #64K顺序写,吞吐量
    fio -direct=1 -thread -refill_buffers -norandommap -randrepeat=0 -numjobs=1 -ioengine=rados -clientname=admin -pool=radospool -invalidate=0 -rw=randwrite -bs=64k -size=1G -runtime=60 -ramp_time=60 -iodepth=128
    
    #64k顺序读,吞吐量
    fio -direct=1 -thread -refill_buffers -norandommap -randrepeat=0 -numjobs=1 -ioengine=rados -clientname=admin -pool=radospool -invalidate=0 -rw=randread -bs=64k -size=1G -runtime=60 -ramp_time=60 -iodepth=128
    
  3. 引擎为 rbd

    #4k随机写,iops
    fio -direct=1 -thread -refill_buffers -norandommap -randrepeat=0 -numjobs=1 -ioengine=rbd -clientname=admin -pool=radospool -rbdname=imagename -invalidate=0 -rw=randwrite -bs=4k -size=1G -runtime=60 -ramp_time=60 -iodepth=128
    
    #4k随机读,iops
    fio -direct=1 -thread -refill_buffers -norandommap -randrepeat=0 -numjobs=1 -ioengine=rbd -clientname=admin -pool=radospool -rbdname=imagename -invalidate=0 -rw=randread -bs=4k -size=1G -runtime=60 -ramp_time=60 -iodepth=128
    
    #64K顺序写,吞吐量
    fio -direct=1 -thread -refill_buffers -norandommap -randrepeat=0 -numjobs=1 -ioengine=rbd -clientname=admin -pool=radospool -rbdname=imagename -invalidate=0 -rw=randwrite -bs=64k -size=1G -runtime=60 -ramp_time=60 -iodepth=128
    
    #64k顺序读,吞吐量
    fio -direct=1 -thread -refill_buffers -norandommap -randrepeat=0 -numjobs=1 -ioengine=rbd -clientname=admin -pool=radospool -rbdname=imagename -invalidate=0 -rw=randread -bs=64k -size=1G -runtime=60 -ramp_time=60 -iodepth=128
    

结果分析

[root@node-1 ~]# fio -filename=/mnt/rbd-demo/fio.img -direct=1 -iodepth=32 -thread -rw=randwrite -ioengine=libaio -bs=4k -size=200m -numjobs=8 -runtime=60 -group_reporting -name=mytest 
mytest: (g=0): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=32
...
fio-3.7
Starting 8 threads
mytest: Laying out IO file (1 file / 200MiB)
Jobs: 1 (f=1): [_(7),w(1)][91.7%][r=0KiB/s,w=42.9MiB/s][r=0,w=10.0k IOPS][eta 00m:04s]               
mytest: (groupid=0, jobs=8): err= 0: pid=2178: Tue Sep  8 09:39:40 2020
  write: IOPS=9440, BW=36.9MiB/s (38.7MB/s)(1600MiB/43386msec) #写时 IOPS 和带宽(BW)总览
    slat (usec): min=2, max=630832, avg=692.55, stdev=5663.73 #submission latency,“盘需要多久将IO提交到kernel做处理?”
    clat (nsec): min=1476, max=1769.0M, avg=23061496.85, stdev=51507870.00 #completion latency,“kernel 执行完 IO 的时间”
     lat (usec): min=68, max=1769.0k, avg=23754.76, stdev=52699.12 #总的延时,主要参考指标
    clat percentiles (msec): #completion latency
     |  1.00th=[    3],  5.00th=[    3], 10.00th=[    8], 20.00th=[    9],
     | 30.00th=[   10], 40.00th=[   12], 50.00th=[   13], 60.00th=[   16],
     | 70.00th=[   25], 80.00th=[   31], 90.00th=[   32], 95.00th=[   34],
     | 99.00th=[  255], 99.50th=[  405], 99.90th=[  701], 99.95th=[  827],
     | 99.99th=[  995]
   bw (  KiB/s): min=   15, max=47324, per=13.75%, avg=5191.44, stdev=4918.35, samples=603
   iops        : min=    3, max=11831, avg=1297.69, stdev=1229.64, samples=603
  lat (usec)   : 2=0.01%, 4=0.01%, 50=0.01%, 100=0.01%, 250=0.01%
  lat (usec)   : 500=0.03%, 750=0.03%, 1000=0.02%
  lat (msec)   : 2=0.10%, 4=6.43%, 10=23.90%, 20=35.85%, 50=30.69%
  lat (msec)   : 100=0.93%, 250=0.97%, 500=0.70%, 750=0.25%, 1000=0.07%
  cpu          : usr=0.25%, sys=10.03%, ctx=357382, majf=0, minf=12
  IO depths    : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=99.9%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.1%, 64=0.0%, >=64=0.0%
     issued rwts: total=0,409600,0,0 short=0,0,0,0 dropped=0,0,0,0 #发出的 IO 数量
     latency   : target=0, window=0, percentile=100.00%, depth=32

Run status group 0 (all jobs):
  WRITE: bw=36.9MiB/s (38.7MB/s), 36.9MiB/s-36.9MiB/s (38.7MB/s-38.7MB/s), io=1600MiB (1678MB), run=43386-43386msec

Disk stats (read/write):
    dm-0: ios=0/410431, merge=0/0, ticks=0/1271401, in_queue=1271380, util=96.49%, aggrios=0/410272, aggrmerge=0/340, aggrticks=0/1212994, aggrin_queue=1212830, aggrutil=96.47%
  sda: ios=0/410272, merge=0/340, ticks=0/1212994, in_queue=1212830, util=96.47%

rados bench

rados 的层面对 pool 存储性能的测试。

命令格式

rados bench -p <pool_name> <seconds> <write|seq|rand> [-b block_size] [-t concurrent_operations] [-k /.../ceph.client.admin.keyring] [-c /.../ceph.conf] [--no-cleanup] [--run-name run_name]

参数介绍

参数名称参数说明
-p测试的pool
second测试时间,单位:秒
write|seq|rand写|顺序读|随机读
-b块大小,默认为4M。只写数字不加单位,默认单位 k
-t并发数,默认值:16
-k指定ceph.client.admin.keyring
-c指定ceph.conf
–no-cleanup表示写完成后不删除数据,可以在测试结束使用 rados -p <pool_name> cleanup 删除
–run-name默认为benchmark_last_metadata。若做多客户端测试,这个值必须自行设置,否则会导致多客户端读失败

测试用例

#4k随机写
rados bench -p rbd 60 write -b=4K -t=128 --no-cleanup

#4k顺序读
rados bench -p rbd 60 seq -b=4K -t=128

#4k随机读
rados bench -p rbd 60 rand -b=4K -t=128

#清洗数据
rados -p rbd cleanup

结果分析

[root@node-1 ~]# rados bench -p rbd 10 write -b=4K -t=128
hints = 1
Maintaining 128 concurrent writes of 4096 bytes to objects of size 4096 for up to 10 seconds or 0 objects
Object prefix: benchmark_data_node-1_2254
  sec Cur ops   started  finished  avg MB/s  cur MB/s last lat(s)  avg lat(s)
    0     128       128         0         0         0           -           0
    1     128      1308      1180   4.52467   4.60938  0.00464254   0.0860147
    2     128      2136      2008   3.86785   3.23438    0.239057    0.117895
    3     128      2724      2596   3.18055   2.29688    0.192872    0.138857
    4     128      3578      3450   3.21747   3.33594     0.12293    0.150549
    5     128      3994      3866   2.88573     1.625   0.0140784     0.14932
    6     128      4362      4234    2.6529    1.4375   0.0735093    0.183773
    7     128      4830      4702   2.53856   1.82812    0.608796    0.189726
    8     128      5476      5348   2.51127   2.52344    0.113523    0.195028
    9     128      6323      6195   2.58801   3.30859    0.493252    0.189299
Total time run:         10.1872
Total writes made:      6889
Write size:             4096
Object size:            4096
Bandwidth (MB/sec):     2.64156 #带宽
Stddev Bandwidth:       1.0252
Max bandwidth (MB/sec): 4.60938
Min bandwidth (MB/sec): 1.4375
Average IOPS:           676 #平均IOPS
Stddev IOPS:            262.452
Max IOPS:               1180
Min IOPS:               368
Average Latency(s):     0.189061
Stddev Latency(s):      0.249725
Max latency(s):         1.96704
Min latency(s):         0.00155043
Cleaning up (deleting benchmark objects)
Removed 6889 objects
Clean up completed and total clean up time :4.18956

mdtest

安装教程

#1. 安装依赖
yum -y install gcc gcc-c++ gcc-gfortran
#2. 创建软件包目录
mkdir tools
#3. 安装openmpi(除了openmpi外,还可以使用mpich,不过使用上跟openmpi会有所差异)
cd tools
curl -O https://download.open-mpi.org/release/open-mpi/v1.10/openmpi-1.10.7.tar.gz
./configure --prefix=/usr/local/openmpi/
make && make install
#4. 添加环境变量
vim /root/.bashrc
	#添加以下内容
	export PATH=$PATH:/usr/local/openmpi/bin/:/usr/local/ior/bin/
	export LD_LIBRARY_PATH=/usr/local/openmpi/lib:${LD_LIBRARY_PATH}
	export MPI_CC=mpicc
source /root/.bashrc
#5. 安装 IOR
cd tools/
yum -y install git automake
git clone https://github.com/chaos/ior.git
cd ior
./bootstrap
./configure --prefix=/usr/local/ior/
make && make install
#6. 安装 mdtest
cd tools/
mkdir mdtest && cd mdtest
wget https://nchc.dl.sourceforge.net/project/mdtest/mdtest%20latest/mdtest-1.9.3/mdtest-1.9.3.tgz
tar xf mdtest-1.9.3.tgz
make

命令格式

mdtest [-b #] [-B] [-c] [-C] [-d testdir] [-D] [-e] [-E] [-f first] [-F]
               [-h] [-i iterations] [-I #] [-l last] [-L] [-n #] [-N #] [-p seconds]
               [-r] [-R[#]] [-s #] [-S] [-t] [-T] [-u] [-v] [-V #] [-w #] [-y]
               [-z #]

参数介绍

参数名称参数说明
-F只创建文件
-L只在目录树的子目录层创建文件/目录
-z目录树深度
-b目录树分支
-I(大写i)每个树节点包含的项目数
-n整个树上创建的文件/目录的总数,不能和 -I 一起使用
-u为每个工作任务指定工作目录
-d指出测试运行的目录,可以测试多个目录“-d fullpath1@fullpath2@fullpath3”

测试用例

挂载文件设备

#1. 客户端节点安装 ceph-fuse
yum install ceph-fuse
#2. 服务端创建文件存储池
ceph osd pool create cephfs_data
ceph osd pool create cephfs_metadata
ceph fs new cephfs cephfs_metadata cephfs_data
#3. 拷贝服务端的密钥文件到客户端
mkdir /etc/ceph && scp monhost:/etc/ceph* /etc/ceph/
#4. 挂载文件设备
mkdir /mnt/mycephfs
mount -t ceph monhost:/ /mnt/mycephfs -o name=foo #内核态挂载,无需安装ceph-fuse
ceph-fuse --id foo /mnt/mycephfs #用户态挂载

结果分析

[root@node-1 fs1]# mdtest -F -L -z 4 -b 2 -I 10 -u -d /mnt/mycephfs/mdtest1/
-- started at 10/10/2020 14:04:19 --

mdtest-3.4.0+dev was launched with 1 total task(s) on 1 node(s)
Command line used: mdtest '-F' '-L' '-z' '4' '-b' '2' '-I' '10' '-u' '-d' '/mnt/fs1/mdtest1/'
WARNING: Read bytes is 0, thus, a read test will actually just open/close.
Path: /mnt/fs1/mdtest1
FS: 7.0 GiB   Used FS: 0.0%   Inodes: 0.0 Mi   Used Inodes: 100.0%

Nodemap: 1
1 tasks, 160 files

SUMMARY rate: (of 1 iterations)
   Operation                      Max            Min           Mean        Std Dev
   ---------                      ---            ---           ----        -------
   File creation             :        517.555        517.555        517.555          0.000 #文件创建
   File stat                 :       1101.718       1101.718       1101.718          0.000 #文件查询
   File read                 :       1087.185       1087.185       1087.185          0.000 #文件读取
   File removal              :        428.320        428.320        428.320          0.000 #文件删除
   Tree creation             :        404.253        404.253        404.253          0.000 #树创建
   Tree removal              :        126.012        126.012        126.012          0.000 #树删除
-- finished at 10/10/2020 14:04:20 --

rbd bench

命令格式

rbd bench [--pool <pool>] [--namespace <namespace>] [--image <image>]/[<pool-name>/[<namespace>/]]<image-name> [--io-size <io-size>] [--io-threads <io-threads>] [--io-total <io-total>] [--io-pattern <io-pattern>] [--rw-mix-read <rw-mix-read>] --io-type <io-type> <image-spec> 

参数介绍

参数名称参数说明
-p/–poolpool 名称
–namespacenamespace 名称
–imageimage 名称[
–io-size默认4k
–io-threads线程数,默认16
–io-total数据量总大小,默认1G
–io-patternrand 或者 seq,默认seq
–rw-mix-read读比率,默认(50%读/50%写)
–io-typeread,write,readwrite(rw)

测试用例

#4k顺序写
rbd bench ceph-demo/test.img --io-threads 1 --io-size 4K --io-total 200M --io-pattern seq --io-type write

#4k随机写
rbd bench ceph-demo/test.img --io-threads 1 --io-size 4K --io-total 200M --io-pattern rand --io-type write

#4k顺序读
rbd bench ceph-demo/test.img --io-threads 1 --io-size 4K --io-total 200M --io-pattern seq --io-type read

#4k随机读
rbd bench ceph-demo/test.img --io-threads 1 --io-size 4K --io-total 200M --io-pattern rand --io-type write

结果分析

[root@node-1 ~]# rbd bench rbd/test.img --io-size 4K --io-total 200M --io-pattern rand --io-type write --io-threads 1
bench  type write io_size 4096 io_threads 1 bytes 209715200 pattern random
  SEC       OPS   OPS/SEC   BYTES/SEC
    1      7290   7276.67  29805226.74
    2      9694   4821.01  19746856.87
    3     12183   4062.68  16640721.35
    4     14552   3638.22  14902168.99
    5     16650   3330.17  13640371.91
    6     18427   2229.14  9130560.10
  ...
  290     50070     32.67  133797.32
  295     50252     33.50  137204.83
  296     50306     29.18  119520.84
  299     50458     36.72  150385.87
  300     50667     57.88  237068.90
  305     50785     49.04  200882.86
  310     50870     39.70  162620.82
  311     50989     48.05  196806.10
  313     51000     38.25  156661.96
  321     51116     21.16  86689.84
elapsed(时长):   371  ops(总操作数):    51200  ops/sec(IOPS):   137.68  bytes/sec(带宽): 563939.23

echo 3 > /proc/sys/vm/drop_cache

free

同过 free 命令可以查看缓存情况

[root@node-1 ~]# free -m
              total        used        free      shared  buff/cache   available
Mem:           1819         558         995           9         264        1109
Swap:          2047           0        2047

其中,buff/cache 就是缓存资源

手动释放内存

/proc 是一个虚拟文件系统,我们可以通过对它的读写操作做为与kernel实体间进行通信的一种手段。也就是说可以通过修改/proc中的文件,来对当前kernel的行为做出调整。那么我们可以通过调整/proc/sys/vm/drop_caches来释放内存。操作如下:

因为这是一个非破坏性的操作,而且脏对象是不可释放的,所以用户应该首先运行
sync

写入这个文件会导致内核从内存中删除干净的缓存、dentries和inode,从而使内存变得空闲。
要释放pagecache,请使用
echo 1 > /proc/sys/vm/drop_caches

要释放dentries和索引节点,请使用
echo 2 > /proc/sys/vm/drop_caches

要释放pagecache、dentries和索引节点,请使用
echo 3 > /proc/sys/vm/drop_caches

参考链接

https://blog.youkuaiyun.com/wyzxg/article/details/7279986/

要使用 FIO(Flexible I/O Tester)工具测试 Ceph 存储性能,可以按照以下步骤进行配置和执行测试任务。FIO 是一个功能强大的 I/O 负载生成器,支持多种存储设备和文件系统的性能测试。 ### 3.1 准备工作 确保系统中已安装 FIO 工具。在大多数 Linux 发行版中,可以通过包管理器安装: ```bash sudo apt-get install fio # Debian/Ubuntu sudo yum install fio # CentOS/RHEL ``` 此外,需要确保 Ceph 客户端能够正常访问目标存储池,并具有足够的权限进行读写操作。 ### 3.2 测试方式选择 FIO 支持直接对 RBD 设备进行测试,也可以通过挂载 CephFS 文件系统后对文件进行 I/O 操作。通常推荐使用 RBD 进行更底层的性能评估。 #### 示例:挂载 RBD 设备并进行 FIO 测试 1. 创建并映射 RBD 设备: ```bash rbd create mypool/testimage --size 10240 rbd map mypool/testimage ``` 2. 格式化并挂载(如需): ```bash mkfs.ext4 /dev/rbd/mypool/testimage mount /dev/rbd/mypool/testimage /mnt/rbd ``` 3. 编写 FIO 测试脚本 `ceph_rbd.fio`: ```ini [global] ioengine=libaio direct=1 time_based=1 runtime=60 group_reporting=1 size=1G bs=4k [random-read] rw=randread name=random-read-test filename=/mnt/rbd/testfile ``` 4. 执行测试: ```bash fio ceph_rbd.fio ``` ### 3.3 性能指标分析 FIO 输出将包括 IOPS、吞吐量(MB/s)、延迟等关键指标。对于 Ceph 来说,应关注是否达到预期的 I/O 吞吐能力以及是否存在明显的延迟波动。根据引用内容,在基准测试期间应监控 CPU 和内存压力,以确认它们不是瓶颈[^1]。 ### 3.4 高级参数设置 - **缓存模式**:在 KVM 环境下使用 QEMU 时,注意“cache=writeback”模式可能影响测试结果,QEMU 可能会发出 flush 操作以确保数据写入 Ceph 集群[^3]。 - **同步机制**:频繁的 sync 操作会影响 IOPS 值,为了测得最大 IOPS,可以在准备阶段执行一次 sync,然后依赖 RBDCache 的机制进行异步 flush[^4]。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值