BadOptimizations

BadOptimizations

18M Downloads

Low performance on Linux systems

Closed this issue ยท 59 comments

commented

When using this mod with Intel UHD Graphics I lose ~15-25 FPS on average and incredibly low minimums, causing it to be very unstable. I gained these results by flying to Decked Out 2 building in the Hermitcraft Season 9 world in two separate worlds.

Altered settings - 10 sim. distance, 16 render distance, 8 max shadow distance, fast mode, show fps, and 96 FOV

Mods used - Fabric API, BadOptimizations, Iris, Sodium, Sodium Extra, and Reese's Sodium Options

commented

confusing, since this mod doesn't do ANYTHING with gpus. it's 100% cpu optimizations

commented

Maybe it has something to do with older CPUs then? I'm using a Intel Core i5-10210U CPU.

commented

im about to release 1.6.3 so try that when its out

commented

I did some testing with version 1.6.3 and there is still a performance drop using this mod, all be it, not as significant as before. Do you think this may be due to me using Fedora Linux and not Windows?

commented

Maybe, I only have a Windows PC with an RTX 3060 so that's all I test the mod with.

commented

I did even more testing and on a newly created single player world, in both Linux and Windows, I gain performance. While on both OS's, testing on the Hermitcraft season 9 world, they lose performance. On Windows there is a noticeable performance increase on the single player world and a negligible performance loss on the Hermitcraft world. Linux is a different story, while there is a performance increase on a single player world, it's by ~5 FPS max and a 10 FPS difference on average. On the Hermitcraft world, as stated before, I lose ~15-25 FPS.

*Windows tests were done with an Intel core i5-8265U

commented

Does the world where you lose performance have a lot of diverse biomes? Are you flying around the biome borders?

commented

Does the world where you lose performance have a lot of diverse biomes? Are you flying around the biome borders?

Yes to both, the flight path and biomes are marked using Chunkbase:
Screenshot from 2024-01-15 20-44-00

The world download for the Hermitcraft season 9 is here if you want to look it yourself.

commented

Try 1.6.2, before I changed sky color caching a bit.
If that doesn't work try 1.5.0, before I added any sky/cloud color optimizations.

commented

1.6.2 gives me the same issue, while 1.5.0 has differences within the margin of error, ~1-3 FPS of difference on average.

commented

Ok-maybe it's the lightmap stuff? Try 1.4.0

commented

There are no performance differences with version 1.4.0

commented

Update the latest version, and, with and without the mod, use F3 + L to start profiling for 10 seconds and in those 10 seconds, do whatever made you lose performance. Then upload both profiling results here (also please label them).

commented

As the two main cases are flying away from world spawn and around the Decked Out 2 building, I'll leave both scenarios below:

flying around Decked Out 2 with mod.zip
flying around Decked Out 2 without mod.zip
flying from world spawn with mod.zip
flying from world spawn without mod.zip

commented

(how many sheep are in this world...)

commented

None to my knowledge

commented

None to my knowledge

image

commented

Sheesh, that's a lot of sheep. I'll look to see where they are soon.

commented

If you're going to have this many entities I'd recommend using EntityCulling.

commented

I know, I decided to only use necessary mods to eliminate as much possible incompatibilities as possible with this mod, for testing purposes.

commented

Maybe removing the entities will change your results?

commented

When removing all entities in the area, I get 86 FPS max with this mod and 106 FPS max without this mod.

commented

Alright, can I have profiling logs for when you don't have entities, just to minimize errors?

commented

I think this might have something to do with the way BadOptimizations breaks Sodium's GPU wait-sync thing.

Does this jar still have the issue?

commented

I am running into no performance cost on my system while testing. I do have mob culling mods paired alongside.

Fedora Linux w/ Ryzen 5 3600 & RX 6700XT

commented

So...did I fix it or did I misread your message?

commented

So...did I fix it or did I misread your message?

I had negligible results with both jars. Issue is seemingly not there for me

commented

I'll go bare bones and do some more testing tonight with entities.

commented

I think this might have something to do with the way BadOptimizations breaks Sodium's GPU wait-sync thing.

Does this jar still have the issue?

With the new .jar file, there are negligible differences with and without this mod

commented

Are the results also negligible on Windows, with the old and new jars?

commented

On Windows, the difference between the old and new jars are also negligible

commented

sort of late to say this but try the latest version on modrinth

commented

Did a new version come after my comment? I used the latest version that was on Modrinth when I tested it yesterday.

commented

Oh, you already had the latest version.

commented

This mod IS mostly made up of micro optimizations, but I guess you could try entities?

commented

What do you mean?

commented

Try spawning in a ton of entities and compare performance.

commented

When I spawn a significant amount of entities, I get slightly higher fps but lower TPS with the version you gave me compared to the newest Modrinth version.

commented

If I'm not mistaken TPS and FPS are linked in singleplayer worlds

commented

Oh nvm, singleplayer servers run on a different thread
However you are getting better fps, so, fixed?

commented

I wouldn't say fixed as the TPS is significantly lower and makes the world feel laggy, even though inputs are responsive

commented

Try the latest version

commented

Closing as no further information was provided

commented

@ItsThosea, so sorry for the late response, I just tested it with the latest version and the problem persists even though it is better then when I first tested this mod on Linux. I'd like to note, in case this is useful in the future, I switched to Arch Linux using KDE 6 and 6.8.4 Zen Kernel with some system modifications like increasing the vm.max_map_count to 2147483642 (the default on SteamOS).

commented

I mean the mod doesn't do that much so it could he within the margin of error. Try disabling the fps string optimization in the config file.
By the way, do you have any mods that affect lighting or the sky color?

commented

I mean the mod doesn't do that much so it could he within the margin of error. Try disabling the fps string optimization in the config file.

How would I go about doing this?

By the way, do you have any mods that affect lighting or the sky color?

The only mods I have installed, besides BadOptimizations, are Fabric API, BadOptimizations, Iris, Sodium, Sodium Extra, and Reese's Sodium Options.

commented

How would I go about doing this?

Go into <minecraft dir>/config/badoptimizations.txt and set the optimization to false. If you have the time you can also try disabling all of them to find the problem.

commented

Go into /config/badoptimizations.txt and set the optimization to false. If you have the time you can also try disabling all of them to find the problem.

There is no change, from default settings, when moving around in loaded chunks, however when loading new chunks the TPS tends to stagger, making a lagy mess when exploring.

commented

Which optimizations did you disable last?

commented

I just disabled the fps string optimization for this test

commented

Ok...try sky color & lightmap.

commented

Disable all three at once? Or one at a time?

commented

Both?

commented

Oop-didn't get a notification from the reaction. Try disabling each individual optimization until your TPS returns to normal.

commented

I updated to the latest kernel (6.8.7 zen) and it seems to have fixed this issue. I did see that enabling enable_fps_string_optimization would increase the TPS average, but isn't noticeable (as it doesn't increase it above what it was before this mod) and only brings down the other optimizations a bit.

commented

This IS a mod made up of microoptimizations, I suppose.

So, issue fixed?

commented

My original issue has been fixed, thank you for your time!

commented

And all it took was 3 months.