Bug #79585 | mtr limits parallel tests to 50 | ||
---|---|---|---|
Submitted: | 10 Dec 2015 6:13 | Modified: | 16 Aug 2016 3:54 |
Reporter: | Daniel Black | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Tools: MTR / mysql-test-run | Severity: | S3 (Non-critical) |
Version: | 5.6.28, 5.7.10 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[10 Dec 2015 6:13]
Daniel Black
[10 Dec 2015 6:14]
Daniel Black
OCA was submitted today
[10 Dec 2015 7:24]
MySQL Verification Team
Hello Daniel, Thank you for the report and contribution. Thanks, Umesh
[10 Dec 2015 10:00]
Bjørn Munch
Your patch looks good but I do have a comment: The max. argument to mtr_get_unique_id() is the highest ID it checks. If your parallel setting is 49 or higher, the number of IDs checked is equal to the parallel setting (possibly +1). So if any one of those is taken or if any of the ports in the range are, you may run out. So you should probably add some overhead, maybe add $opt_parallel / 10 or something like that. Even so, there will have to be an absolute upper limit. I suppose port numbers up to 32000 at least will be valid on any OS, this will correspond to build_thread_id of 2199. Then we can reconsider when it becomes realistic to run more that 2000 mtr threads. :-)
[10 Dec 2015 10:03]
Bjørn Munch
I notice this was reported against 5.6.29 and 5.7.11. Those versions do not exist yet and could even end up including your patch. I suggest changing to 5.6.28 and 5.7.10 which were both released a few days ago.
[11 Dec 2015 7:35]
Daniel Black
$opt_parallel / 10 effectively cuts down the maximium even specified by user. I'll look at the off by 1 description however I didnt' see a problem. I've generally noticed the tests are full of waiting on conditions and sleeps so even the "auto" number of parallel defaulting to the number of cores isn't straining all the cpus to achieve its goal.
[14 Dec 2015 9:03]
Bjørn Munch
What I meant was to add e.g. $opt_parallel / 10 in *addition* to what was already suggested.
[17 Dec 2015 22:55]
Daniel Black
no bogomips and raise MTR_MAX_PARALLEL default
Attachment: no-bogomips-raise-MTR_MAX_PARALLEL-default.patch (text/x-patch), 686 bytes.
[17 Dec 2015 22:59]
Daniel Black
Ah ok. follow now. Since the limit is now 2K ish lets raise the default max (should be safe for the next few years). bogomips seems to be a bit of a hack and most build machines are over this spec anyway so patch removes it. Not sure who disliked Windows VMs when this was written but I haven't tested it so I'm leaving it as is :-)
[15 Aug 2016 15:32]
Paul DuBois
Posted by developer: Noted in 5.6.33, 5.7.15 changelogs. In mysql-test-run.pl, a limit of 50 was imposed on the number of workers for parallel testing, which on systems with more than 50 CPUs resulted in exhaustion of unique thread IDs. The ID-exhaustion problem has been corrected, and the limit of 50 on number of workers has been lifted. Additionally, these changes were made: * To avoid idle workers, the number of parallel workers now is limited to the number of tests. * Previously, if --parallel=auto was given and the MTR_MAX_PARALLEL environment variable was not set, a limit of 8 was imposed on the number of parallel workers. This limit has been lifted.
[15 Aug 2016 16:23]
Paul DuBois
Thanks to Daniel Black for the patch on which this change was based.
[16 Aug 2016 3:54]
Daniel Black
Thanks for the commit Paul. On linux the number of tests is still limited by fs.aio-max-nr however I never got time to work out how many was really needed.