Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 5 6 [7]

Author Topic: [Late Game] Battles & Colony Management ruin FPS gradually & permanently.  (Read 17335 times)

Nick XR

  • Admiral
  • *****
  • Posts: 713
    • View Profile
Re: [Late Game] Battles & Colony Management ruin FPS gradually & permanently.
« Reply #90 on: December 10, 2021, 10:28:35 AM »

FWIW, I'm doing a heavily modded play through with the usual Nexerlin + Varya's+Lots-o-Faction mods and I'm not having any slowdowns using the JRE8 271 and "aggressive" GC options from Discord:

Code
java.exe -XX:+ShowMessageBoxOnError -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AggressiveOpts -XX:+TieredCompilation -XX:+UseG1GC -XX:InitialHeapSize=2048m -XX:MaxMetaspaceSize=2048m -XX:MaxNewSize=2048m -XX:+ParallelRefProcEnabled -XX:G1NewSizePercent=5 -XX:G1MaxNewSizePercent=10 -XX:G1ReservePercent=5 -XX:InitiatingHeapOccupancyPercent=80 -XX:G1HeapWastePercent=5 -XX:MaxGCPauseMillis=100 -XX:G1HeapRegionSize=2M -XX:+UseStringDeduplication -Xms10512m -Xmx10512m -Xss2m 

In addition to no slowdowns, performance over all is just better.

temotodochi

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: [Late Game] Battles & Colony Management ruin FPS gradually & permanently.
« Reply #91 on: December 29, 2021, 01:19:23 PM »

with these options starsector wont even start. What's you vmparams like?
Logged

Nick XR

  • Admiral
  • *****
  • Posts: 713
    • View Profile
Re: [Late Game] Battles & Colony Management ruin FPS gradually & permanently.
« Reply #92 on: December 30, 2021, 12:03:21 AM »

with these options starsector wont even start. What's you vmparams like?

java.exe -XX:CompilerThreadPriority=1 -XX:+CompilerThreadHintNoPreempt -XX:+DisableExplicitGC -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+TieredCompilation -XX:+UseG1GC -XX:InitialHeapSize=2048m -XX:MaxMetaspaceSize=2048m -XX:MaxNewSize=2048m -XX:+ParallelRefProcEnabled -XX:G1NewSizePercent=5 -XX:G1MaxNewSizePercent=10 -XX:G1ReservePercent=5 -XX:InitiatingHeapOccupancyPercent=80 -XX:G1HeapWastePercent=5 -XX:MaxGCPauseMillis=100 -XX:G1HeapRegionSize=2M -XX:+UseStringDeduplication -Djava.library.path=native\windows -Xms8096m -Xmx8096m -Xss2m -classpath janino.jar;commons-compiler.jar;commons-compiler-jdk.jar;starfarer.api.jar;starfarer_obf.jar;jogg-0.0.7.jar;jorbis-0.0.15.jar;json.jar;lwjgl.jar;jinput.jar;log4j-1.2.9.jar;lwjgl_util.jar;fs.sound_obf.jar;fs.common_obf.jar;xstream-1.4.10.jar -Dcom.fs.starfarer.settings.paths.saves=..\\saves -Dcom.fs.starfarer.settings.paths.screenshots=..\\screenshots -Dcom.fs.starfarer.settings.paths.mods=..\\mods -Dcom.fs.starfarer.settings.paths.logs=. com.fs.starfarer.StarfarerLauncher


This is using JRE8 271 and you'll have to force windows to use application scaling (search for it if you're not sure how).  You'll also need probably 12GB of system memory at least.

temotodochi

  • Ensign
  • *
  • Posts: 8
    • View Profile
Re: [Late Game] Battles & Colony Management ruin FPS gradually & permanently.
« Reply #93 on: December 30, 2021, 05:45:31 PM »

Thanks for the details, however starsector wont start with that in vmparams, not even the launcher. There are several issues. You didn't use code (#) formatting, so forum broke your paste by trying to cut it in places to fit he page width.

Also 8096 might work, but is not correct. Java likes powers of ^2. Double of 4096 is 8192. Might be simpler just to state =8G.

I think 16 gigs of ram is bare minimum these days, i personally have run on 32gigs for years already.

Logged

corporeal

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: [Late Game] Battles & Colony Management ruin FPS gradually & permanently.
« Reply #94 on: December 03, 2022, 01:24:30 AM »

Didn't find a more recent thread. I'm still having this issue but found a new technique for anyone having trouble on a linux system that uses systemd.

As per previous posts, this is now my starsctor.sh:
Code
./jre_linux/bin/java -server -XX:+UseLargePages -XX:+UseParallelGC -XX:-UseGCOverheadLimit -XX:CompilerThreadPriority=1 -XX:+CompilerThreadHintNoPreempt -Djava.library.path=./native/linux -Xmn1g -Xms4g -Xmx4g -Xss4m -classpath janino.jar:commons-compiler.jar:commons-compiler-jdk.jar:starfarer.api.jar:starfarer_obf.jar:jogg-0.0.7.jar:jorbis-0.0.15.jar:json.jar:lwjgl.jar:jinput.jar:log4j-1.2.9.jar:lwjgl_util.jar:fs.sound_obf.jar:fs.common_obf.jar:xstream-1.4.10.jar -Dcom.fs.starfarer.settings.paths.saves=./saves -Dcom.fs.starfarer.settings.paths.screenshots=./screenshots -Dcom.fs.starfarer.settings.paths.mods=./mods -Dcom.fs.starfarer.settings.paths.logs=. -Dcom.fs.starfarer.settings.linux=true com.fs.starfarer.StarfarerLauncher
#./jre_linux/bin/java -server -XX:-UseGCOverheadLimit -XX:+UseParallelGC -XX:CompilerThreadPriority=1 -XX:+CompilerThreadHintNoPreempt -Djava.library.path=./native/linux -Xms4g -Xmx4g -Xss4m -Xmn64m -classpath janino.jar:commons-compiler.jar:commons-compiler-jdk.jar:starfarer.api.jar:starfarer_obf.jar:jogg-0.0.7.jar:jorbis-0.0.15.jar:json.jar:lwjgl.jar:jinput.jar:log4j-1.2.9.jar:lwjgl_util.jar:fs.sound_obf.jar:fs.common_obf.jar:xstream-1.4.10.jar -Dcom.fs.starfarer.settings.paths.saves=./saves -Dcom.fs.starfarer.settings.paths.screenshots=./screenshots -Dcom.fs.starfarer.settings.paths.mods=./mods -Dcom.fs.starfarer.settings.paths.logs=. -Dcom.fs.starfarer.settings.linux=true com.fs.starfarer.StarfarerLauncher

The difference is that UseLargePages is enabled.

Additionally this wrapper script is now used to call starsector.sh:
Code
systemd-run --scope -p MemoryMax=7G -p MemorySwapMax=32M --user ./starsector.sh &>/dev/null &
while [ TRUE ]; do
echo 'Waiting 1 minute...'
sleep 55s
echo 'Clearing cache...'
sync && echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null
sleep 5s
free -h
done

systemd-run --scope -p MemoryMax=7G -p MemorySwapMax=32M --user ./starsector.sh &>/dev/null &
--This forks starsector into a process that is restricted to 7G of my available 8G of ram (including cache!). This allows my computer to run other programs smoothly.
--Greatly reduces the burning of my SSD drive by restricting swap.

sync && echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null
This is a REALLY aggressive method of clearing memory. See https://linux-mm.org/Drop_Caches and google for more info.

lspci -k:
Code
00:00.0 Host bridge: Intel Corporation Broadwell-U Host Bridge -OPI (rev 09)
Subsystem: Matsushita Electric Industrial Co., Ltd. Device 8338
Kernel driver in use: bdw_uncore
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09)
Subsystem: Matsushita Electric Industrial Co., Ltd. Device 8338
Kernel driver in use: i915
Kernel modules: i915
00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09)
Subsystem: Matsushita Electric Industrial Co., Ltd. Device 8338
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
00:04.0 Signal processing controller: Intel Corporation Broadwell-U Processor Thermal Subsystem (rev 09)
Subsystem: Matsushita Electric Industrial Co., Ltd. Device 8338
Kernel modules: processor_thermal_device_pci_legacy
00:14.0 USB controller: Intel Corporation Wildcat Point-LP USB xHCI Controller (rev 03)
Subsystem: Matsushita Electric Industrial Co., Ltd. Device 8338
Kernel driver in use: xhci_hcd
Kernel modules: xhci_pci
00:16.0 Communication controller: Intel Corporation Wildcat Point-LP MEI Controller #1 (rev 03)
Subsystem: Matsushita Electric Industrial Co., Ltd. Device 8338
Kernel driver in use: mei_me
Kernel modules: mei_me
00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio Controller (rev 03)
Subsystem: Matsushita Electric Industrial Co., Ltd. Device 8338
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #1 (rev e3)
Subsystem: Matsushita Electric Industrial Co., Ltd. Device 8338
Kernel driver in use: pcieport
00:1c.2 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #3 (rev e3)
Subsystem: Matsushita Electric Industrial Co., Ltd. Device 8338
Kernel driver in use: pcieport
00:1d.0 USB controller: Intel Corporation Wildcat Point-LP USB EHCI Controller (rev 03)
Subsystem: Matsushita Electric Industrial Co., Ltd. Device 8338
Kernel driver in use: ehci-pci
00:1f.0 ISA bridge: Intel Corporation Wildcat Point-LP LPC Controller (rev 03)
Subsystem: Matsushita Electric Industrial Co., Ltd. Device 8338
Kernel driver in use: lpc_ich
Kernel modules: lpc_ich
00:1f.2 SATA controller: Intel Corporation Wildcat Point-LP SATA Controller [AHCI Mode] (rev 03)
Subsystem: Matsushita Electric Industrial Co., Ltd. Device 8338
Kernel driver in use: ahci
00:1f.3 SMBus: Intel Corporation Wildcat Point-LP SMBus Controller (rev 03)
Subsystem: Matsushita Electric Industrial Co., Ltd. Device 8338
Kernel driver in use: i801_smbus
Kernel modules: i2c_i801
00:1f.6 Signal processing controller: Intel Corporation Wildcat Point-LP Thermal Management Controller (rev 03)
Subsystem: Matsushita Electric Industrial Co., Ltd. Device 8338
Kernel driver in use: intel_pch_thermal
Kernel modules: intel_pch_thermal
02:00.0 Network controller: Intel Corporation Wireless 7265 (rev 59)
Subsystem: Intel Corporation Dual Band Wireless-AC 7265
Kernel driver in use: iwlwifi
Kernel modules: iwlwifi


Output of free -h with starsector off:
Code
               total        used        free      shared  buff/cache   available
Mem:           7.7Gi       1.1Gi       5.9Gi       232Mi       618Mi       6.0Gi
Swap:             0B          0B          0B


lsmem:

RANGE                                  SIZE  STATE REMOVABLE BLOCK
0x0000000000000000-0x00000000dfffffff  3.5G online       yes  0-27
0x0000000100000000-0x000000021fffffff  4.5G online       yes 32-67

Memory block size:       128M
Total online memory:       8G
Total offline memory:      0B


Before I started clearing the cache it would stay over 1.5G even after starsector closed. Worse, after several successive restarts memory would overload and start dumping to my SSD!. Basically I got randomly bricked and had to hard-reboot.

Still need restart now and then but no more bricking and restarts are less frequent. 0.95.1a-RC6



mod list:
Code

{"enabledMods": [
  "lw_lazylib",
  "MagicLib",
  "shaderLib",
  "dronelib",
  "$$$_lightshow",
  "su_Concord",
  "lw_console",
  "pantera_ANewLevel40R",
  "aaacrew_replacer",
  "Adjusted Sector",
  "anotherportraitpack",
  "portrAIt",
  "raccoonarms",
  "AttunedDriveField",
  "automatedcommands",
  "lw_autosave",
  "beyondthesector",
  "CaptainsLog",
  "istl_dassaultmikoyan",
  "edshipyard",
  "fleetsizebydp",
  "sun_flux_reticle",
  "GrandColonies",
  "HexShields",
  "hte",
  "hiigaran_descendants",
  "immersionFriendlyPortraitPack",
  "IndEvo",
  "interestingportraitspack",
  "Interstellar Federation Refurbished",
  "lights_out",
  "missingships",
  "su_CarrierHullmod",
  "sun_new_beginnings",
  "nexerelin",
  "scan_those_gates",
  "console_overlord_additionalcommands",
  "clearCommands",
  "mkportraits",
  "personal_portratis",
  "pt_qolpack",
  "HMI",
  "Neutrino",
  "forge_production",
  "more_hullmods",
  "wyv_planetaryShieldAccessControl",
  "scf",
  "planet_search",
  "QualityCaptains",
  "ArkLeg",
  "swp",
  "speedUp",
  "stelnet",
  "Terraforming & Station Construction",
  "diyplanets",
  "transpoffder",
  "US",
  "whichmod",
  "audio_plus",
  "tahlan",
  "officerExtension",
  "harmless-slipstreams",
  "wisp_NeutrinoDetectorMkII",
  "progressiveSMods",
  "timid_admins",
  "mayu_specialupgrades",
  "armaa",
  "exshippack",
  "exshippack_armaacompat",
  "mySettings"
]}


Logged
Pages: 1 ... 5 6 [7]