Flexible I/O Tester development
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Ivan Frain <ivan.frain@seanodes.com>
Cc: fio@vger.kernel.org
Subject: Re: problem with the "write_bw_log" parameter in a virtualized  environment   using a write iopattern
Date: Sat, 1 Aug 2009 10:23:40 +0200	[thread overview]
Message-ID: <20090801082340.GZ12579@kernel.dk> (raw)
In-Reply-To: <4A73107B.8030102@seanodes.com>

On Fri, Jul 31 2009, Ivan Frain wrote:
> Jens Axboe a �crit :
>> On Fri, Jul 31 2009, Ivan Frain wrote:
>>   
>>> Hi everybody,
>>>
>>> I'am using fio in a vmware virtualized environment. I have got a guest
>>> virtual machine based on centos5.2 on which I run fio in order to
>>> measure the virtual disks IO performances.
>>> I use the "write_bw_log" parameter in order to build graphs for the
>>> experiments but the problem is that the file generated by fio for each
>>> job is empty (size = 0).
>>> However, i also use "write_clat_log" parameter and the 'clat.log' and
>>> 'slat.log' files are not empty. The mean bandwidth in the fio output
>>> summary seams to be good.
>>>     
>>
>> I wonder how long that bug has been there... It's due to a botched
>> memcpy in the fio core. There are two stat sample times, yet it
>> overwrites only the first one (being 0, or DDIR_READ, which explains why
>> the read one works).
>>
>> Try the below patch, it's also committed now.
>>
>> diff --git a/fio.c b/fio.c
>> index ba9e384..7ad1b57 100644
>> --- a/fio.c
>> +++ b/fio.c
>> @@ -1105,7 +1105,10 @@ static void *thread_main(void *data)
>>  	clear_state = 0;
>>  	while (keep_running(td)) {
>>  		fio_gettime(&td->start, NULL);
>> -		memcpy(&td->ts.stat_sample_time, &td->start, sizeof(td->start));
>> +		memcpy(&td->ts.stat_sample_time[0], &td->start,
>> +				sizeof(td->start));
>> +		memcpy(&td->ts.stat_sample_time[1], &td->start,
>> +				sizeof(td->start));
>>  		memcpy(&td->tv_cache, &td->start, sizeof(td->start));
>>   		if (td->o.ratemin[0] || td->o.ratemin[1])
>>
>>   
>
> Well, this patch works very well, the bw log file is filled again.
> Thank you for your quick answer.

Good!

> FIO rocks !!

Thanks :-)

-- 
Jens Axboe


      reply	other threads:[~2009-08-01  8:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-31  8:45 problem with the "write_bw_log" parameter in a virtualized environment using a write iopattern Ivan Frain
2009-07-31  9:21 ` Jens Axboe
2009-07-31 15:40   ` Ivan Frain
2009-08-01  8:23     ` Jens Axboe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090801082340.GZ12579@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=fio@vger.kernel.org \
    --cc=ivan.frain@seanodes.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox