News for hackers. Stuff that matters.
Re:OpenTTD is an open source simulation game based upon Tran... by teruakohatu on Wednesday December 04, 2024 @02:41AM (#42315301)
This is really interesting. Submit it as a Show HN.
Re:OpenTTD is an open source simulation game based upon Tran... by michalc on Wednesday December 04, 2024 @02:44AM (#42315316)
Ah I did! https://news.ycombinator.com/item?id=39254487

(Feels a bit soon to repost somehow…)

Re:OpenTTD is an open source simulation game based upon Tran... by hyperman1 on Wednesday December 04, 2024 @05:24AM (#42316144)
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

Re:OpenTTD is an open source simulation game based upon Tran... by MoreMoore on Wednesday December 04, 2024 @09:05AM (#42317519)
I wonder if the plot would look similar if you disabled hyperthreading but kept the same number of workers.
Re:OpenTTD is an open source simulation game based upon Tran... by michalc on Wednesday December 04, 2024 @02:17PM (#42320954)
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(?)

Re:OpenTTD is an open source simulation game based upon Tran... by MoreMoore on Thursday December 05, 2024 @02:53AM (#42325959)
Seems plausible to me. The efficiency cores seem to be clocked quite a bit lower.