Recent changes (master)
The following changes since commit a2840331c3cae5b2b0a13f99e58ae18375e2e40d:
Merge branch 'master' of https://github.com/guoanwu/fio (2022-05-25 06:30:06 -0600)
are available in the Git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to e1aeff3ac96a51128b0493377f405e38bdc83500:
Merge branch 'wip-lmy-rados' of https://github.com/liangmingyuanneo/fio (2022-05-29 09:32:18 -0600)
----------------------------------------------------------------
Jens Axboe (1):
Merge branch 'wip-lmy-rados' of https://github.com/liangmingyuanneo/fio
Vincent Fu (5):
steadystate: delete incorrect comment
configure: refer to zlib1g-dev package for zlib support
HOWTO: add blank line for prettier formatting t/run-fio-tests: improve json data decoding
docs: update discussion of huge page sizes
liangmingyuan (1):
engines/ceph: add option for setting config file path
HOWTO.rst | 31 ++++++++++++++++++++----------- configure | 2 +- engines/rados.c | 13 ++++++++++++- examples/rados.fio | 1 + fio.1 | 23 ++++++++++++++--------- steadystate.c | 7 ------- t/run-fio-tests.py | 20 +++++++------------- 7 files changed, 55 insertions(+), 42 deletions(-)
---
Diff of recent changes:
HOWTO.rst +20 -11
@@ -1064,6 +1064,7 @@ Target file/device thread/process. .. option:: ignore_zone_limits=bool + If this option is used, fio will ignore the maximum number of open zones limit of the zoned block device in use, thus allowing the option :option:`max_open_zones` value to be larger than the device
@@ -1822,13 +1823,14 @@ Buffers and memory **mmaphuge** to work, the system must have free huge pages allocated. This can normally be checked and set by reading/writing :file:`/proc/sys/vm/nr_hugepages` on a Linux system. Fio assumes a huge page - is 4MiB in size. So to calculate the number of huge pages you need for a - given job file, add up the I/O depth of all jobs (normally one unless - :option:`iodepth` is used) and multiply by the maximum bs set. Then divide - that number by the huge page size. You can see the size of the huge pages in - :file:`/proc/meminfo`. If no huge pages are allocated by having a non-zero - number in `nr_hugepages`, using **mmaphuge** or **shmhuge** will fail. Also - see :option:`hugepage-size`. + is 2 or 4MiB in size depending on the platform. So to calculate the + number of huge pages you need for a given job file, add up the I/O + depth of all jobs (normally one unless :option:`iodepth` is used) and + multiply by the maximum bs set. Then divide that number by the huge + page size. You can see the size of the huge pages in + :file:`/proc/meminfo`. If no huge pages are allocated by having a + non-zero number in `nr_hugepages`, using **mmaphuge** or **shmhuge** + will fail. Also see :option:`hugepage-size`. **mmaphuge** also needs to have hugetlbfs mounted and the file location should point there. So if it's mounted in :file:`/huge`, you would use
@@ -1847,10 +1849,12 @@ Buffers and memory .. option:: hugepage-size=int - Defines the size of a huge page. Must at least be equal to the system - setting, see :file:`/proc/meminfo`. Defaults to 4MiB. Should probably - always be a multiple of megabytes, so using ``hugepage-size=Xm`` is the - preferred way to set this to avoid setting a non-pow-2 bad value. + Defines the size of a huge page. Must at least be equal to the system + setting, see :file:`/proc/meminfo` and + :file:`/sys/kernel/mm/hugepages/`. Defaults to 2 or 4MiB depending on + the platform. Should probably always be a multiple of megabytes, so + using ``hugepage-size=Xm`` is the preferred way to set this to avoid + setting a non-pow-2 bad value. .. option:: lockmem=int
@@ -2491,6 +2495,11 @@ with the caveat that when used on the command line, they must come after the the full *type.id* string. If no type. prefix is given, fio will add 'client.' by default. +.. option:: conf=str : [rados] + + Specifies the configuration path of ceph cluster, so conf file does not + have to be /etc/ceph/ceph.conf. + .. option:: busy_poll=bool : [rbd,rados] Poll store instead of waiting for completion. Usually this provides better
configure +1 -1
@@ -3142,7 +3142,7 @@ if test "$libzbc" = "yes" ; then output_sym "CONFIG_LIBZBC" fi if test "$zlib" = "no" ; then - echo "Consider installing zlib-dev (zlib-devel, some fio features depend on it." + echo "Consider installing zlib1g-dev (zlib-devel) as some fio features depend on it." if test "$build_static" = "yes"; then echo "Note that some distros have separate packages for static libraries." fi
engines/rados.c +12 -1
@@ -37,6 +37,7 @@ struct rados_options {char *cluster_name;char *pool_name;char *client_name; +char *conf;int busy_poll;int touch_objects; };
@@ -69,6 +70,16 @@ static struct fio_option options[] = { .category = FIO_OPT_C_ENGINE, .group = FIO_OPT_G_RBD, }, + { + .name = "conf", + .lname = "ceph configuration file path", + .type = FIO_OPT_STR_STORE, + .help = "Path of the ceph configuration file", + .off1 = offsetof(struct rados_options, conf), + .def = "/etc/ceph/ceph.conf", + .category = FIO_OPT_C_ENGINE, + .group = FIO_OPT_G_RBD, + }, { .name = "busy_poll", .lname = "busy poll mode",
@@ -184,7 +195,7 @@ static int _fio_rados_connect(struct thread_data *td) goto failed_early; } - r =rados_conf_read_file (rados->cluster,NULL ); + r =rados_conf_read_file (rados->cluster, o->conf);if (r <0 ) {log_err ("rados_conf_read_file failed.\n" ); goto failed_early;
examples/rados.fio +1 -0
@@ -14,6 +14,7 @@ ioengine=rados clientname=admin pool=rados +conf=/etc/ceph/ceph.conf busy_poll=0 rw=randwrite bs=4k
fio.1 +14 -9
@@ -1631,11 +1631,11 @@ multiplied by the I/O depth given. Note that for \fBshmhuge\fR and \fBmmaphuge\fR to work, the system must have free huge pages allocated. This can normally be checked and set by reading/writing `/proc/sys/vm/nr_hugepages' on a Linux system. Fio assumes a huge page -is 4MiB in size. So to calculate the number of huge pages you need for a -given job file, add up the I/O depth of all jobs (normally one unless -\fBiodepth\fR is used) and multiply by the maximum bs set. Then divide -that number by the huge page size. You can see the size of the huge pages in -`/proc/meminfo'. If no huge pages are allocated by having a non-zero +is 2 or 4MiB in size depending on the platform. So to calculate the number of +huge pages you need for a given job file, add up the I/O depth of all jobs +(normally one unless \fBiodepth\fR is used) and multiply by the maximum bs set. +Then divide that number by the huge page size. You can see the size of the huge +pages in `/proc/meminfo'. If no huge pages are allocated by having a non-zero number in `nr_hugepages', using \fBmmaphuge\fR or \fBshmhuge\fR will fail. Also see \fBhugepage\-size\fR. .P
@@ -1655,10 +1655,11 @@ of subsequent I/O memory buffers is the sum of the \fBiomem_align\fR and \fBbs\fR used. .TP .BI hugepage\-size \fR=\fPint -Defines the size of a huge page. Must at least be equal to the system -setting, see `/proc/meminfo'. Defaults to 4MiB. Should probably -always be a multiple of megabytes, so using `hugepage\-size=Xm' is the -preferred way to set this to avoid setting a non-pow-2 bad value. +Defines the size of a huge page. Must at least be equal to the system setting, +see `/proc/meminfo' and `/sys/kernel/mm/hugepages/'. Defaults to 2 or 4MiB +depending on the platform. Should probably always be a multiple of megabytes, +so using `hugepage\-size=Xm' is the preferred way to set this to avoid setting +a non-pow-2 bad value. .TP .BI lockmem \fR=\fPint Pin the specified amount of memory with \fBmlock\fR\|(2). Can be used to
@@ -2243,6 +2244,10 @@ Ceph cluster. If the \fBclustername\fR is specified, the \fBclientname\fR shall the full *type.id* string. If no type. prefix is given, fio will add 'client.' by default. .TP +.BI (rados)conf \fR=\fPstr +Specifies the configuration path of ceph cluster, so conf file does not +have to be /etc/ceph/ceph.conf. +.TP .BI (rbd,rados)busy_poll \fR=\fPbool Poll store instead of waiting for completion. Usually this provides better throughput at cost of higher(up to 100%) CPU utilization.
steadystate.c +0 -7
@@ -250,13 +250,6 @@ int steadystate_check(void) rate_time =mtime_since (&ss->prev_time, &now);memcpy (&ss->prev_time, &now,sizeof (now)); -/* -* Begin monitoring when job starts but don't actually use -* data in checking stopping criterion until ss->ramp_time is -* over. This ensures that we will have a sane value in -* prev_iops/bw the first time through after ss->ramp_time -* is done. -*/ if (ss->state &FIO_SS_RAMP_OVER ) { group_bw +=1000 * (td_bytes - ss->prev_bytes) / rate_time; group_iops +=1000 * (td_iops - ss->prev_iops) / rate_time;
t/run-fio-tests.py +7 -13
@@ -311,21 +311,15 @@ class FioJobTest(FioExeTest): # # Sometimes fio informational messages are included at the top of the # JSON output, especially under Windows. Try to decode output as JSON - # data, lopping off up to the first four lines + # data, skipping everything until the first { # lines = file_data.splitlines() - for i in range(5): - file_data = '\n'.join(lines[i:]) - try: - self.json_data = json.loads(file_data) - except json.JSONDecodeError: - continue - else: - logging.debug("Test %d: skipped %d lines decoding JSON data", self.testnum, i) - return - - self.failure_reason = "{0} unable to decode JSON data,".format(self.failure_reason) - self.passed = False + file_data = '\n'.join(lines[lines.index("{"):]) + try: + self.json_data = json.loads(file_data) + except json.JSONDecodeError: + self.failure_reason = "{0} unable to decode JSON data,".format(self.failure_reason) + self.passed = False class FioJobTest_t0005(FioJobTest):