• Stars
    star
    266
  • Rank 154,103 (Top 4 %)
  • Language
    Python
  • License
    Other
  • Created over 9 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Ceph Benchmarking Tool

CBT - The Ceph Benchmarking Tool

INTRODUCTION

CBT is a testing harness written in python that can automate a variety of tasks related to testing the performance of Ceph clusters. CBT does not install Ceph packages, it is expected that this will be done prior to utilizing CBT. CBT can create OSDs at the beginning of a test run, optionally recreate OSDs between test runs, or simply run against an existing cluster. CBT records system metrics with collectl, it can optionally collect more information using a number of tools including perf, blktrace, and valgrind. In addition to basic benchmarks, CBT can also do advanced testing that includes automated OSD outages, erasure coded pools, and cache tier configurations. The main benchmark modules are explained below.

radosbench

RADOS bench testing uses the rados binary that comes with the ceph-common package. It contains a benchmarking facility that exercises the cluster by way of librados, the low level native object storage API provided by Ceph. Currently, the RADOS bench module creates a pool for each client.

librbdfio

The librbdfio benchmark module is the simplest way of testing block storage performance of a Ceph cluster. Recent releases of the flexible IO tester (fio) provide a RBD ioengine. This allows fio to test block storage performance of RBD volumes without KVM/QEMU configuration, through the userland librbd libraries. These libraries are the same ones used by the, QEMU backend, so it allows a approximation to KVM/QEMU performance.

kvmrbdfio

The kvmrbdfio benchmark uses the flexible IO tester (fio) to exercise a RBD volume that has been attached to a KVM instance. It requires that the instances be created and have RBD volumes attached prior to using CBT. This module is commonly used to benchmark RBD backed Cinder volumes that have been attached to instances created with OpenStack. Alternatively the instances could be provisioned using something along the lines of Vagrant or Virtual Machine Manager.

rbdfio

The rbdfio benchmark uses the flexible IO tester (fio) to excercise a RBD volume that has been mapped to a block device using the KRBD kernel driver. This module is most relevant for simulating the data path for applications that need a block device, but wont for whatever reason be ran inside a virtual machine.

PREREQUISITES

CBT uses several libraries and tools to run:

  1. python3-yaml - A YAML library for python used for reading configuration files.
  2. python3-lxml - Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API
  3. ssh (and scp) - remote secure command executation and data transfer
  4. pdsh (and pdcp) - a parallel ssh and scp implementation
  5. ceph - A scalable distributed storage system

Note that pdsh is not packaged for RHEL7 and CentOS 7 based distributations at this time, though the rawhide pdsh packages install and are usable. The RPMs for these packages are available here:

  • ftp://rpmfind.net/linux/fedora/linux/releases/23/Everything/x86_64/os/Packages/p/pdsh-2.31-4.fc23.x86_64.rpm
  • ftp://rpmfind.net/linux/fedora/linux/releases/23/Everything/x86_64/os/Packages/p/pdsh-rcmd-rsh-2.31-4.fc23.x86_64.rpm
  • ftp://rpmfind.net/linux/fedora/linux/releases/23/Everything/x86_64/os/Packages/p/pdsh-rcmd-ssh-2.31-4.fc23.x86_64.rpm

Optional tools and benchmarks can be used if desired:

  1. collectl - system data collection
  2. blktrace - block device io tracing
  3. seekwatcher - create graphs and movies from blktrace data
  4. perf - system and process profiling
  5. valgrind - runtime memory and cpu profiling of specific processes
  6. fio - benchmark suite with integrated posix, libaio, and librbd support
  7. cosbench - object storage benchmark from Intel

USER AND NODE SETUP

In addition to the above software, a number of nodes must be available to run tests. These are divided into several categories. Multiple categories can contain the same host if it is assuming multiple roles (running OSDs and a mon for instance).

  1. head - node where general ceph commands are run
  2. clients - nodes that will run benchmarks or other client tools
  3. osds - nodes where OSDs will live
  4. rgws - nodes where rgw servers will live
  5. mons - nodes where mons will live

A user may also be specified to run all remote commands. The host that is used to run cbt must be able to issue passwordless ssh commands as the specified user. This can be accomplished by creating a passwordless ssh key:

ssh-keygen -t dsa

and copying the resulting public key in the ~/.ssh to the ~/.ssh/authorized_key file on all remote hosts.

This user must also be able to run certain commands with sudo. The easiest method to enable this is to simply enable blanket passwordless sudo access for this user, though this is only appropriate in laboratory environments. This may be acommplished by running visudo and adding something like:

# passwordless sudo for cbt
<user>    ALL=(ALL)       NOPASSWD:ALL

Where <user> is the user that will have password sudo access.
Please see your OS documentation for specific details.

In addition to the above, it will be required to add all osds and mons into the list of known hosts for ssh in order to perform properly. Otherwise, the benchmarking tests will not be able to run.

Note that the pdsh command could have difficulties if the sudoers file requires tty. If this is the case, commend out the Defaults requiretty line in visudo.

DISK PARTITIONING

Currently CBT looks for specific partition labels in /dev/disk/by-partlabel for the Ceph OSD data and journal partitions.
At some point in the future this will be made more flexible, for now this is the expected behavior. Specifically on each OSD host partitions should be specified with the following gpt labels:

osd-device-<num>-data
osd-device-<num>-journal

where <num> is a device ordered starting at 0 and ending with the last device on the system. Currently cbt assumes that all nodes in the system have the same number of devices. A script is available that shows an example of how we create partition labels in our test lab here:

https://github.com/ceph/cbt/blob/master/tools/mkpartmagna.sh

CREATING A YAML FILE

CBT yaml files have a basic structure where you define a cluster and a set of benchmarks to run against it. For example, the following yaml file creates a single node cluster on a node with hostname "burnupiX". A pool profile is defined for a 1x replication pool using 256 PGs, and that pool is used to run RBD performance tests using fio with the librbd engine.

cluster:
  user: 'nhm'
  head: "burnupiX"
  clients: ["burnupiX"]
  osds: ["burnupiX"]
  mons:
    burnupiX:
      a: "127.0.0.1:6789"
  osds_per_node: 1
  fs: 'xfs'
  mkfs_opts: '-f -i size=2048'
  mount_opts: '-o inode64,noatime,logbsize=256k'
  conf_file: '/home/nhm/src/ceph-tools/cbt/newstore/ceph.conf.1osd'
  iterations: 1
  use_existing: False
  clusterid: "ceph"
  tmp_dir: "/tmp/cbt"
  pool_profiles:
    rbd:
      pg_size: 256
      pgp_size: 256
      replication: 1
benchmarks:
  librbdfio:
    time: 300
    vol_size: 16384
    mode: [read, write, randread, randwrite]
    op_size: [4194304, 2097152, 1048576]
    concurrent_procs: [1]
    iodepth: [64]
    osd_ra: [4096]
    cmd_path: '/home/nhm/src/fio/fio'
    pool_profile: 'rbd'

An associated ceph.conf.1osd file is also defined with various settings that are to be used in this test:

[global]
        osd pool default size = 1
        auth cluster required = none
        auth service required = none
        auth client required = none
        keyring = /tmp/cbt/ceph/keyring
        osd pg bits = 8  
        osd pgp bits = 8
        log to syslog = false
        log file = /tmp/cbt/ceph/log/$name.log
        public network = 192.168.10.0/24
        cluster network = 192.168.10.0/24
        rbd cache = true
        osd scrub load threshold = 0.01
        osd scrub min interval = 137438953472
        osd scrub max interval = 137438953472
        osd deep scrub interval = 137438953472
        osd max scrubs = 16
        filestore merge threshold = 40
        filestore split multiple = 8
        osd op threads = 8
        mon pg warn max object skew = 100000
        mon pg warn min per osd = 0
        mon pg warn max per osd = 32768

[mon]
        mon data = /tmp/cbt/ceph/mon.$id
        
[mon.a]
        host = burnupiX 
        mon addr = 127.0.0.1:6789

[osd.0]
        host = burnupiX
        osd data = /tmp/cbt/mnt/osd-device-0-data
        osd journal = /dev/disk/by-partlabel/osd-device-0-journal

To run this benchmark suite, cbt is launched with an output archive directory to store the results and the yaml configuration file to use:

cbt.py --archive=<archive dir> ./mytests.yaml

You can also specify the ceph.conf file to use by specifying it on the commandline:

cbt.py --archive=<archive dir> --conf=./ceph.conf.1osd ./mytests.yaml

In this way you can mix and match ceph.conf files and yaml test configuration files to create parametric sweeps of tests. A script in the tools directory called mkcephconf.py lets you automatically generate hundreds or thousands of ceph.conf files from defined ranges of different options that can then be used with cbt in this way.

CONCLUSION

There are many additional and powerful ways you can use cbt that are not yet covered in this document. As time goes on we will try to provide better examples and documentation for these features. For now, it's best to look at the examples, look at the code, and ask questions!

More Repositories

1

ceph

Ceph is a distributed object, block, and file storage platform
C++
13,799
star
2

ceph-ansible

Ansible playbooks to deploy Ceph, the distributed filesystem.
Python
1,685
star
3

ceph-container

Docker files and images to run Ceph in containers
Shell
1,316
star
4

ceph-csi

CSI driver for Ceph
Go
1,236
star
5

go-ceph

Go bindings for Ceph 🐙 🐙 🐙
Go
610
star
6

ceph-deploy

Deploy Ceph with minimal infrastructure, using just SSH access
Python
421
star
7

calamari

Web-based monitoring and management for Ceph
Python
349
star
8

s3-tests

Compatibility tests for S3 clones
Python
261
star
9

cn

Ceph Nano - One step S3 in container with Ceph.
Go
235
star
10

ceph-client

Ceph kernel client (kernel modules)
C
187
star
11

teuthology

Ceph test suite
Python
153
star
12

cephadm-ansible

ansible playbooks to be used with cephadm
Python
112
star
13

calamari-clients

Ceph Manager API Client Code
JavaScript
102
star
14

ceph-cookbook

Chef cookbooks for Ceph
Ruby
101
star
15

ceph-rust

Rust-lang interface to Ceph.
Rust
92
star
16

dmclock

Code that implements the dmclock distributed quality of service algorithm. See "mClock: Handling Throughput Variability for Hypervisor IO Scheduling" by Gulati, Merchant, and Varman.
C++
88
star
17

ceph-nagios-plugins

Nagios plugins for Ceph
Python
82
star
18

ceph-nvmeof

Service to provide Ceph storage over NVMe-oF/TCP protocol
Python
76
star
19

cephmetrics

ceph metric collectors with collectd integration
Python
64
star
20

gf-complete

this repository is a read only mirror, the upstream is
C
62
star
21

ceph-iscsi

Ceph iSCSI tools
Python
61
star
22

cephfs-hadoop

cephfs-hadoop
Java
57
star
23

romana

JavaScript
51
star
24

ceph-build

Helper scripts for building the official Ceph packages
Shell
44
star
25

qemu-kvm

Ceph RBD support for Qemu/KVM
C
40
star
26

phprados

PHP bindings for the RADOS client library
C
37
star
27

ceph-cosi

COSI driver for Ceph Object Store aka RGW
Go
34
star
28

jerasure

this repository is a read only mirror, the upstream is
C
33
star
29

ceph-tools

Misc ceph tools
Python
33
star
30

ceph-qa-suite

[DEPRECATED; see ceph.git/qa] Suite of Ceph QA tests to run with Teuthology
Python
33
star
31

libs3

Fork of http://git.ischo.com/libs3.git
C
32
star
32

ceph-salt

Deploy Ceph clusters using cephadm
Python
31
star
33

ceph-chef

Chef cookbooks for managing a Ceph cluster
Ruby
29
star
34

downburst

Fast Ubuntu Cloud Image creation on libvirt
Python
27
star
35

ceph-iscsi-cli

NOTICE: moved to https://github.com/ceph/ceph-iscsi
Python
25
star
36

ceph-medic

find common issues in ceph clusters
Python
22
star
37

pulpito

A dashboard for Ceph tests
JavaScript
22
star
38

ceph-iscsi-config

NOTICE: moved to https://github.com/ceph/ceph-iscsi
Python
22
star
39

radosgw-agent

radosgw sync agent
Python
22
star
40

ceph-cm-ansible

Ansible configurations for Ceph.com infrastructure
Shell
21
star
41

python-crush

C++
20
star
42

ceph-mixins

A set of Grafana dashboards and Prometheus alerts for Ceph.
Jsonnet
20
star
43

ceph-ci

ceph.git clone as source for CI
C++
20
star
44

dpdk

DPDK
C
19
star
45

puppet-ceph

Mirror of stackforge/puppet-ceph
Ruby
17
star
46

ceph.io

This repo contains static site content for www.ceph.io
HTML
16
star
47

libcrush

C
16
star
48

ceph-installer

A service to provision Ceph clusters
Python
15
star
49

paddles

RESTful API to store (and report) on Ceph tests
Python
14
star
50

persistent-volume-migrator

A collection of tools to migrate an ancient Kubernetes Ceph storage driver (in-tree, Flex) to Ceph-CSI
Go
14
star
51

propernoun

Update PowerDNS from DHCP leases and libvirt virtual machines
Python
13
star
52

rgw-pubsub-api

RGW PubSub API Clients
Go
13
star
53

ceph-csi-operator

Kubernetes operator for managing the CephCSI plugins
Go
13
star
54

obsync

rsync-like utility for syncing bucket data between object storage APIs like S3, Swift
Python
12
star
55

ceph-iscsi-tools

Useful tools for a ceph/iscsi gateway environment
Python
11
star
56

autobuild-ceph

Setup for running gitbuilder for the Ceph project
Shell
11
star
57

ceph-openstack-tools

Tools to develop Ceph/OpenStack integration
Shell
11
star
58

simplegpt

Simple Python library to parse GPT (GUID Partition Table) header and entries, useful as a learning tool
Python
11
star
59

ceph-ruby

Easy management of Ceph Distributed Storage System (rbd, images, rados objects) using ruby.
Ruby
11
star
60

python-jenkins

fork of python-jenkins for https://review.openstack.org/460363
Python
11
star
61

mod_fastcgi

Bugfixes and improves to mod_fastcgi, for use with RADOS Gateway
C
10
star
62

samba

Clone of the main samba repo: git://git.samba.org/samba.git
C
10
star
63

csi-charts

csi-charts
9
star
64

chacra

A binary/file REST API to aid in multi-distro|arch|release management
Python
9
star
65

ceph-erasure-code-corpus

Objects erasure encoded by Ceph
Shell
9
star
66

ceph-client-standalone

Standalone Ceph kernel client -- you probably want https://github.com/NewDreamNetwork/ceph-client instead
C
9
star
67

barclamp-ceph

Crowbar Barclamp for installing Ceph clusters
Ruby
8
star
68

blkin

C++
8
star
69

shaman

source of truth for the state of repositories on Chacra nodes
Python
8
star
70

apache2

A version of Apache HTTP Server with fixes for use with RADOS Gateway
C
7
star
71

ceph-qa-chef

Chef cookbooks used in Ceph QA jobs. (This is deprecated; please see ceph-cm-ansible instead.)
Ruby
7
star
72

ceph-kmod-rpm

kabi-tracking kmod RPMs for libceph, CephFS, and RDB for RHEL 7
7
star
73

mod-proxy-fcgi

mod_proxy_fcgi for apache 2.2
C
6
star
74

ceph-devstack

DevStack files
Shell
6
star
75

spawn

C++
6
star
76

leveldb

Fork of the LevelDB project
C++
5
star
77

keys

SSH and other keys used by the project, mostly in the Sepia lab
Shell
5
star
78

gmock

C++
5
star
79

cn-core

Bootstrap Ceph AIO - source of cn project
Go
5
star
80

qemu-iotests

Shell
5
star
81

ceph-autotests

HISTORICAL value only: Autotest helper for Ceph QA (obsolete)
Python
4
star
82

mita

Jenkins Slave orchestration service
Python
4
star
83

asphyxiate

Grab source code documentation via Doxygen into a Sphinx document
Python
4
star
84

collectd-4.10.1

A version of collectd that supports monitoring Ceph clusters (on top of the Debian 4.10.1-1+squeeze2 package)
C
4
star
85

ceph-nagios-plugin

A Nagios plugin that checks the health of a ceph cluster.
Perl
4
star
86

cookbook-vercoi

Chef Solo recipes used to bring up KVM hypervisors in the Sepia lab
Ruby
4
star
87

prado

Prado is a webservice that provides a single script to run Ansible playbooks
Python
4
star
88

handle_core

A userspace core file handler for Linux
C
4
star
89

ceph-object-corpus

corpus of encoded ceph structures
Shell
4
star
90

ceph-telemetry

Python
4
star
91

jenkins-slave-chef

Chef to setup jenkins slaves (pbuilder/regular).
Ruby
3
star
92

merfi

Finds and signs files with different signing tools (gpg, rpm-sign)
Python
3
star
93

ceph-kdump-copy

ceph kdump handler
Shell
3
star
94

run-crowbar-on-sepia

Quick & dirty script to run Crowbar on Sepia
Python
3
star
95

ceph-notes

3
star
96

libkmip

C
3
star
97

cephmetrics-osp

Shell
2
star
98

ceph-brag

Ceph performance testing results repository.
Python
2
star
99

munging_http_proxy

Munging HTTP proxy, for developing and debugging
Python
2
star
100

cookbook-vm-general

Python
2
star