Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: 1 ... 4 5 [6] 7 8 ... 30

Author Topic: [Important!] Modded System Requirements  (Read 513218 times)

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: Can't Load Saves? Use 64-bit Java! (Instructions Inside)
« Reply #75 on: February 11, 2015, 05:16:15 PM »

Actual memory as seen by the JDK profiling tools is not the same as the memory you get in the task manager.
Logged

Agalyon

  • Commander
  • ***
  • Posts: 248
    • View Profile
Re: Can't Load Saves? Use 64-bit Java! (Instructions Inside)
« Reply #76 on: February 12, 2015, 01:40:31 AM »

It almost certainly is necessary for users who have lots of mods active, just not to the same extent as before.  Some users were reporting over 6 GB required for their worst-case mod suites, so assuming the efficiency is doubled, that's still 3 GB they need.
Recently I had to kick mine up to 8 gigs, running most every mod updated currently. I also think there seems to be some kind of problem with repeated loading of a save, as me and my friend both have been experiencing problems in the same manner. When loading a save multiple times, it seems to take longer and longer to load, until it eventually stops altogether. Just to prove this isn't a memory issue, when I kicked it up to 8, I previously had it on 6, and it did not help. Still couldn't load my save. What actually did fix it, was a loaded a lvl 1 save in which nothing had really happened, (bran new, no progress, etc) closed it, and reloaded my original, larger save, and it worked this time. I'm not sure if its relevant, but my friend has been experiencing slowdowns on his entire computer even after closing starsector, once again, with almost every mod. Any help is appreciated.

Try increasing page file size and/or multiple page files on different volumes/harddisks. They seem to work better in this case than just one page file (idk why). It did help me.
Also it helps to use  "-XX:-UseGCOverheadLimit" option in vmparams/bat-file
Also, what does this all do exactly, and how do I do it?
« Last Edit: February 12, 2015, 01:57:54 AM by HeartofDiscord »
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: Can't Load Saves? Use 64-bit Java! (Instructions Inside)
« Reply #77 on: February 12, 2015, 04:45:01 AM »

For reference, back in v0.65.1 I hit an actual OOM CTD when playing with Mayorate + Templars + some utility mods with ~1.4 GB allocated.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Can't Load Saves? Use 64-bit Java! (Instructions Inside)
« Reply #78 on: February 12, 2015, 10:43:49 AM »

Recently I had to kick mine up to 8 gigs, running most every mod updated currently. I also think there seems to be some kind of problem with repeated loading of a save, as me and my friend both have been experiencing problems in the same manner. When loading a save multiple times, it seems to take longer and longer to load, until it eventually stops altogether. Just to prove this isn't a memory issue, when I kicked it up to 8, I previously had it on 6, and it did not help. Still couldn't load my save. What actually did fix it, was a loaded a lvl 1 save in which nothing had really happened, (bran new, no progress, etc) closed it, and reloaded my original, larger save, and it worked this time.

There was a bug a few releases ago that caused similar behavior, basically a memory leak that caused some data not to be released on reloading a save. However, that's fixed, but it's quite possible for the same sort of issue to come up in a mod unless certain things are coded carefully. As far as I can tell, this really is fixed in vanilla, so my guess would be that it is an issue with one of the mods.

I'm not sure if its relevant, but my friend has been experiencing slowdowns on his entire computer even after closing starsector, once again, with almost every mod. Any help is appreciated.

That's got to be system-related - if everything is working properly, the game shouldn't be able to do that, period. About the only thing that comes to mind is maybe they're running Starsector with so much memory allocated that the system pages out everything else currently in memory to swap space on the HDD, and has to page it back in after the game is closed?
Logged

Agalyon

  • Commander
  • ***
  • Posts: 248
    • View Profile
Re: Can't Load Saves? Use 64-bit Java! (Instructions Inside)
« Reply #79 on: February 12, 2015, 12:25:46 PM »

...
Very interesting. I wish there was an easy way to tell which one is doing it. At this point, I think I may just have to axe one or two of them, and hope it keeps things afloat until they all update to the new patch. I've read most of the posts (most of your posts) and the issue (save/load memory) seems to be summarily taken care of, and I hope so. Really sucks knowing the longer the game goes on the more issues I'm going to have with it. Its really interesting to see all the factions going about whatever they do, and the markets developing. Knowing Java and the nature of this, I'm not sure anything past 6 or 8 gigs will really do much. I could try dumping more memory into it, but I might have to just wait it out. Anyway, thanks for the post.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Can't Load Saves? Use 64-bit Java! (Instructions Inside)
« Reply #80 on: February 12, 2015, 12:30:52 PM »

Unless I'm missing something, you should be able to run whatever mods you're running now with 0.65.2a. Assuming they worked with 0.65.1a, this latest release shouldn't break anything, as far as I know. It should even be save-compatible.
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: Can't Load Saves? Use 64-bit Java! (Instructions Inside)
« Reply #81 on: February 12, 2015, 01:31:44 PM »

There was a bug a few releases ago that caused similar behavior, basically a memory leak that caused some data not to be released on reloading a save. However, that's fixed, but it's quite possible for the same sort of issue to come up in a mod unless certain things are coded carefully. As far as I can tell, this really is fixed in vanilla, so my guess would be that it is an issue with one of the mods.

I am wholly or partially responsible for the code-bases of every mod currently available except SCY, Neutrino, Diable, and most of the smaller ones.  If there is a chance for any of it to leak, I am not aware of it.  What easily-missable things could cause save files to bloat forever?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Can't Load Saves? Use 64-bit Java! (Instructions Inside)
« Reply #82 on: February 12, 2015, 02:10:04 PM »

I'm not talking about save-bloat, but repeated loading of saves causing leaks. This could be something like storing a fleet member reference in a static or a singleton, and then that fleet member persisting after a new game is loaded, causing the entire engine from the previous game to stay in memory as well.

A non-obvious case would be holding on to stuff in a HullModEffect or a HullModFleetEffect. Those are instantiated once per application session, so it's best not to put any campaign references in data members there, but to use the campaign's getPersistentData() instead.

A quick way to test for that sort of thing is using jvisualvm and seeing how many instances of CampaignEngine there are in memory after quick-loading a bunch of times in a row. Gets more evil if it's the sort of thing that doesn't show up until you're at a certain point in the campaign, though.
Logged

Delta7

  • Commander
  • ***
  • Posts: 131
  • forum idiot
    • View Profile
    • my personal DA account
Re: Can't Load Saves? Use 64-bit Java! (Instructions Inside)
« Reply #83 on: February 12, 2015, 02:13:07 PM »

oh, and as mentioned before, i have a similar problem. whenever i load a save, it starts to take longer to load each time i reload it. eventually the progress bar takes minutes to move even a couple of centimeters, almost stopping completely. usually restarting the game fixes this, but the one time it didnt, i ended up having to delete one of my saves. i play with relatively few mods: starsector +, omnifactory, blackrock drive yards, citedel, shadowyards, and 2 core utility mods, shaders lib and lazy lib. are any of these known to cause this error while loading saves? so far, it's the only real problem ive had with my mod set, even hour and a half long play sessions dont cause freezes/ crashes, though loading a save after such a play session sometimes does.
is that what you're referring to?
Logged
warning: may be prone to random outbursts of stupidity

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: Can't Load Saves? Use 64-bit Java! (Instructions Inside)
« Reply #84 on: February 12, 2015, 02:24:20 PM »

I'm not talking about save-bloat, but repeated loading of saves causing leaks. This could be something like storing a fleet member reference in a static or a singleton, and then that fleet member persisting after a new game is loaded, causing the entire engine from the previous game to stay in memory as well.

A non-obvious case would be holding on to stuff in a HullModEffect or a HullModFleetEffect. Those are instantiated once per application session, so it's best not to put any campaign references in data members there, but to use the campaign's getPersistentData() instead.

A quick way to test for that sort of thing is using jvisualvm and seeing how many instances of CampaignEngine there are in memory after quick-loading a bunch of times in a row. Gets more evil if it's the sort of thing that doesn't show up until you're at a certain point in the campaign, though.

I'm certain that I avoided putting such things in static variables, but if all you need is a single offense...

The Hullmod thing is not good though.  I'll have to redo a really tremendous amount of scripts; several thousand lines of code.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Can't Load Saves? Use 64-bit Java! (Instructions Inside)
« Reply #85 on: February 12, 2015, 02:47:34 PM »

Urgh - could've sworn this was in the javadoc somewhere, but apparently not; apologies. Added, fwiw.

(This got me too, while coding up TowCableEffect...)

Just to make sure: you've actually got that many hull mod effects that store campaign references? I guess in a way this could be good news, in that we've identified a significant issue.
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: Can't Load Saves? Use 64-bit Java! (Instructions Inside)
« Reply #86 on: February 12, 2015, 02:58:00 PM »

It's hard to say.  The worst offenders I could think of in terms of storing data I just went through -- and by some miracle, all I store is combat engine data, all centralized in a weak hash map keyed to the CombatEngineAPI.  I had neglected to do that for the campaign, but apparently there are only a couple small iffy scripts for that, not the huge monolithic ones I feared could have been the cause.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Can't Load Saves? Use 64-bit Java! (Instructions Inside)
« Reply #87 on: February 12, 2015, 03:02:00 PM »

Ah, cool. Good thing you were already using a weak hash map for the combat stuff, too.
Logged

Lprsti99

  • Ensign
  • *
  • Posts: 25
    • View Profile
Re: Can't Load Saves? Use 64-bit Java! (Instructions Inside)
« Reply #88 on: February 16, 2015, 03:10:52 PM »

Issue: if I change the memory allocation to anything other than 1024m for both xms and xmx, the game won't start at all, not even the launcher.  Any idea why that'd be?  Running windows 7 64-bit.

For reference, this dowsn't work:
Quote
java -Djava.library.path=native\windows -Xms2048m -Xmx4096m -Dcom.fs.starfarer.settings.paths.logs=. -Dcom.fs.starfarer.settings.paths.saves=../saves -Dcom.fs.starfarer.settings.paths.screenshots=../screenshots -Dcom.fs.starfarer.settings.paths.mods=../mods -classpath janino.jar;commons-compiler.jar;commons-compiler-jdk.jar;starfarer.res.jar;starfarer.api.jar;starfarer_obf.jar;jogg-0.0.7.jar;jorbis-0.0.15.jar;json.jar;lwjgl.jar;lwjgl_util_applet.jar;jinput.jar;lwjgl_test.jar;log4j-1.2.9.jar;lwjgl_util.jar;fs.sound_obf.jar;fs.common_obf.jar;xstream-1.4.2.jar com.fs.starfarer.StarfarerLauncher

While this does (though it crashes OOM if I try to run it with mods, obviously):
Quote
java -Djava.library.path=native\windows -Xms1024m -Xmx1024m -Dcom.fs.starfarer.settings.paths.logs=. -Dcom.fs.starfarer.settings.paths.saves=../saves -Dcom.fs.starfarer.settings.paths.screenshots=../screenshots -Dcom.fs.starfarer.settings.paths.mods=../mods -classpath janino.jar;commons-compiler.jar;commons-compiler-jdk.jar;starfarer.res.jar;starfarer.api.jar;starfarer_obf.jar;jogg-0.0.7.jar;jorbis-0.0.15.jar;json.jar;lwjgl.jar;lwjgl_util_applet.jar;jinput.jar;lwjgl_test.jar;log4j-1.2.9.jar;lwjgl_util.jar;fs.sound_obf.jar;fs.common_obf.jar;xstream-1.4.2.jar com.fs.starfarer.StarfarerLauncher
« Last Edit: February 16, 2015, 03:13:30 PM by Lprsti99 »
Logged

Midnight Kitsune

  • Admiral
  • *****
  • Posts: 2846
  • Your Friendly Forum Friend
    • View Profile
Re: Can't Load Saves? Use 64-bit Java! (Instructions Inside)
« Reply #89 on: February 16, 2015, 05:38:31 PM »

Issue: if I change the memory allocation to anything other than 1024m for both xms and xmx, the game won't start at all, not even the launcher.  Any idea why that'd be?  Running windows 7 64-bit.

For reference, this dowsn't work:
Quote
java -Djava.library.path=native\windows -Xms2048m -Xmx4096m -Dcom.fs.starfarer.settings.paths.logs=. -Dcom.fs.starfarer.settings.paths.saves=../saves -Dcom.fs.starfarer.settings.paths.screenshots=../screenshots -Dcom.fs.starfarer.settings.paths.mods=../mods -classpath janino.jar;commons-compiler.jar;commons-compiler-jdk.jar;starfarer.res.jar;starfarer.api.jar;starfarer_obf.jar;jogg-0.0.7.jar;jorbis-0.0.15.jar;json.jar;lwjgl.jar;lwjgl_util_applet.jar;jinput.jar;lwjgl_test.jar;log4j-1.2.9.jar;lwjgl_util.jar;fs.sound_obf.jar;fs.common_obf.jar;xstream-1.4.2.jar com.fs.starfarer.StarfarerLauncher

While this does (though it crashes OOM if I try to run it with mods, obviously):
Quote
java -Djava.library.path=native\windows -Xms1024m -Xmx1024m -Dcom.fs.starfarer.settings.paths.logs=. -Dcom.fs.starfarer.settings.paths.saves=../saves -Dcom.fs.starfarer.settings.paths.screenshots=../screenshots -Dcom.fs.starfarer.settings.paths.mods=../mods -classpath janino.jar;commons-compiler.jar;commons-compiler-jdk.jar;starfarer.res.jar;starfarer.api.jar;starfarer_obf.jar;jogg-0.0.7.jar;jorbis-0.0.15.jar;json.jar;lwjgl.jar;lwjgl_util_applet.jar;jinput.jar;lwjgl_test.jar;log4j-1.2.9.jar;lwjgl_util.jar;fs.sound_obf.jar;fs.common_obf.jar;xstream-1.4.2.jar com.fs.starfarer.StarfarerLauncher
Are you SURE you are using java 64 bit? Because this sounds like you are still using 32 bit java. To be sure, fire the game up with 1024m set and look at the first few lines of the log. It should say if java is 32 or 64 bit.
Logged
Help out MesoTroniK, a modder in need

2021 is 2020 won
2022 is 2020 too
Pages: 1 ... 4 5 [6] 7 8 ... 30