From: Nick Piggin <nickpiggin@yahoo.com.au>
To: davids@webmaster.com, Antoine Martin <antoine@nagafix.co.uk>
Cc: "Linux Kernel Development" <linux-kernel@vger.kernel.org>
Subject: Re: some bad numbers with Java/database threading
Date: Thu, 13 Sep 2007 09:33:51 +1000 [thread overview]
Message-ID: <200709130933.51278.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <MDEHLPKNGKAHNMBLJOLKOEDIGMAC.davids@webmaster.com>
On Thursday 13 September 2007 17:18, David Schwartz wrote:
> > I was working on some unit tests and thought I'd give CFS a whirl to see
> > if it had any impact on my workloads (to see what the fuss was about),
> > and I came up with some pretty disturbing numbers:
> > http://devloop.org.uk/documentation/database-performance/Linux-Ker
> > nels/Kernels-ManyThreads-CombinedTests-noload2.png
> > As above but also showing the load average:
> > http://devloop.org.uk/documentation/database-performance/Linux-Ker
> > nels/Kernels-ManyThreads-CombinedTests2.png
> > Looks like a regression to me...
>
> I've tried reasonalby diligently to figure out what the hell you're doing
(cc's readded please reply to all when replying to lkml)
Hi David,
You might be sounding a bit too abrasive here... I understand you're
also trying to help, but your tone just might be taken the wrong way.
Antonie is really doing the right thing here to test such a new feature
early and on the code he cares about as a user. And most importantly,
reporting it here. This is probably the most useful resource we have in
Linux.
Maybe the workload is quirky, but regardless, if it is a *regression*
from a previous kernel then it is really important to be brought to our
attention.
> and gone through quite a bit of your documentation, and I just can't figure
> it out. This could entirely be the result of your test's sensitivity to
> execution order.
>
> For example, if you run ten threads that all insert, query, and delete from
> the *same* table, then the exact interleaving pattern will determine the
> size of the results. A slight change in the scheduling quantum could
> multiply the size of the result data by a huge factor. There is a big
> difference between:
>
> 1) Thread A inserts data.
> 2) Thread A queries data.
> 3) Thread A deletes data.
> 4) Thread B inserts data.
> ...
>
>
> and
> 1) Thread A inserts data.
> 2) Thread B insers data.
> ...
> 101) Thread A queries data.
> 102) Thread B queries data.
> ...
>
> Now, even if they're using separate tables, your test is still very
> sensitive to execution order. If thread A runs to completion and then
> thread B does, the database data will fit better into cache. If thread A
> runs partially, then thread B runs partially, when thread A runs again, its
> database stuff will not be hot.
>
> >* java threads are created first and the data is prepared, then all the
> >threads are started in a tight loop. Each thread runs multiple queries
> >with a 10ms pause (to allow the other threads to get scheduled)
>
> There are a number of ways you might be measuring nothing but how the
> scheduler chooses to interleave your threads. Benchmarking threads that
> yield suggests just this type of thing -- if a thread has useful work to do
> and another thread is not going to help it, *why* *yield*?
>
> Are you worried the scheduler isn't going to schedule other threads?! Or is
> there some sane reason to force suboptimal scheduling when you're trying to
> benchmark a scheduler? Are you trying to see how it deals with pathological
> patterns? ;)
>
> The only documentation I can see about what you're actually *doing* says
> things like "The schema and statements are almost identical to the
> non-threaded tests." Do you see why that's not helpful?
next prev parent reply other threads:[~2007-09-13 15:15 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-12 23:10 CFS: " Antoine Martin
2007-09-13 7:18 ` David Schwartz
2007-09-12 23:33 ` Nick Piggin [this message]
2007-09-13 19:02 ` Antoine Martin
2007-09-13 21:47 ` David Schwartz
2007-09-13 11:24 ` CFS: " Ingo Molnar
2007-09-14 8:32 ` Ingo Molnar
2007-09-14 10:06 ` Satyam Sharma
2007-09-14 15:25 ` CFS: some bad numbers with Java/database threading [FIXED] Antoine Martin
2007-09-14 15:32 ` Ingo Molnar
2007-09-18 17:00 ` Chuck Ebbert
2007-09-18 22:46 ` Ingo Molnar
2007-09-18 23:02 ` Chuck Ebbert
2007-09-19 18:45 ` David Schwartz
2007-09-19 19:48 ` Chris Friesen
2007-09-19 22:56 ` David Schwartz
2007-09-19 23:05 ` David Schwartz
2007-09-19 23:52 ` David Schwartz
2007-09-19 19:18 ` Ingo Molnar
2007-09-19 19:39 ` Linus Torvalds
2007-09-19 19:56 ` Ingo Molnar
2007-09-19 20:26 ` Ingo Molnar
2007-09-19 20:28 ` Linus Torvalds
2007-09-19 21:41 ` Ingo Molnar
2007-09-19 21:49 ` Ingo Molnar
2007-09-19 21:58 ` Peter Zijlstra
2007-09-26 1:46 ` CFS: new java yield graphs Antoine Martin
2007-09-27 8:35 ` Ingo Molnar
2007-09-19 20:00 ` CFS: some bad numbers with Java/database threading [FIXED] Chris Friesen
2007-09-14 16:01 ` CFS: some bad numbers with Java/database threading Satyam Sharma
2007-09-14 16:08 ` Satyam Sharma
2007-09-17 12:17 ` Antoine Martin
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=200709130933.51278.nickpiggin@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=antoine@nagafix.co.uk \
--cc=davids@webmaster.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®