louwrentius / fio-plot

Create charts from FIO storage benchmark tool output
BSD 3-Clause "New" or "Revised" License
370 stars 87 forks source link

Customizing legend labels for client-server line charts #111

Closed willgorman closed 1 year ago

willgorman commented 1 year ago

The new client-server support is really great to see, thanks! I just have a question about whether it's possible to display anything instead of or in addition to the hostname in the legend on line charts? For example, if I have bench-fio results from running a job on a remote host with increasing block sizes

[benchfio]
target = /mnt/target
output = example
type = directory
mode = randwrite,write
size = 1G
iodepth = 16
numjobs = 8
block_size = 4k,16k,256k,1M
direct = 1
engine = libaio
precondition = False
precondition_repeat = False
runtime = 60
destructive = True
remote = fiohosts
remote_checks = True
fio-plot -i example/target/4k example/target/16k example/target/256k example/target/1M  -T "IOPS at increasing block sizes" -g -t iops -r randwrite -d 16 -n 8

Produces a graph like: CleanShot 2023-04-11 at 12 57 16

The legend shows the remote hostname only and nothing about which series corresponds to which block size. Without client-server this would normally be picked up from the directory names and could be controlled with the --xlabel-parent and --xlabel-depth flags but those don't seem to have any effect on client-server results. Is there any way to add more information to the label?

louwrentius commented 1 year ago

Thanks for the feedback! I've seen your patch but it's a static solution / hard-coded it seems. And then there is the subtitle issue.

If you are OK with sharing the test data (privately through louwrentius 🌷 gmail.com if you want) I think we can make the blocksize a part of the legend itself and fix the subtitle.

The idea would be that those options in the legend, like std and p99 are exchanged for blocksize (configurable)

willgorman commented 1 year ago

That sounds good, I agree that the change in the patch is not very flexible. I've sent the test data via email.

louwrentius commented 1 year ago

Thanks, I received the data, I'll take a look at it later.

louwrentius commented 1 year ago

The issue is more complex than I thought. It may take more time to get to a solution, just fyi.

@willgorman

I'm wondering if a different graph type better suits your needs. There is the -C compare graph that would look like this:

IOPS-at-increasing-block-sizes_2023-04-13_183001_JU

fio-plot -i fiocsblock/4k fiocsblock/16k fiocsblock/256k fiocsblock/1M -T "IOPS at increasing block sizes" -C -r randwrite -d 16 -n 8 --include-host "All clients"

willgorman commented 1 year ago

@louwrentius Thanks, that's helpful to know and does look like something I could use. I do need to be able to use time series graphs from client-server tests too but for now I will do that from my fork using the patch to add the path after the hostname.

louwrentius commented 1 year ago

There are some bugs I need to fix before the compare graph can be generated like the example. I'm not 100% sure your patch will make all records (in case of multiple test clients) unique.

louwrentius commented 1 year ago

I was able to create this graph with the latest version (1.1.6). TEST_2023-04-15_004815_uT

~/projects/fio-plot/bin/fio-plot -i gold/fio/4k/ goldnumjob/fio/4k/ -T "TEST" -g -t iops -r randread --xlabel-parent 2 --xlabel-depth 0

So bench-fio creates a directory structure with the block size in the path name. If the path becomes part of the label, the legend items become unique.

Let me know if this works for you. You can play with the --xlabel-parent parameter to shorten the label as needed.

willgorman commented 1 year ago

@louwrentius That works for me, thanks!