Recommended Posts

KittenIsAGeek    728

Paused the game and saved about  a dozen times in a row. Did not see additional memory bloat.

Spoiler

image.thumb.png.6306c2510e4ea81fdfe1fd0613334361.png

However, when I quit to the main menu, memory was not freed.  Re-loading the game increased the footprint by another 400mb.  Without continuing game play, saved the game again.  Resulted in another bump in memory.  Strangely, even though NOTHING gameplay wise changed, the save immediately following the load was about 0.1mb smaller than the save immediately before.

I should also point out that exiting to the main menu at this point takes approximately 40 seconds, while loading the save takes about 35.  Anyway, I repeated the pattern 5 more times: Quit to main menu, resume, save, quit to main menu, etc.  Each save added to the memory footprint, as did each load.  The save file size remained unchanged.  At this point, my RAM was nearly full so I unpaused the game and let it run.  FPS was now averaging 31 to 32 for a significant drop of 5fps.

Spoiler

image.thumb.png.0c1b20142a3cc7420918c454266aeccb.png

 

So we've got a couple problems that I can see: There's a memory leak when quitting to the main menu and returning to the game.  There is also a memory leak associated with file saving.   There does NOT appear to be a connection to the reports, as disabling autosave but letting the reports build up did not affect game play.

  • Thanks 2

Share this post


Link to post
Share on other sites
Nitroturtle    303

This has been pointed out before, but there's a rather large difference in loading time between loading on a freshly launched game versus loading while already in the game.  Personally, I always close the application before loading, as it's significantly faster overall.

  • Like 1

Share this post


Link to post
Share on other sites
KittenIsAGeek    728
10 hours ago, miauly said:

For me game went laggy on cycle ~200, and I have most of the map and space undiscovered yet, and not that much of a developed base. Maybe the reason is that I like to ranch shine bugs just for nothing and they fly all around the base in numbers.

Alright, I loaded your save.  I'm running Linux Ubuntu Mate (18.04) on an Intel i5-4690S (low power) running at 3.2GHz.  I have 16gb RAM (currently, though I could have up to 64GB).   My graphics card is a GeForce GTX 750 Ti (also low power).  Its a desktop, but while running your save on turbo speed, my system was drawing an average of only 80 watts of power -- so I don't exactly have a performance system.  That said...

Your save is running between 40 and 55 fps.  It is fluctuating wildly.  When paused, FPS jumps to 60, which suggests that much of your FPS hit is the pathfinding algorithm.  Getting rid of about 20 shinebugs made the FPS stabilize around 47.

 

I'm currently putting together a system with embedded graphics, but it would have a higher-speed processor. 

Share this post


Link to post
Share on other sites
Rocksen    0
8 minutes ago, KittenIsAGeek said:

 

yep on qol mk3 loading any map and then going to main menu doesn't dump the memory, loading another map just increases memory. even just loading a map while in game doesn't dump the memory. wow! that's a pretty nasty memory leak.

Share this post


Link to post
Share on other sites
KittenIsAGeek    728
6 minutes ago, JohnFrancis said:

Oh can you test out my old map, it's a cycle 2000+ map and took an age to load and my fps was about 10-15. I'm curious if there is a difference in performance between  the different OS's and hardware.

Deadly Factory cycle 2112

It took about 2 minutes to load.  On turbo, I'm getting about 25 FPS.  Changing some of the pathfinding gave me another 2fps.  Dropping to normal speed put me at 33 to 35fps.  Saving took about 9 seconds and the first save added 1.4gb to the memory footprint with the first save.  Which is quite significant, since the total memory footprint for the map when freshly loaded is only 3.7gb.

  • Thanks 1

Share this post


Link to post
Share on other sites
beowulf2010    218
17 minutes ago, FiannaTiger said:

I do hope the dev's read this and see what KittenIsAGeek is saying!

They have in the past, which is exactly why Kitten wanted the save files. Memory leaks are completely different issues than keeping "too many" reports. 

Thanks for doing some real heavy lifting @KittenIsAGeek

Edited by beowulf2010
  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
KittenIsAGeek    728

@JohnFrancis

I ran your map on turbo for about an hour (20 cycles).  With autosaves disabled, there wasn't any difference in performance when I started and when I stopped.  The memory footprint also didn't significantly noticeably change.

Share this post


Link to post
Share on other sites
JohnFrancis    219
4 hours ago, KittenIsAGeek said:

It took about 2 minutes to load.  On turbo, I'm getting about 25 FPS.

My computer is a bit below average so that tracks. I wonder if it's my DDR3 memory that is the bottle neck.. Thanks for testing the map it nice to know that late game slow down is unavoidable. Also that huge loading time is a annoying, the price of playing late late game.

Share this post


Link to post
Share on other sites
KittenIsAGeek    728
10 minutes ago, JohnFrancis said:

My computer is a bit below average so that tracks. I wonder if it's my DDR3 memory that is the bottle neck.. Thanks for testing the map it nice to know that late game slow down is unavoidable. Also that huge loading time is a annoying, the price of playing late late game.

Memory DEFINITELY helps a lot.  I see a significant difference between 1600mhz DDR3 and 1200mhz.  There's also a huge difference if my game causes my memory to hit the swap file.  You have to remember, this is a huge number-crunching simulation.  There are multiple calculations run on every cell of the map, plus calculations for power, gas and liquid piping, etc.  This is far too much information to hold in the CPU, so it has to constantly swap data between the CPU  and RAM.  

  • Thanks 1

Share this post


Link to post
Share on other sites
M.C.    116
5 hours ago, KittenIsAGeek said:
  1. Reports do not directly affect game performance.  They do impact the save file size, but this is minimal per cycle -- though it does add up over time.  Still, it doesn't affect the FPS or the save time.
  2. Saving the game introduces a small memory leak that does affect game performance.  I saw a drop of 5 or so FPS over 60 cycles where nothing in the game changed other than providing for the dupes survival.  This same drop did not occur when autosaves were disabled.  Additionally, the memory footprint steadily increased with every save, resulting in a significant performance hit once the main memory was full.  Quitting to the desktop and restarting the game removed the 5 FPS performance hit.
  3. The game does not clear out its memory space when you quit to the main menu.  Resuming the game re-loads it from the save, creating a new memory space.  This means that after only a handful of quit/reload combinations, your memory will be full and you may have a harsh performance penalty or a system crash.
  4. Pathfinding significantly affects overall FPS. 

1. I should have probably been a bit more clear on this. I never thought reports affect FPS. They do, however, affect both save and load time, making the game appear more sluggish than it has to be.

2. The effects you are describing don't sound like a memory leak. They are more consistent with excessive garbage creation. It's nice to know the effect is limited, though.

3. I appreciate your looking into it, but I don't think your conclusions are entirely accurate.

4. I know, but... being forced to play the game in a certain way to maintain high FPS is very distracting. I don't want to worry about pathfinding algorithms or memory management or memory leaks or garbage collection when I am playing a game. I do have to agree with you here. Klei's (painfully naive) pathfinding implementation is hot garbage.

In any case, thank you for spending your personal time looking into this for me.

Share this post


Link to post
Share on other sites
RonEmpire    257

Yea- I really hope this game improves/fixes the game performance problem.
I can see this being the negative issue in the reviews when people post their reviews on the game.

Currently, the game just drops in performance with each passing cycle.  The auto-save time, lags over time the longer you play. And the save files bloat and increase incrementally per cycle.   The load time for save files becomes a massive pain.  Trying to save scum care package (or Neutrel Vasculator) and you will know what I mean,   it can take 3-5 minutes to just load the game.  And that's before it even starts processing the data it loads, because  it starts paused and it doesn't show you all the inventory items or what not, so its basically just loading the data before even doing calculations.     Could be because its uncompressing the large save file before reading the data.

And then there is the performance (drop in frames per second) while playing.   Gets worst as you uncover the map.   I did notice what others have described here.   If you dig out stuff and reveal/uncover stuff, the game lags more!      

It's kind of a running  joke now  that the endgame = game over when your computer blows up where you can't do anything anymore because of the performance of the game.      it probably needs some sort of real end game before the game just dies on you.

Share this post


Link to post
Share on other sites
0xFADE    317

Fascinating stuff.  The leaks on saves are pretty terrible. I’ll have to change how I load. I was loading to the main menu or just reloading(about 5-10 minutes)

  • Like 1

Share this post


Link to post
Share on other sites
RonEmpire    257

I kind of given up playing ONI  or having less desire to continue playing past  100-200 cycles knowing the game is going to start lagging.

There really isn't a whole lot of challenge to the game   once you can just sustain yourself with oxygen and food.
After that you could just clear the entire map with an exosuit.     Going to space is just optional.   
The game is basically over once you get pass the initial   Oxygen and Food problem.   Anything after that is just  going to add to your lag problem. with no real final end game goal.

I suppose the only other challenge is getting Steel production to stop the asteroid from getting wiped out by the meteors destroying your biome/base.
Once you have enough to just fill a row of bunker tiles across the top of the map- that's pretty much it.

They need to add in a reach the final planet as a goal-  and to do that requires obtaining materials from other planets that can't be found on the existing asteroid you're on.    Then it's basically just  Get to the final planet before the LAG MONSTER gets you. 

Edited by RonEmpire
  • Like 1

Share this post


Link to post
Share on other sites
KittenIsAGeek    728

I don't really feel the need for an end goal.  I'm constantly changing things within my base, trying different ways of doing things.  "Oh, I don't like how that looks.  What if I rebuilt it like so?"  Or, "Can I make this boiler more efficient?"  Or, "is liquid hydrogen a viable coolant for smelting?"  Turns out, weird things happen when you pipe it into the smelter...

Anyway, you get the idea.  In my mind, there's no end point other than the goals I set for myself as I play.

Share this post


Link to post
Share on other sites
RonEmpire    257
9 hours ago, KittenIsAGeek said:

I don't really feel the need for an end goal.  I'm constantly changing things within my base, trying different ways of doing things.  "Oh, I don't like how that looks.  What if I rebuilt it like so?"  Or, "Can I make this boiler more efficient?"  Or, "is liquid hydrogen a viable coolant for smelting?"  Turns out, weird things happen when you pipe it into the smelter...

Anyway, you get the idea.  In my mind, there's no end point other than the goals I set for myself as I play.

That's fine and all.   And that can just be 'sandbox mode'.   Or it can just be a optional continue sandbox if you want.   

It's like how Anno 1800 works.  They have a campaign, that ends.  And after the campaign, it just goes into sandbox.

Even in Thea Awakening, after you won the game,  you can choose to continue the game via sandbox if you just want to keep playing.

The general idea, is for those who need an end goal.   Like in Don't Starve, while it's sandbox,  there's the Adventure mode that is somewhat like the end game.   If there's no end game, its just basically, when the game starts to lag and you don't feel like dealing with it anymore.   The End.   (which is kind of anticlimactic/lackluster imo.)

Edited by RonEmpire

Share this post


Link to post
Share on other sites
miauly    10

As I enabled my FPS counter on laptop to find out I even start the game on 14 FPS, I got really sad about playing further as I now started to notice all the lag. So I thought I can add yet another data point to this thread to attract more attention to the issue.

I have tested my save and other two here on the following setup - CPU AMD Rizen (16 cores, 3.4GHz), 32 Gb RAM, RTX 2080 Ti (screen resolution is 2560*1440 if that matters for performance). To start off, this one is able to run Sekiro and Dark Souls III on 60 FPS (which is the locked max value), with all settings maxed out. Dota II AutoChess runs on 120 FPS which is also locked max.

For ONI the results are as follows:

  • 30 FPS flickering - my own save with shine bugs
  • 30 FPS dropping to 20 if I scroll the map - Darkest Citadel
  • 16-17 dropping to 15 if I scroll the map (and more than 2 minutes to load the map) - Deadly Factory

This setup is actually not geared towards gaming but for running some computations on it, but it is still way more than ONI system requirements are. Still, ONI demands more than graphics-heavy recent games.

I should also note that on 50 FPS (which are there when I start a new game) ONI feels like a totally different game. Everything seems to happen so quickly even if I know that in fact it should be the same speed. Way better experience as it feels for me.

Share this post


Link to post
Share on other sites
OxCD    43

Is it me or it's going worse since mk3 ? Same laptop, same save, very tiny differences as I'm now progressing wisely at cycle 1500, but the lag seems to be even bigger... :-/

Share this post


Link to post
Share on other sites
KittenIsAGeek    728
1 hour ago, miauly said:

As I enabled my FPS counter on laptop to find out I even start the game on 14 FPS, I got really sad about playing further as I now started to notice all the lag. So I thought I can add yet another data point to this thread to attract more attention to the issue.

I have tested my save and other two here on the following setup - CPU AMD Rizen (16 cores, 3.4GHz), 32 Gb RAM, RTX 2080 Ti (screen resolution is 2560*1440 if that matters for performance). To start off, this one is able to run Sekiro and Dark Souls III on 60 FPS (which is the locked max value), with all settings maxed out. Dota II AutoChess runs on 120 FPS which is also locked max.

For ONI the results are as follows:

  • 30 FPS flickering - my own save with shine bugs
  • 30 FPS dropping to 20 if I scroll the map - Darkest Citadel
  • 16-17 dropping to 15 if I scroll the map (and more than 2 minutes to load the map) - Deadly Factory

This setup is actually not geared towards gaming but for running some computations on it, but it is still way more than ONI system requirements are. Still, ONI demands more than graphics-heavy recent games.

I should also note that on 50 FPS (which are there when I start a new game) ONI feels like a totally different game. Everything seems to happen so quickly even if I know that in fact it should be the same speed. Way better experience as it feels for me.

My system, by comparison, should be faring a lot worse.  Its a 4-core i5 at 3.2ghz with (currently) only 16gb RAM.  Yet maps with 2000 cycles are still in the 30fps range.

The discrepancy you're seeing between ONI and graphics-heavy games is that most games are bottlenecked by your GPU.  Rendering 3d textures is fairly computationally intensive, but your graphics hardware is designed to handle it and in this era it is all multi-threaded.  ONI, on the other hand, has almost zero GPU overhead.  The vast majority of the game is spent in single-thread CPU calculations.  The Rizen is built around multi-threading, and excels when you've got multiple things going at once, which is an advantage with modern operating systems.  However, when it comes to pure number crunching on a single thread, the Rizen doesn't fare quite so well -- it wasn't designed for that.

Share this post


Link to post
Share on other sites
GrindThisGame    249

My experience with a 2000, 3000 and 5000 cycle base is that the save file increases linearly and the auto-save time gets slower. I've read in some posts that it is likely the compression of the save file itself. I'm not sure how much the reports are part of the save file inflation though. I begged the devs for a config option for auto-save frequency with never being an option. I've attached a 40Mb save file if anyone is curious.

I did notice that debug mopping the magma at the bottom gave me about 10-15 fps boost. Most of this magma was trapped by nutronium.

r166.sav

Share this post


Link to post
Share on other sites
miauly    10

@KittenIsAGeek , I can understand what may be reasons why this setup does not make ONI fly. And you are right, Rizen is there exactly to run multi-threaded computations. I tested this setup not because I was thinking it would go way better than yours. There's no reason for it if everything is single-threaded and I have no reason not to believe you that it is single-threaded. What I thought is that there's still a difference in how arguments are perceived, even valid ones, and how a tested fact is perceived. So I wanted to present here a data point that shows that even pretty heavy gear can't keep ONI up to speed.

Being a programmer, I can understand that it's not as simple as it sounds to utilize more than one core when they are available. But then if the game stays single-threaded, what is the expected hardware to run it? CPUs single core clock rates don't get that much higher. Not to mention that nowadays laptops are really popular even for gaming, and their clock rates are lowered for better battery life.

Share this post


Link to post
Share on other sites
KittenIsAGeek    728

Right.   I do believe that with most of the core game done, focus will be spent on refining the various algorithms to reduce system impact.  We've already seen the pathfinding task become multi-threaded, so I'm sure Klei will do the same with other tasks.

I apologize for misunderstanding your post.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now