Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multithreading causes huge performance degrade on i9 #10705

Closed
IntelOrca opened this issue Feb 15, 2020 · 7 comments
Closed

Multithreading causes huge performance degrade on i9 #10705

IntelOrca opened this issue Feb 15, 2020 · 7 comments
Labels
bug Something went wrong.

Comments

@IntelOrca
Copy link
Contributor

IntelOrca commented Feb 15, 2020

Processor: i9-7980XE (18c/36t)

With one window open containing a viewport, and an average FPS of 200 on OpenGL. When enabling multithreading, FPS drops to 25.

This only happens unless there is more than one viewport open including the main viewport.

@IntelOrca IntelOrca added the bug Something went wrong. label Feb 15, 2020
@James103
Copy link
Contributor

a) What version of OpenRCT2 are you using and what OS are you using to test this on?
b) Does this bug occur with other high-end processors (such as i9-9900k)?

@ZehMatt
Copy link
Member

ZehMatt commented Feb 15, 2020

Thats interesting, can you perhaps profile which functions affect this?

@IntelOrca
Copy link
Contributor Author

It isn't my PC so I don't access to it that often. This is using latest develop (a0fb955).
I don't have access to any other high-end processors to confirm.

@ZehMatt
Copy link
Member

ZehMatt commented Feb 16, 2020

My only assumption so far is that the high amount of threads kills the performance, its currently spawning as many threads as cores. Maybe we should limit it to a maximum of like 4 or 8

@IntelOrca
Copy link
Contributor Author

Probably better to base it on the size of the game window.

@James103
Copy link
Contributor

James103 commented Feb 16, 2020

If @ZehMatt's assumption holds, would that mean that observed performance is proportional to single-core performance, but inversely proportional to number of cores (or simultaneous threads) in the processor, assuming multithreading is enabled? That would mean that an Intel Core i9-9900k might reach ~250 FPS with OpenGL, but would drop to as low as 50-60 FPS with multithreading enabled, but a 64-core/thread processor (such as the Threadripper 3990X), would run OpenRCT2's OpenGL renderer slower with multithreading compared to an Intel Core 2 Duo without multithreading.

@ZehMatt
Copy link
Member

ZehMatt commented Feb 16, 2020

Probably better to base it on the size of the game window.

On 1920x1080 its 60 jobs, that would mean it entirely exhausts all cores. I'm not sure whats really going on without getting a hand on that configuration.

ZehMatt added a commit that referenced this issue Feb 16, 2020
Fix #10705: Apply multithreaded rendering to all viewports
janisozaur added a commit that referenced this issue Mar 24, 2020
- Feature: [#3154] Use a random title sequence each time it is shown.
- Feature: [#6553] Android version now runs in full screen.
- Feature: [#7865] Transport rides can now be synchronised.
- Feature: [#9073] Shortcut keys for the Tile Inspector.
- Feature: [#10305] Add two shortcuts for increasing and decreasing the scaling factor.
- Feature: [#10189] Make Track Designs work in multiplayer.
- Feature: [#10357] Added window for scenery scatter tool, allowing for area and density selection.
- Feature: [#10637] Console command to remove all floating objects.
- Change: [#1164] Use available translations for shortcut key bindings.
- Change: [#10997] Speed is automatically reset to normal upon scenario completion.
- Fix: [#2485] Hide Vertical Faces not applied to the edges of water.
- Fix: [#5249] No collision detection when building ride entrance at heights > 85.5m.
- Fix: [#6766] Changelog window doesn't open on some platforms.
- Fix: [#7784] Vehicle tab takes 1st car colour instead of tab_vehicle's colour.
- Fix: [#7854] Cannot build a custom spiral roller coaster design.
- Fix: [#7854] Empty entries in spiral roller coaster designs list.
- Fix: [#8151] Game freezes upon demolishing mazes at odd heights.
- Fix: [#8875] RCT1 competition scenarios are classified incorrectly.
- Fix: [#10176] Mistake in the sprite for the land tool's 6x6 grid.
- Fix: [#10196] Doors unable to be placed at end of track corners.
- Fix: [#10228] Can't import RCT1 Deluxe from Steam.
- Fix: [#10313] Path furniture can be placed on level crossings.
- Fix: [#10325] Crash when banners have no text.
- Fix: [#10376] No ratings generated when a shop and track intersect.
- Fix: [#10420] Money effect causing false positive desync.
- Fix: [#10477] Large Scenery cannot be placed higher using SHIFT.
- Fix: [#10489] Hosts last player action not being synchronized.
- Fix: [#10543] Secondary shop item prices are not imported correctly from RCT1 saves.
- Fix: [#10547] RCT1 parks have too many rides available.
- Fix: [#10587] Update last action coordinates on correct player.
- Fix: [#10631] Game bugs out and crashes if you get too many stations via copying stations with the tile inspector.
- Fix: [#10662] Duck cheat tooltips look odd and do not explain anything.
- Fix: [#10694] The lift hill speed of the flying roller coaster cannot be changed (original bug).
- Fix: [#10705] Apply multithreaded rendering to all viewports.
- Fix: [#10739] Mountain tool overlay for even-numbered selections.
- Fix: [#10752] Mute button state not correctly set at startup.
- Fix: [#10822] Can place too many peep spawns.
- Fix: [#10898] Banner text has an offset in tile inspector window.
- Fix: [#10904] RCT1/LL-scenarios with red water won't open.
- Fix: [#10941] The Clear Scenery tool gives refunds for ghost elements.
- Fix: [#10963] Light effects are drawn off-centre in some rotations.
- Fix: [#10993] Bottom toolbar not refreshing when a guest leaves the park.
- Fix: [#11001] Rides list does not use natural sorting.
- Fix: [objects#54] Stage Coach cars are not considered covered by the game.
- Fix: [objects#56] Handymen cut grass incorrectly.
- Improved: [#682] The staff patrol area is now drawn on the water, instead of on the surface under water.
- Improved: [#10858] Added horizontal grid lines to finance charts.
- Improved: [#10884] Added y-axes and labels to park window charts.
- Improved: [#10970] Introduced optional light effects for vehicles at night.
- Removed: [#6898] LOADMM and LOADRCT1 title sequence commands (use LOADSC instead).
XplosiveLugnut pushed a commit to XplosiveLugnut/OpenRCT2 that referenced this issue Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something went wrong.
Projects
None yet
Development

No branches or pull requests

3 participants