BUG 11786 - squid: Remove setting for filter processes the number of Squid processes

I added a function to determine the number of cores.
Now the number of squid processes will be equal to the number of logical cores.
Further I removed the possibility of changing the number
of squid processes in the proxy.cgi

Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: root <root@ipfire.test>
This commit is contained in:
Daniel Weismüller
2018-10-30 12:06:59 +01:00
committed by root
parent 79b89b90e4
commit 1a3323f2e6
2 changed files with 9 additions and 14 deletions

View File

@@ -1165,5 +1165,12 @@ sub dnssec_status() {
return $status;
}
sub number_cpu_cores() {
open my $cpuinfo, "/proc/cpuinfo" or die "Can't open cpuinfo: $!\n";
my $cores = scalar (map /^processor/, <$cpuinfo>);
close $cpuinfo;
return $cores;
}
1;