All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Greg Sullivan <greg.sullivan@sullivang.net>
Cc: fio@vger.kernel.org
Subject: Re: Rate problems (Windows)
Date: Mon, 20 Aug 2012 14:43:21 +0200	[thread overview]
Message-ID: <503230E9.2000406@kernel.dk> (raw)
In-Reply-To: <CAHaS=QxJeWf-YvKkLktR45W2g-dRhEcXgM=7napOxb8ct7pKEg@mail.gmail.com>

On 08/20/2012 03:42 AM, Greg Sullivan wrote:
> On 19 August 2012 22:39, Greg Sullivan <greg.sullivan@sullivang.net> wrote:
>> I'm finding that the throughput is varying wildly during a run - more
>> than I think is probably normal. It happens regardless of whether I
>> limit by data rate or io rate, although I think it's worse when I
>> limit by io.
>>
>> Here is a test job followed by the output. The io rate fluctuated
>> wildly - I watched it in the Windows Performance Monitor. The io rate
>> should be extremely easy to maintain. The "CR=80" looks suspicious -
>> why is there an 80 there when I requested 40?
> [stuff removed]
> 
> I tried the same test on Ubuntu, and I think it's working properly -
> the iops figures displayed by fio are relatively constant as the test
> runs.  (although I'm having trouble relating the the output of iostat
> to the actual workload that should be generated) I still get the
> CR=<double the requested rate> on Ubuntu, so I assume this is normal.
> The iops figures over on the right of the output look kosher. (as they
> do on Windows, except for the wide fluctuations)

The CR=x/y reading is as follows:

- x is the target read _and_ write commit rate. If your workload was a
  read/write workload, it'd be 40 from each. I should change that, it's
  confusing. But for now, suffice to say that it is to be expected and
  the 40 is parsed/understood by fio.
- y is the same, but the minimum rate (if that is set).

See below patch, should make it more easily understandable.

As to the Windows rate fluctuations - a quick guess would be that the
timing is too coarse on Windows.

diff --git a/eta.c b/eta.c
index 9114595..552845d 100644
--- a/eta.c
+++ b/eta.c
@@ -285,11 +285,18 @@ int calc_thread_status(struct jobs_eta *je, int force)
 		    || td->runstate == TD_FSYNCING
 		    || td->runstate == TD_PRE_READING) {
 			je->nr_running++;
-			je->t_rate += td->o.rate[0] + td->o.rate[1];
-			je->m_rate += td->o.ratemin[0] + td->o.ratemin[1];
-			je->t_iops += td->o.rate_iops[0] + td->o.rate_iops[1];
-			je->m_iops += td->o.rate_iops_min[0] +
-					td->o.rate_iops_min[1];
+			if (td_read(td)) {
+				je->t_rate += td->o.rate[DDIR_READ];
+				je->t_iops += td->o.rate_iops[DDIR_READ];
+				je->m_rate += td->o.ratemin[DDIR_READ];
+				je->m_iops += td->o.rate_iops_min[DDIR_READ];
+			}
+			if (td_write(td)) {
+				je->t_rate += td->o.rate[DDIR_WRITE];
+				je->t_iops += td->o.rate_iops[DDIR_WRITE];
+				je->m_rate += td->o.ratemin[DDIR_WRITE];
+				je->m_iops += td->o.rate_iops_min[DDIR_WRITE];
+			}
 			je->files_open += td->nr_open_files;
 		} else if (td->runstate == TD_RAMP) {
 			je->nr_running++;

-- 
Jens Axboe


  reply	other threads:[~2012-08-20 12:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-19 12:39 Rate problems (Windows) Greg Sullivan
2012-08-20  1:42 ` Greg Sullivan
2012-08-20 12:43   ` Jens Axboe [this message]
2012-08-21 11:35     ` Greg Sullivan
2012-08-21 11:41       ` Bruce Cran
2012-08-21 11:44         ` Greg Sullivan
2012-08-21 11:47           ` Greg Sullivan
2012-08-21 11:53           ` Bruce Cran
2012-08-21 12:39             ` Greg Sullivan

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=503230E9.2000406@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=greg.sullivan@sullivang.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.