1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

mtr: update heuristics for --parallel=auto

to work better for CPUs with more than 2000 bogomips.
old behavior is preserved if less than 2500 bogomips.
This commit is contained in:
Sergei Golubchik
2020-02-26 19:39:26 +01:00
parent 0fe3d6d563
commit 5c1ed707a3

View File

@ -441,11 +441,8 @@ sub main {
if ( $opt_parallel eq "auto" ) {
# Try to find a suitable value for number of workers
my $sys_info= My::SysInfo->new();
$opt_parallel= $sys_info->num_cpus() + int($sys_info->min_bogomips()/500)-4;
$opt_parallel= $sys_info->num_cpus();
for my $limit (2000, 1500, 1000, 500){
$opt_parallel-- if ($sys_info->min_bogomips() < $limit);
}
my $max_par= $ENV{MTR_MAX_PARALLEL} || 8;
$opt_parallel= $max_par if ($opt_parallel > $max_par);
$opt_parallel= $num_tests if ($opt_parallel > $num_tests);