Persistent low framerate and stutters

The worst monsters in the Hearthlands warp the fabric of space and time...

Persistent low framerate and stutters

Postby magnet » Sun Dec 12, 2021 5:49 am

Has anyone been able to get consistently smooth framerates on an AMD card? Because from what I've read (and experienced) it seems like Haven does not play nice with AMD compared to nVidia. Seems to be related to OpenGL support or something.

My setup is not high-end by any metric but I'm usually able to get 100+ frames in other games without too much fiddling. In Haven (both default client and Ender's) I'm ranging between 30 to 50 fps depending on which Frame sync mode I choose. One-frame overlap gets me around 50, sometimes 60 in the woods but has horrible stutters dipping all the way down to 15 at times. CPU sequential has been the best compromise so far averaging ~30 fps with far less noticeable stutters.

Here's my specs:

GPU: Radeon RX 580
CPU: Intel Core i5-4670K @ 3.40 GHz
RAM: 24 GB
OS: 64 bit Windows 7

I have already tried updating to AMDs latest drivers and gained no noticeable increase in performance from doing so
I have already verified that my java install is up to date and correct (64 bit)
Setting javaw.exe to a higher priority in Task manager makes no noticeable difference either
User avatar
magnet
 
Posts: 64
Joined: Sat Jun 12, 2021 2:35 am

Re: Persistent low framerate and stutters

Postby MagicManICT » Sun Dec 12, 2021 7:06 am

Just to note: some of the GTX and RTX cards are having a significant issue with crashes.

As far as improving performance, you didn't mention what version of Java you're running. You also haven't mentioned where your system is bottlenecking at--CPU, GPU, RAM, etc. There's a good chance upgrading to a newer version of Java could help. I believe Java 15 is recommended currently if you wish to use something other than the Oracle released Java 8 (from java.com). There have been some updates to some of the internals in Java that help improve overall performance. I may be out of date on any updates, though, and if they work with Haven and the graphics API Haven is using--JOGL. I am also unsure if any of the newer versions will work with Win 7.
Opinions expressed in this statement are the authors alone and in no way reflect on the game development values of the actual developers.
User avatar
MagicManICT
 
Posts: 18435
Joined: Tue Aug 17, 2010 1:47 am

Re: Persistent low framerate and stutters

Postby magnet » Sun Dec 12, 2021 9:21 am

Oh right, shoulda thought of those. Theres a slight CPU bottleneck, so I get thats probably contributing to the issue. Don't think thats the main culprit though.

Going to Java 15 definitely made a difference. Instead of sitting at ~30 fps its closer to 45 fps now. I can push 70 if I switch to One-frame overlap but there's still some ugly stutters that always drop like 10, 20, sometimes 30 frames.

Also tried Java 17 but that made Ender's crash. Default client would run but the performance increase wasnt anything stunning so I went back to 15.
User avatar
magnet
 
Posts: 64
Joined: Sat Jun 12, 2021 2:35 am

Re: Persistent low framerate and stutters

Postby telum12 » Sun Dec 12, 2021 9:23 am

Like magicman said, you're going to have to identify the actual source of your bottleneck. As far as I'm aware, no one with AMD cards has any particular issues with Haven. Only nvidia cards have issues due to a known (but not fully identified) OpenGL bug in the in Haven that causes a native crash in the nvidia drivers, but not amd drivers. This also largely occurs during large-scale PVP so I doubt it's related.

If it's OpenGL related, try updating your graphics drivers.

Try changing the Java version like magicman suggests.

Make sure you're giving Java enough heapspace. If you run it on low RAM it can get into some nasty garbage-collection cycles. The graphics part of the Haven client is the most RAM-intensive part of it. 2-4 GB should be enough (e.g. -Xms2G -Xmx4G). Ender client probably does this by default in the .bat/.sh files.

Try to identify why one-frame overlap stutters. Are you doing something specific? Does your CPU/GPU spike during those stutters? You can use a tool like VisualVM to monitor the Java process while you're playing to see if gc spikes or some such, e.g.:

Image
MagicManICT wrote:To me, being called a pedo is exactly like being called gay.

Jalpha wrote:She must have been in heat bro. She was literally fanging for it. Literally posting repeatedly in chat, in all caps "DO IT! POST YOUR DICK! THERE'S NO WAY IT'S 7 INCHES!"

How could any hot-blooded male deny such a request under the circumstances.
User avatar
telum12
 
Posts: 430
Joined: Mon Mar 12, 2012 10:36 pm

Re: Persistent low framerate and stutters

Postby shubla » Sun Dec 12, 2021 2:47 pm

Java 15 is newest that works, libraries that hnh uses don't work with the newer ones. You should indeed use java 15 as the GC is main source of stutters and even low fps. You can try different GC's with java 15, I think G1 is still the default. I've had success with ZGC, but it caused some very very odd random freezing with only way to fix either restart or force GC's repeatedly. Could be fixed in some new java version though? Its very odd issue in the first place, got reports of other people getting it as well and switching back to G1 fixed it.

Also, maybe update windows to newer version. I don't think windows 7 is supported any longer.
Image
I'm not sure that I have a strong argument against sketch colors - Jorb, November 2019
http://i.imgur.com/CRrirds.png?1
Join the moderated unofficial discord for the game! https://discord.gg/2TAbGj2
Purus Pasta, The Best Client
User avatar
shubla
 
Posts: 13041
Joined: Sun Nov 03, 2013 11:26 am
Location: Finland

Re: Persistent low framerate and stutters

Postby magnet » Sun Dec 12, 2021 9:21 pm

Okay so not 100% clear on how to interpret these charts but it seems like my CPU actually is the source of my issues. Usage is kinda all over the place hanging between 30-50% and spiking when going in and out of buildings. GC didn't seem out of line from what you posted except for one instance that I highlighted. Java 15 seemed to clear up most of the awful frame stutters I was experiencing since I only saw it drop frames a few times and it was more like a loss of 5 instead of 20-30.

Thanks for all the quick help guys

Image
User avatar
magnet
 
Posts: 64
Joined: Sat Jun 12, 2021 2:35 am

Re: Persistent low framerate and stutters

Postby MagicManICT » Sun Dec 12, 2021 10:32 pm

shubla wrote:Java 15 is newest that works, libraries that hnh uses don't work with the newer ones. You should indeed use java 15 as the GC is main source of stutters and even low fps. You can try different GC's with java 15, I think G1 is still the default. I've had success with ZGC, but it caused some very very odd random freezing with only way to fix either restart or force GC's repeatedly. Could be fixed in some new java version though? Its very odd issue in the first place, got reports of other people getting it as well and switching back to G1 fixed it.

Thanks for this. I am terrible about keeping track of this information. I need to remember to stick it somewhere useful.

Also, maybe update windows to newer version. I don't think windows 7 is supported any longer.

Given the processor, I'd suggest just upgrading to 11, but last I looked, there are still some issues with the ATI graphics compatibilities. Otherwise, the big risk is a lack of security updates for Win7, which are being done as a subscription service now (primarily for licensed accounts that can't easily upgrade OS and a ton of specialized software all at once).

I'd still recommend updating to 10 if the free update for Win 7 license holders is still applicable for the increased security.
Opinions expressed in this statement are the authors alone and in no way reflect on the game development values of the actual developers.
User avatar
MagicManICT
 
Posts: 18435
Joined: Tue Aug 17, 2010 1:47 am

Re: Persistent low framerate and stutters

Postby shubla » Sun Dec 12, 2021 10:51 pm

magnet wrote:GC didn't seem out of line from what you posted except for one instance that I highlighted.

GC usage % doesn't really tell you much of anything useful here. What you care about are the interrupts where the whole application has to be temporarily paused for some parts of the gc processing. If these take more than 16ms (on 60fps) you will drop frames, audio will also get choppy depending on your audiobuf length. Default maximum pause duration target on G1 is 200ms, which will feel absolutely terrible when playing a game such as hnh, but there isn't that much that you can do about it. G1 is not designed to be used in games where pause times exceeding even a few milliseconds decrease the user experience. And then when you take into account that loftar has likely not really optimized how the game uses memory in relation to the gc...
Image
I'm not sure that I have a strong argument against sketch colors - Jorb, November 2019
http://i.imgur.com/CRrirds.png?1
Join the moderated unofficial discord for the game! https://discord.gg/2TAbGj2
Purus Pasta, The Best Client
User avatar
shubla
 
Posts: 13041
Joined: Sun Nov 03, 2013 11:26 am
Location: Finland


Return to Bugs

Who is online

Users browsing this forum: Claude [Bot] and 59 guests