All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ma, Chinang" <chinang.ma@intel.com>
To: Henrik Austad <henrik@austad.us>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@elte.hu>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Wilcox, Matthew R" <matthew.r.wilcox@intel.com>,
	"Van De Ven, Arjan" <arjan.van.de.ven@intel.com>,
	"Styner, Douglas W" <douglas.w.styner@intel.com>,
	"Chilukuri, Harita" <harita.chilukuri@intel.com>,
	"Wang, Peter Xihong" <peter.xihong.wang@intel.com>,
	"Nueckel, Hubert" <hubert.nueckel@intel.com>,
	Chris Mason <chris.mason@oracle.com>,
	"Tripathi, Sharad C" <sharad.c.tripathi@intel.com>
Subject: RE: CFS scheduler OLTP perforamnce
Date: Mon, 15 Dec 2008 13:49:59 -0700	[thread overview]
Message-ID: <BC02C49EEB98354DBA7F5DD76F2A9E80030A7DD60C@azsmsx501.amr.corp.intel.com> (raw)
In-Reply-To: <20081215165716.GA27776@januz.myftp.org>

>-----Original Message-----
>From: Henrik Austad [mailto:henrik@austad.us]
>Sent: Monday, December 15, 2008 8:57 AM
>To: Ma, Chinang
>Cc: Peter Zijlstra; Ingo Molnar; linux-kernel@vger.kernel.org; Wilcox,
>Matthew R; Van De Ven, Arjan; Styner, Douglas W; Chilukuri, Harita; Wang,
>Peter Xihong; Nueckel, Hubert; Chris Mason; Tripathi, Sharad C
>Subject: Re: CFS scheduler OLTP perforamnce
>

*snip*

>On Mon, Dec 15, 2008 at 08:32:41AM -0700, Ma, Chinang wrote:
>>
>> >Is this really a kernel-scheduler problem? Or is it an error in the way
>the
>> >timestamps are recoreded?
>> >
>> >Does not the time recorded then depend upon how the foreground process
>is
>> >scheduled, and not the log-writer? What happens if you log the time at
>the
>> >start and end of the log-writer function? Then you would get the time-
>delta
>> >between signaling and rr-wakeup, as well as time spent writing buffer to
>> >disk. By using the final timestamp in the foreground process, you'd get
>the
>> >latency for the last foreground-process wakeup as well.
>> >
>> >Or am I completely missing the point here?
>>
>> Since I don't have access to the source code, I cannot make the about
>change to the foreground or log writer.
>
>Aha, then it makes sense :-)
>
>What about, as a test, set the foreground process as rt-prio (not a good
>thing
>for a production environment, but as a test, it should give you an
>indication
>to how long time the wakeup-time is.
>

When setting foreground and log writer to rt-prio, the log latency reduced to 4.8ms. Performance is about 1.5% higher than the CFS result.
  
On a side note, we had been using rt-prio on all DBMS processes and log writer ( in higher priority) for the best OLTP performance. That has worked pretty well until 2.6.25 when the new rt scheduler introduced the pull/push task for lower scheduling latency for rt-task. That has negative impact on this workload, probably due to the more elaborated load calculation/balancing for hundred of foreground rt-prio processes. Also, there is that question of no production environment would run DBMS with rt-prio. That is why I am going back to explore CFS and see whether I can drop rt-prio for good.

>>
>> >
>> >> >How would you characterize the log tasks behaviour?
>> >> >
>> >> > - does it run long/short (any quantization)
>> >>
>> >> There were 371 log writes per second so ~2.7ms per log writer
>execution.
>> >> Out of this we know ~2.13 ms was spent waiting for log file i/o. Log
>> >writer
>> >> was running for (2.7ms - 2.13ms) = 0.57ms
>> >>
>> >> > - does it sleep long/short - how does it compare to its runtime?
>> >>
>> >> With the current throughput, log writer should be constantly writing
>log
>> >> and rarely sleep.
>> >>
>> >> > - does it wake others?
>> >> >   - if so, always the one who woke it, or multiple others?
>> >>
>> >> Log writer wake multiple foreground processes using vector post.
>> >
>> >So, you don't really know if the initial process that recorded the
>> >timestamp
>> >is the one who is awoken - so the time taken could be *very* long?
>> >
>> Yes. If we only look at the timestamp in just one foreground process. The
>reported log latency is an average of the sum of all foreground stats.
>Since this average went down with the log writer set to SCHED_RR, I took
>that as log writer get to do its job sooner.
>
>Ah, I guess the time went down because the writer was scheduler much
>earlier,
>and this lead to decreased time, but as the foreground process needs to be
>waken up and scheduled *after* the writer has finished, you will still see
>some latencies here.
>
>I'm suspecting you record a lot of time waiting for the foreground process
>to be scheduled again.
>
>
>henrik

  reply	other threads:[~2008-12-15 20:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-11 23:25 CFS scheduler OLTP perforamnce Ma, Chinang
2008-12-12 12:12 ` Peter Zijlstra
2008-12-12 13:38   ` Peter Zijlstra
2008-12-12 14:04     ` Gilles.Carry
2008-12-12 21:45     ` Ma, Chinang
2008-12-14 14:43       ` Henrik Austad
2008-12-15 15:32         ` Ma, Chinang
2008-12-15 16:57           ` Henrik Austad
2008-12-15 20:49             ` Ma, Chinang [this message]
2008-12-12 14:15   ` Andi Kleen
2008-12-12 14:22     ` Peter Zijlstra
2008-12-12 14:39       ` Andi Kleen
2008-12-12 17:25   ` Ma, Chinang
2008-12-12 12:37 ` Gilles.Carry

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=BC02C49EEB98354DBA7F5DD76F2A9E80030A7DD60C@azsmsx501.amr.corp.intel.com \
    --to=chinang.ma@intel.com \
    --cc=arjan.van.de.ven@intel.com \
    --cc=chris.mason@oracle.com \
    --cc=douglas.w.styner@intel.com \
    --cc=harita.chilukuri@intel.com \
    --cc=henrik@austad.us \
    --cc=hubert.nueckel@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.r.wilcox@intel.com \
    --cc=mingo@elte.hu \
    --cc=peter.xihong.wang@intel.com \
    --cc=peterz@infradead.org \
    --cc=sharad.c.tripathi@intel.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 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.