login
Header Space

 
 

RE: some bad numbers with Java/database threading

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linux Kernel Development <linux-kernel@...>
Date: Thursday, September 13, 2007 - 3:18 am

> I was working on some unit tests and thought I'd give CFS a whirl to see

I've tried reasonalby diligently to figure out what the hell you're doing 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.


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?

DS


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
CFS: some bad numbers with Java/database threading, Antoine Martin, (Wed Sep 12, 7:10 pm)
Re: CFS: some bad numbers with Java/database threading, Ingo Molnar, (Thu Sep 13, 7:24 am)
Re: CFS: some bad numbers with Java/database threading, Ingo Molnar, (Fri Sep 14, 4:32 am)
Re: CFS: some bad numbers with Java/database threading, Satyam Sharma, (Fri Sep 14, 6:06 am)
Re: CFS: some bad numbers with Java/database threading, Satyam Sharma, (Fri Sep 14, 12:01 pm)
Re: CFS: some bad numbers with Java/database threading, Antoine Martin, (Mon Sep 17, 8:17 am)
Re: CFS: some bad numbers with Java/database threading, Satyam Sharma, (Fri Sep 14, 12:08 pm)
Re: CFS: new java yield graphs, Antoine Martin, (Tue Sep 25, 9:46 pm)
Re: CFS: new java yield graphs, Ingo Molnar, (Thu Sep 27, 4:35 am)
RE: some bad numbers with Java/database threading, David Schwartz, (Thu Sep 13, 3:18 am)
Re: some bad numbers with Java/database threading, Nick Piggin, (Wed Sep 12, 7:33 pm)
Re: some bad numbers with Java/database threading, Antoine Martin, (Thu Sep 13, 3:02 pm)
RE: some bad numbers with Java/database threading, David Schwartz, (Thu Sep 13, 5:47 pm)
speck-geostationary