如何使FIO重播多线程的跟踪 [英] How to make FIO replay a trace with multiple thread

查看:696
本文介绍了如何使FIO重播多线程的跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用fio重播一些块跟踪。

I'm trying to use fio to replay some block traces.

我写的作业文件如下:

[global]
name=replay
filename=/dev/md0
direct=1 
ioengine=psync

[replay]
read_iolog=iolog.fio
replay_no_stall=0 
write_lat_log=replay_metrics
numjobs=1

这里的关键是我想使用psync作为ioengine,并重播iolog。
但是,对于psync,fio似乎忽略了replay_no_stall选项,它忽略了iolog中的时间戳。

The key here is I want to use "psync" as the ioengine, and replay the iolog. However, with psync, fio seems to ignore "replay_no_stall" option, which ignore the timestamp in the iolog.

并且通过将numjobs设置为4,fio好像是制作相同工作负载的4个副本,而不是使用4个线程来分割工作负载。

And by setting numjobs to be 4, fio seems to make 4 copies of the same workload, instead of using 4 threads to split the workload.

那么,我怎样才能使用psync使fio尊重时间戳,并使用多个线程重放跟踪?

So, how could I make fio with psync respect the timestamp, and use multiple threads to replay the trace?

推荐答案

没有看到iolog本身的小问题片段,我不能说为什么要重播总是尽可能快。请注意,等待时间为毫秒秒,并且如果后者要产生效果,则必须在iolog中连续等待(因为它们相对于作业本身的开始而不是相互之间或以前的I / O)。有关详细信息,请参阅HOWTO的跟踪文件格式v2部分。对于fio邮件列表来说,这个问题听起来不错(但是因为这是一个问题,请不要把它放在bug跟踪器中)。

Without seeing a small problem snippet of the iolog itself I can't say why the replay is always going as fast as possible. Be aware that waits are in milliseconds and successive waits in the iolog MUST increase if the later ones are to have an effect (as they are relative to the start of the job itself and not to each other or the previous I/O). See the "Trace file format v2" section of the HOWTO for more details. This problem sounds like a good question for the fio mailing list (but as it's a question please don't put it in the bug tracker).

numjobs被记录为仅在HOWTO中创建克隆,因此您的体验与记录的行为相符。

numjobs is documented as only creating clones in the HOWTO so your experience matches the documented behaviour.

可悲的是,fio重放目前(2016年底)不能以单个重播文件可以在多个作业之间任意分割的方式运行,并且您需要多个作业让fio使用多个线程/进程。如果您不介意在作业之间丢失I / O顺序这一事实,您可以将iolog拆分为4个部分,并创建一个使用每个新的iolog文件的作业。

Sadly fio replay currently (end of 2016) doesn't work in a way that a single replay file can be arbitrarily split among multiple jobs and you need multiple jobs to have fio use multiple threads/processes. If you don't mind the fact that you will lose I/O ordering between jobs you could split the iolog into 4 pieces and create a job that uses each of the new iolog files.

这篇关于如何使FIO重播多线程的跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆