From: Anthony Minessale Date: Wed, 15 Apr 2020 19:03:21 +0000 (+0000) Subject: [core] make auto mean cpu * 3 / 2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7424ed24fabe818776a4afc74ff21af80a0b4123;p=thirdparty%2Ffreeswitch.git [core] make auto mean cpu * 3 / 2 --- diff --git a/src/include/switch_utils.h b/src/include/switch_utils.h index 41b2436538..ec361a9885 100644 --- a/src/include/switch_utils.h +++ b/src/include/switch_utils.h @@ -1144,10 +1144,7 @@ static inline uint32_t switch_parse_cpu_string(const char *cpu) if (!cpu) return 1; if (!strcasecmp(cpu, "auto")) { - if (cpu_count > 4) return 4; - if (cpu_count <= 2) return 1; - - return (uint32_t)(cpu_count / 2); + return (uint32_t)((cpu_count * 3) / 2); } if (!strncasecmp(cpu, "cpu/", 4)) { /* cpu/2 or cpu/2/ */