News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

How does integrated vs dedicated GPU affect Simutrans performance?

Started by Matthew, November 27, 2020, 07:26:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Matthew

I am considering buying or building a new or second-hand PC. For non-Simutrans purposes, the integrated graphics on recent Ryzen APUs (2400G, 3400G) meet my requirements.

However, the PC also needs to be able to run the Bridgewater-Brunel multiplayer games of Simutrans-Extended.  ::-\

The standard advice available on Internet fora is that using integrated graphics does not slow the CPU - except that it reduces the CPU's memory bandwidth, which of course is exactly where Simutrans bottlenecks. However, most of these advice threads are probably assuming that the iGPU is being used heavily, but Simutrans barely uses it all (in my cloud, VM, Sim-Ex uses about 1% of an RX480). One of the top programmers on Stack Overflow claims that the actual sending-stuff-to-the-monitor aspect uses a tiny amount of of RAM bandwidth, in which case iGPUs are probably fine.

I am aware that using the fastest dual-channel RAM affordable will maximize the memory bandwidth.

Does anyone have more thoughts on the relative performance of Simutrans using integrated vs dedicated graphics? If I buy a dedicated graphics card, then I'm not going to be buying the fastest RAM too....

If anyone has dedicated and integrated GPUs and lots of free time to donate, you could settle the question by generously comparing the performance of the Bridgewater-Brunel savegame on each one.  :question:

(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

Vladki

Although I don't have any data on this, I think that the difference between integrated and dedicated graphics will be negligible. Just buy the fastest ram that your cpu and motherboard can use.

freddyhayward

I use a laptop with a dedicated GPU but that is almost always disabled because of its refusal to cooperate with linux. On the rare occasions i've used it with simutrans, it never made any noticeable difference.

Mariculous

I didn't make any detailled testing for now, but I would not expect a huge performance impact if any.
Usually I'm running simutrans on the intel HD GPU, but I'll test running the game on my dedicated GTX965M, which is notably faster and comes with its own graphics memory.
Simutrans is not pretty demanding to the GPU, so the pure performance of the GPU won't matter here.

What might matter is the memory bandwith, but the plain image sprites are processed by the CPU, thus need to be loaded thre anyways, so I don't expect any gain in using my dedicated GPU over the intel HD graphics.

I'll report on this later.

Roboron

Simutrans doesn't make use of the GPU really, so it doesn't matter. A recent discussion aims to change this, but that's such a gargantuan task I don't see it happening anytime soon (if it does happen, which I also doub).

Your best bet is upgrading RAM & CPU ^.^

prissi

Since Simutrans mainly wants memory bandwidth, filling at least two slots of DRAM is preferable. Still the display eats not much badwidth noawadays. Even with a 4k display, 60 fps are at most 2 GBytes/s (all nicely in linear memory at optimum access conditions). A 2012 Sandy Bridge CPU had a bandwidth of 60 GByte/s for linear access in burst mode (with fast enough DRAM), so less than 1/30 or less than 4 %. With a more common 2k display, it is 500 kB/s, and thus in the noise level.

Since a DDR3 channel (DDR3-1866) ca get 15 GB/s, you would need four channels  for 60 GB/s. So it depends on how many RAM channels you processor and mainboard uses.

Mariculous

As expected, apart from fan noise, I didn't notice any difference.
Subjectively, running the BB save offline on the nvidia GPU did not run more smoothly than running the same on the intel GPU.
Reported framerates have been roughly the same and running each of these for an hour at different times resulted in nearly the same ingame time (except from ~2 minutes)  after that meantioned real-world hour.

As expeced, dedicated vs integrated GPU doesn't matter pretty much in simutrans.

Edit: I'm a little confused about prissis mentioned numbers.
Sandy bridge offers a dual channel memory controller, which officially supports up to DDR3-1333, which is 2*10%u2154 GB/s
So which bandwith is 60 GB/s?

Just for curiosity, it doesn't affect the point pretty much anyways. 500 kB/s is still a small portion of this.

Matthew

Thank you to everyone for your helpful advice....

Quote from: Freahk on November 27, 2020, 03:38:34 PM
As expected, apart from fan noise, I didn't notice any difference.
Subjectively, running the BB save offline on the nvidia GPU did not run more smoothly than running the same on the intel GPU.
Reported framerates have been roughly the same and running each of these for an hour at different times resulted in nearly the same ingame time (except from ~2 minutes)  after that meantioned real-world hour.

As expeced, dedicated vs integrated GPU doesn't matter pretty much in simutrans.

.... especially Freahk, you are a star!  :thumbsup: :thumbsup: :thumbsup: :star: :star: :star: There is nothing like the scientific method for answering a question like this! It definitely takes some of the anxiety away knowing that my plans are not totally daft.

Based on this experimental evidence and everyone's advice, I have just ordered an integrated graphics 3400G.

Quote from: freddyhayward on November 27, 2020, 08:15:13 AM
I use a laptop with a dedicated GPU but that is almost always disabled because of its refusal to cooperate with linux.

I face the inverse problem. The graphics side of Ryzen APUs is not officially supported on Linux and despite many bug reports (to amdgpu, kernel, mesa, Ubuntu and other distros) very few people get them to work reliably out of the box. But I have been collecting kernel hacks and PPA addresses for two years and I hope one of these workarounds will do the job. I think it's a risk worth taking and in the end I can always buy Windows.

Quote from: prissi on November 27, 2020, 02:00:22 PM
Since Simutrans mainly wants memory bandwidth, filling at least two slots of DRAM is preferable. .... So it depends on how many RAM channels you processor and mainboard uses.

I have ordered two sticks and the motherboard has slots for up to four. Although apparently Ryzen can only use four slots at much slower speeds, so hopefully the extra slots won't be needed for many years.

My build for anyone bored.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

Ters

Quote from: Matthew on November 28, 2020, 07:18:28 AMI face the inverse problem. The graphics side of Ryzen APUs is not officially supported on Linux and despite many bug reports (to amdgpu, kernel, mesa, Ubuntu and other distros) very few people get them to work reliably out of the box.
I had no problems getting mine to work, although I haven't been pushing it hard. There is some warning or error that appear in the logs, but I haven't noticed anything beyond that.

Matthew

Quote from: Ters on November 28, 2020, 08:41:54 AM
I had no problems getting mine to work, although I haven't been pushing it hard. There is some warning or error that appear in the logs, but I haven't noticed anything beyond that.

That's good to hear..... Though balanced by those bug reports. Do you watch YouTube on Chrome, Edge or Firefox-for-Windows? That seems to be the most common place the visual problems manifest for people. (IIRC Firefox for Linux didn't use hardware acceleration until recently, so was unaffected).
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

Mishasama

Simutrans-Extended?
A dedicated GPU is your best choice.
The RAM is DDR4, and the GRAM is DDR5 or even DDR6X. That's not at the same level.

But on the other side, Simutrans is not so heavy duty for the modern CPU or GPU, but need a huge RAM size for a big map.
So maybe you should focus on the RAM size, not the RAM speed.

And I had tried to play with both iGPU (HD 530) and GPU (GTX 770), on the response time the GPU is absolutely faster than the iGPU.

My spec is 6700K with 32G DDR4 2400, GTX 770 with 2G DDR5.
The iGPU was set to used 1G RAM as dedicated GRAM. And both shared 15.5G RAM for the graphics.
Because of some reason. I am looking for volunteers who can help me update the Pak64.Nightly.

I'm helping to build the Chinese community for now.
如果您是使用中文的玩家,歡迎到這裏尋找同好或張貼您們組織的聯係方式。
如果你是中文玩家,欢迎来这个帖子里找组织或者贴出你们的联系方式。

prissi

Simutrans does not use GPU at the moment at all, and it sends the display to the GPU each time a new frame is updated. Hence the internal GPU could be even faster, since that copy would be not needed (if the driver is that clever). THus iGPU can have as little RAM as possible to just display (may 200 MB?)

The only reason why GPU could be faster, is that the memory bandwidth is slightly lower due to the display update also needing a tiny bit of bandwidth (less than 5%). Bu that speedup is gained even with a dedicated graphics card, even without and 3D accelleration. So the memory speed of you GPU does not matter.

Ters

Quote from: Matthew on November 28, 2020, 01:24:11 PM
That's good to hear..... Though balanced by those bug reports. Do you watch YouTube on Chrome, Edge or Firefox-for-Windows? That seems to be the most common place the visual problems manifest for people. (IIRC Firefox for Linux didn't use hardware acceleration until recently, so was unaffected).
I hardly use it for YouTube. It is meant for watching videos on my TV, either ripped from my DVD and BluRay collection, or streaming services (primarily the national broadcaster). However, my new cable box now can now stream from these things itself. Apart from that, it is just a server, primarily a file server, but also for other tinkering.

I recently upgraded from a Turin CPU because Firefox had trouble streaming HD videos, and transcoding HD videos.

GeorgeWright

Quote from: freddyhayward on November 27, 2020, 08:15:13 AM
I use a laptop with a dedicated GPU but that is almost always disabled because of its refusal to cooperate with linux. On the rare occasions i've used it with simutrans, it never made any noticeable difference.
This is not a problem buddy because sometimes it happens. I also use laptop in the Gpu but in my case it has made a difference. It depends on how you use.

Mariculous

Well it might make a difference when the display is connected to the dedicated GPU.
In my setup, the internal display is connected to the iGPU, so the frame buffer needs to be copied back from the dedicated graphics to the iGPU.
According to intel_gpu_top, the memory bandwith used when running on the dedicated GPU was higher than the memory bandwith used when running on the iGPU directly. Lowest memory bandwith was reported when spawning simutrans to an xserver on a different machine over the network, causing a fair ~200 mbit/s of network traffic on my lan :P

Anyways, I'd not take these measurements too serious without more detailled research about that tool.
intel_gpu_top measures the intel GPU load as well as memory bandwith in use.
I did not dig deep enough to figure out the details, so might well be there's simply memory bandwith used elsewhere in the other cases.
I did not dig deep enough to figure out what exactly is measured there and what is not. Might well be the actual load to the memory chips is the same.

As noted before, in practice I did not experience any difference in my test setup (which did not include the remote xserver setup)