←back to thread

302 points doener | 3 comments | | HN request time: 0.656s | source
Show context
michalc ◴[] No.42315249[source]
I have posted this before, but I’ve been working on a wrapper for OpenTTD to turn it from a game to a (slightly!) more serious system for research/experimentation, especially using its AI system:

https://github.com/michalc/OpenTTDLab

replies(4): >>42315301 #>>42315603 #>>42315610 #>>42316424 #
teruakohatu ◴[] No.42315301[source]
This is really interesting. Submit it as a Show HN.
replies(1): >>42315316 #
michalc ◴[] No.42315316[source]
Ah I did! https://news.ycombinator.com/item?id=39254487

(Feels a bit soon to repost somehow…)

replies(1): >>42316144 #
1. hyperman1 ◴[] No.42316144[source]
I am looking at https://github.com/michalc/OpenTTDLab/blob/main/examples/02-... and wondering if this isn't hyperthreading being enabled.

If you have 4 real cores, with 2 hyperthreads, the system reports 8 CPUs. But that's fake. Hyperthreads share most of their compute and register resources, so they only work well if a core is spending most of its time waiting. 2 hyperthreads both doing full compute will basically work at half speed each, which is close to what your graph is showing.

BTW, you can check on Linux with this command LANG=C lscpu and checking the Thread(s) per core value

replies(1): >>42317519 #
2. MoreMoore ◴[] No.42317519[source]
I wonder if the plot would look similar if you disabled hyperthreading but kept the same number of workers.
replies(1): >>42320954 #
3. michalc ◴[] No.42320954[source]
Ah I _think_ I ran this on a MacBook that as far as I know has 8 real cores…

But I since found that 4 are “efficiency” cores, so that could be the reason for the poor scaling(?)