-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Satyam Sharma wrote:It should still work... if you're patient. [snip] covered in separate mail http://devloop.org.uk/documentation/database-performance/dmesg-dualopteron.gz CONFIG_HZ=1000 Good idea, I've added code to capture more fairness oriented attributes: * time until the first thread finishes - this should actually be higher when the scheduler is fairer. * total number of loop iterations executed when the first thread finishes (higher is better) etc. Correct. I think he does have a valid point: maybe, the locality of the java threads is important, but there are so many of them and so many layers below it (jdbc pool, backend database threads, filesystem, device) that the various caches get thrashed quite often anyway, no matter what the interleaving factor is. Which means that being fairer in this case also means switching threads more often and hitting the caches' capacity limits earlier. In which case the granularity and CONFIG_HZ should have a noticeable impact. Ingo did suggest tweaking /proc/sys/kernel/sched_yield_granularity_ns, which I did but this particular test timed out when It ran over the weekend... will run it again now. (results in a couple of days) Maybe the granularity should auto-adjust to prevent such cases? (probably not) Granularity (and therefore fairness) become less important as the number of threads becomes very large, as fairness starts to adversely affects throughput? I have changed my mind and now think that this is not a regression, or at least not one we should worry too much about. As David said, this workload is "pathological". And CFS, does show some noticeable improvements with the new measurements (now using a shorter thread yield of 5ms and a higher number of loop iterations per thread: 25): It does not adversely affect throughput as much (will test with more threads later): http://devloop.org.uk/documentation/database-performance/Linux-Kernels/Kernels-ManyThr... The number of threads that exit before we reach half the total number of loop iterations is lower and more predictable (meaning a more even distribution between all the threads): http://devloop.org.uk/documentation/database-performance/Linux-Kernels/Kernels-ManyThr... And the time it takes to reach this half way point is also more consistent: http://devloop.org.uk/documentation/database-performance/Linux-Kernels/Kernels-ManyThr... "2.6.23-rc6-yield2" is the yield patch meant for 2.6.23, "2.6.23-rc6-yield3" is the one that is not meant to be merged. Both include: echo 1 > /proc/sys/kernel/sched_yield_bug_workaround The high latency case (coming soon) includes HZ250, no preempt, and doubles the /proc/sys/kernel/sched_yield_granularity_ns Not well... This particular test is not meant to represent any real-life scenario - it is very very hard not to have a bias, (that is why there are so many variations of TPC: TPC-W, TPC-H,..) It is just meant to try to measure the impact of changing individual components (anything from kernels, databases, threads, coding techniques, ...) one at a time, running a variety of scenarios and spotting any anomalies. More often than not, the anomalies will tell you about which combinations to avoid, and not about unexpected improvements. Generally yes, but not always - I have a personal preference for lock-less algorithms (like variations on optimistic locking) because they're a lot easier to get right (and understand), but they're not always suitable. (mostly because of ordering/timing/QoS issues) And I digress. Hmmm. Not entirely sure, if the locking is implemented using database transactions, the threads would spend a bit longer in wait state whilst the database does its stuff (even more so for the databases that do not use row-level locking), switching tasks less, so it might actually help improve throughput in some cases (as long as the workload is cpu-bound rather than I/O bound) ? We'll know more when I get the results for the high latency case. Antoine -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG7nBCGK2zHPGK1rsRCrs3AJ9e5Ye1KVgydd06aD6akoLe5Z2RYQCfQey2 PpQYOdsvdo5bLE68ro/KFbE= =c21f -----END PGP SIGNATURE----- -
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Ingo Molnar | [git pull] x86 arch updates for v2.6.25 |
| Anton Salikhmetov | [PATCH -v8 2/4] Update ctime and mtime for memory-mapped files |
git: | |
| Patrick McHardy | Re: [GIT]: Networking |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 16/37] dccp: API to query the current TX/RX CCID |
| Andrew Morton | Re: [BUG] New Kernel Bugs |
