Possibly suppoert for SMT technology and NUMA
Moderator: ickputzdirwech
- TheKillerChicken
- Long Handed Inserter
- Posts: 80
- Joined: Sat Mar 02, 2019 7:06 am
- Contact:
Possibly suppoert for SMT technology and NUMA
Hi, I am curious if the Factorio code is able to be programmed to support SMT technology (Simultanius Multithreading) and NUMA. I know this is far-out because not everyone has an advanced workstation server as a gamer, so I will not blame you if you choose not to support it.
Re: Possibly suppoert for SMT technology and NUMA
Factorio already supports and uses SMT where it helps.
If you want to get ahold of me I'm almost always on Discord.
- TheKillerChicken
- Long Handed Inserter
- Posts: 80
- Joined: Sat Mar 02, 2019 7:06 am
- Contact:
Re: Possibly suppoert for SMT technology and NUMA
I did bot know that. Will there ever be a time where it can use 12-16 cores at a time?
- TheKillerChicken
- Long Handed Inserter
- Posts: 80
- Joined: Sat Mar 02, 2019 7:06 am
- Contact:
Re: Possibly suppoert for SMT technology and NUMA
If it is SMT capable, why is it using 2 cores max on the server/client? Or is SMT only for the startup sequence?
Re: Possibly suppoert for SMT technology and NUMA
You can read the 22~ pages of discussion here: viewtopic.php?f=5&t=39893 but the TL-DR version of it is: because maxing out cores is not the bottleneck.
If you want to get ahold of me I'm almost always on Discord.
- TheKillerChicken
- Long Handed Inserter
- Posts: 80
- Joined: Sat Mar 02, 2019 7:06 am
- Contact:
Re: Possibly suppoert for SMT technology and NUMA
I do know this game is DRAM dependent, so I am wondering if I populate all 16 DDR3-1866 slots, will that give any performance increase? It is 8-channel memory supported.
- TheKillerChicken
- Long Handed Inserter
- Posts: 80
- Joined: Sat Mar 02, 2019 7:06 am
- Contact:
Re: Possibly suppoert for SMT technology and NUMA
So pretty much this game could use a trillion cores and still be bound to the DRAM, to what I am getting at.Rseding91 wrote: Sat Sep 02, 2023 6:04 pm You can read the 22~ pages of discussion here: viewtopic.php?f=5&t=39893 but the TL-DR version of it is: because maxing out cores is not the bottleneck.
Re: Possibly suppoert for SMT technology and NUMA
Theoretically yes.TheKillerChicken wrote: Sat Sep 02, 2023 6:14 pm I do know this game is DRAM dependent, so I am wondering if I populate all 16 DDR3-1866 slots, will that give any performance increase? It is 8-channel memory supported.
If you want to get ahold of me I'm almost always on Discord.
- TheKillerChicken
- Long Handed Inserter
- Posts: 80
- Joined: Sat Mar 02, 2019 7:06 am
- Contact:
Re: Possibly suppoert for SMT technology and NUMA
It also uses NUMA. Will Factorio benefit from that feature also?Rseding91 wrote: Sat Sep 02, 2023 7:12 pmTheoretically yes.TheKillerChicken wrote: Sat Sep 02, 2023 6:14 pm I do know this game is DRAM dependent, so I am wondering if I populate all 16 DDR3-1866 slots, will that give any performance increase? It is 8-channel memory supported.
- TheKillerChicken
- Long Handed Inserter
- Posts: 80
- Joined: Sat Mar 02, 2019 7:06 am
- Contact:
Re: Possibly suppoert for SMT technology and NUMA
I also want to add that you all are incredibly awesome. The only other development studio that is like this is Colossal Order. Wube and CO are my favourites as you both keep in constant communications with you customers/users. Thanks for keeping your integrity where others have fallen.
- TheKillerChicken
- Long Handed Inserter
- Posts: 80
- Joined: Sat Mar 02, 2019 7:06 am
- Contact:
Re: Possibly suppoert for SMT technology and NUMA
I just read up on multicore tech. I did not realise that using more processor cores could actually degrade performance. I also did not realise that it would be a monumental task to code such a thing. Now I understand why this game does not use mass-core usage.
Re: Possibly suppoert for SMT technology and NUMA
I had to look up what NUMA actually means, and found out that this is one annoying hassle I have at work. (In short - access to some memory regions is faster from a specific core than from other cores.)TheKillerChicken wrote: Sat Sep 02, 2023 7:16 pmIt also uses NUMA. Will Factorio benefit from that feature also?Rseding91 wrote: Sat Sep 02, 2023 7:12 pmTheoretically yes.TheKillerChicken wrote: Sat Sep 02, 2023 6:14 pm I do know this game is DRAM dependent, so I am wondering if I populate all 16 DDR3-1866 slots, will that give any performance increase? It is 8-channel memory supported.
To fully optimize the usage of the fastest physical memory region you'd have to allocate variables to the core from which they are called. I don't think that's really doable on a PC though - because applications are not able to allocate variable to physical memory regions. They get a virtual region from the OS which does that for them. Also, the threads don't necessarily always end on the same core. Each tick they could move to a different core, so that a former good variable allocation might be less optimal one tick later.
Still, there might be some benefit: Each thread has a stack. That one is a safe bet for the OS to be put on the core it allocates the thread. So - as long as the activation of NUMA only improves the access time in some cases and doesn't hurt for the rest, you should see at least a small improvement if Windows supports NUMA. Still, I wouldn't expect miracles from that.
If I remember correctly, we had an improvement of a few percent for optimizing the variable layout to the core specific regions. Now that is of course a different CPU than you find in a PC, but I don't expect the benefits there to be significantly larger. It's nice to have and it might save you in a pinch, but it will not be the big breakthrough.
- TheKillerChicken
- Long Handed Inserter
- Posts: 80
- Joined: Sat Mar 02, 2019 7:06 am
- Contact:
Re: Possibly suppoert for SMT technology and NUMA
I see. So I should keep NUMA disabled then.Premu wrote: Sun Sep 03, 2023 12:08 pmI had to look up what NUMA actually means, and found out that this is one annoying hassle I have at work. (In short - access to some memory regions is faster from a specific core than from other cores.)TheKillerChicken wrote: Sat Sep 02, 2023 7:16 pmIt also uses NUMA. Will Factorio benefit from that feature also?Rseding91 wrote: Sat Sep 02, 2023 7:12 pmTheoretically yes.TheKillerChicken wrote: Sat Sep 02, 2023 6:14 pm I do know this game is DRAM dependent, so I am wondering if I populate all 16 DDR3-1866 slots, will that give any performance increase? It is 8-channel memory supported.
To fully optimize the usage of the fastest physical memory region you'd have to allocate variables to the core from which they are called. I don't think that's really doable on a PC though - because applications are not able to allocate variable to physical memory regions. They get a virtual region from the OS which does that for them. Also, the threads don't necessarily always end on the same core. Each tick they could move to a different core, so that a former good variable allocation might be less optimal one tick later.
Still, there might be some benefit: Each thread has a stack. That one is a safe bet for the OS to be put on the core it allocates the thread. So - as long as the activation of NUMA only improves the access time in some cases and doesn't hurt for the rest, you should see at least a small improvement if Windows supports NUMA. Still, I wouldn't expect miracles from that.
If I remember correctly, we had an improvement of a few percent for optimizing the variable layout to the core specific regions. Now that is of course a different CPU than you find in a PC, but I don't expect the benefits there to be significantly larger. It's nice to have and it might save you in a pinch, but it will not be the big breakthrough.
- TheKillerChicken
- Long Handed Inserter
- Posts: 80
- Joined: Sat Mar 02, 2019 7:06 am
- Contact:
Re: Possibly suppoert for SMT technology and NUMA
I just upgraded my gaming machine to a Ryzen 9 7950x with 64GB DDR5-5200. so the NUMA/SMT request is no longer relevant. My workstation was a dinosaur and I figured it was time to retire that energy-consuming pig for a more efficient, new, and much faster system.