High CPU Usage
Forum rules
- Search for existing answers before creating a new topic
- Topic titles must be descriptive and searchable
- Duplicate questions will be redirected to the existing answer(s) and locked.
- Search for existing answers before creating a new topic
- Topic titles must be descriptive and searchable
- Duplicate questions will be redirected to the existing answer(s) and locked.
High CPU Usage
Is there any way to to reduce CPU usage of the game or am I crazy? The game should be pretty light but each client takes up a consistent 20%+ of CPU. If it wasn't consistent it would be fine, but it actually is generating an insane amount of heat in my room by going that hard nonstop. I've tried HD, SD, all settings turned down using the launcher on Windows 10. From what I can tell it is spreading the load among different CPU cores and not just maxing out one at 100%, so it isn't using unlimited CPU but it is an uncomfortably high amount. CPU is an i5-8600K. Is my experience not the norm?
- Ceikry
- Site Admin
- Posts: 587
- Joined: Wed Aug 10, 2022 11:48 pm
- Location: Draynor Village
- Has thanked: 82 times
- Been thanked: 105 times
Re: High CPU Usage
the client is modified to run on an *uncapped framerate. Authentic 2009 framerate was 50fps (not 60)
*uncapped meaning it runs equal to your monitor's refresh rate. 177hz = 177fps.
*uncapped meaning it runs equal to your monitor's refresh rate. 177hz = 177fps.
Nerds
Re: High CPU Usage
Based on that information I did some testing and made a bug report since I did not find any more resources about this already on the forums.
- trident101
- Noob
- Posts: 9
- Joined: Sat Jun 10, 2023 1:30 pm
- Been thanked: 4 times
Re: High CPU Usage
What you can do is use Rivatuner to cap your FPS to the amount you set it at. This'll reduce the CPU usage. Two things to note, the lower you set your FPS, the less smooth the game will look and feel, second thing is to turn off the "Show On-Screen Display". If you don't turn off the on screen display, the colours of the display will blend with the game, making it look horrible.
Re: High CPU Usage
Never heard of Rivatuner but I have it capped with NVIDIA Control Panel (to 60FPS on my 60hz, so per their own logic should be no change) and it causes a 4-5x less CPU usage on SD. But they said it isn't a bug so what do I know. People can search these threads and find that you can limit it yourself if your hardware doesn't play nice enough like mine.
- Ceikry
- Site Admin
- Posts: 587
- Joined: Wed Aug 10, 2022 11:48 pm
- Location: Draynor Village
- Has thanked: 82 times
- Been thanked: 105 times
Re: High CPU Usage
Your monitor isn't 60hz then, *or* java reports your monitor's refresh rate incorrectly. In both scenarios, we can do nothing about it. It isn't our own special snowflake code detecting your refresh rate, it's built in to the java standard library.JahIthBer wrote: ↑Sat Sep 23, 2023 3:07 pm Never heard of Rivatuner but I have it capped with NVIDIA Control Panel (to 60FPS on my 60hz, so per their own logic should be no change) and it causes a 4-5x less CPU usage on SD. But they said it isn't a bug so what do I know. People can search these threads and find that you can limit it yourself if your hardware doesn't play nice enough like mine.
Nerds
- Player Name
- Noob
- Posts: 16
- Joined: Mon Jul 17, 2023 11:12 pm
- Been thanked: 4 times
Re: High CPU Usage
I don't have any of these fancy tools to force an application to use a particular refresh rate, so I patched the client instead:
Surprisingly, I do observe an anecdotal difference in favor of the patched client on my system, but as there are also all sorts of other variables that differ between the two runs (forced java 11 in the live client vs java 20 when running my build, live having 2x UI scaling and my build running at 1x, etc etc) it's impossible to draw any conclusions from those anecdotes. However, it might be worth considering if this could be made run-time configurable, for those users who hold a belief that it would benefit them?
Code: Select all
diff --git a/client/src/main/java/rt4/GameShell.java b/client/src/main/java/rt4/GameShell.java
index e17b9fb..b78262f 100644
--- a/client/src/main/java/rt4/GameShell.java
+++ b/client/src/main/java/rt4/GameShell.java
@@ -701,11 +701,7 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene
}
private final void configureTargetFPS() {
- int refreshRate = getCurrentDevice().getDisplayMode().getRefreshRate();
- if (refreshRate == java.awt.DisplayMode.REFRESH_RATE_UNKNOWN) {
- refreshRate = 60; //just assume 60hz and call it a day.
- }
- GameShell.setFpsTarget(refreshRate);
+ GameShell.setFpsTarget(60);
}
@OriginalMember(owner = "client!rc", name = "windowOpened", descriptor = "(Ljava/awt/event/WindowEvent;)V")
- ryannathans
- Staff
- Posts: 501
- Joined: Thu Aug 11, 2022 12:25 am
- Location: ɐᴉlɐɹʇsn∀
- Has thanked: 40 times
- Been thanked: 96 times
Re: High CPU Usage
it would be cool if you exposed this properly and made it configurable from the launcher