machine_class 3/4: log nprocs, not ncores
Summary:
Imagine a machine with two cores each of them hyperthreaded. Unix will report this as 4 processors even though only two concurrent pieces of work can be done at the same time. In ServerMain we count nprocs, and simply assume without evidence that our machine is hyperthreaded, and divide nprocs by 2, and use that as the number of concurrent typecheck worker processes.
A little knowledge is a dangerous thing. In
D32986569 (https://github.com/facebook/hhvm/commit/
270f2b868c002e32c85dd91cd90fd4b8776a6d13) (
Dec2021) I decided to be fancy and record the actual number of cores. What I learnt was that we are sometimes run on hyperthreaded machines (where /2 is a good thing) and sometimes on non-hyperthreaded machines (where /2 is needlessly throwing away perf). So I added code to report the number of cores based on /sys/cpuinfo.
That was a bad idea. If we had that "two hyperthreaded core" scenario and created a VM on it, it's quite common for the VM to be told via /sys/cpuinfo that it has four non-hyperthreaded cores. In other words, my attempt to record ncores was flawed.
This diff deletes the code. It simply reports nprocs. It's the best we can do. I changed the column name from "ncores" to "nprocs". I didn't want any confusion.
Reviewed By: nt591
Differential Revision:
D36620523
fbshipit-source-id:
63fc1e06069832bd9b2d015b95bfdbfb7f74cab6