Comment by nathants
2 years ago
this may not be an error.
i’m doing high performance gamedev on a 7950x with smt off. 16 cores.
i can only use 8 to run the game.
mutex and other synchronization gets highly variable latency if the first 8 cores try to talk to the second 8.
i hadn’t heard of this before i started this game, but apparently it’s well known, and nobody makes a chip with more than 8 cores that can have low variability synchronization.
linux running on 8 cores seems like a potentially good idea. one wants the kernel to have low latency with low variability.
You’re describing behaviour with AMD’s Infinity Fabric, which groups cores into CCDs of 8 on 7000 series chips.
Essentially, a 16 core AMD CPU is actually two separate 8 core CPUs glued together with a link.
Intel does not have this limitation.
yeah? a xeon with 16 cores might have to be my next pc. pricey though.
You can try to make your code aware of the situation and distribute the tasks accordingly. IIRC that's what people do on NUMA systems.
4 replies →
I have the 7900 (non-x), I find it helpful to think of it as a dual socket 6 core system. For latency sensitive things like many games, it's best to pin it to a single socket/half the cores. Once you do that the other half can handle everything else. That way jitter stays low, performance is consistent, caches are warm, etc.
i’m pleased with 7950x, it was just a surprise. when benchmarking the game engine, massive latency variance due to background jobs using all cores.
when i compile, all 16 cores are used.
when playing, core0 is main thread, core1 is physx, core2 is network, core3-7 are background jobs used by main thread.
i’m not sure more than 8 cpu cores can be meaningfully used by any current game engine tech.
when i run the server locally, i reduce usage to 4 cores so client and server don’t contend. not much impact.