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:
./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:
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:
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:
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:
{"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"
]}