PDA

View Full Version : Too many characters cause FGU to balloon to 6+ GB RAM usage



stephan_
July 26th, 2021, 18:51
New thread as the other one is closed.

Summary:

Too many PC characters cause RAM usage to balloon in campaigns using the same ruleset (tested with Starfinder)

Starting point:

FG uses 6-7 GB of RAM in long-running campaigns, only slightly less in brand new campaigns.

Even with 16 GB of RAM, FG, the OS and other RAM-hungry applications (Firefox, Music Player etc.) cause the system to run out of RAM, leading to crashes.

Ruleset: (tested with) Starfinder

Operating System / Language Setting: Windows 10 DE (AT)

Testing:

Constants for every test:

Empty (brand new) Starfinder campaign, no content, no maps including LoS, no extensions, no modules loaded, no player connected.

Variables for every test:

Moving folders in FG data directory to secondary locations to see whether RAM usage is affected

Step 1: Going back to basics

Basics loaded: FG - vault and rulesets only (+ 10 MB docs, logs)

RAM: 300-400 MB

[some experimentation, the only noticeable difference is the addition of the campaign folder]

Step 2: everything except campaigns

Same as step 1

+

Cache

Tokens

Portraits

Modules

Extensions

[no folder particularly large]

RAM: 300-400 MB

[B]Step 3: everything including campaigns

Same as step 2

+

25 campaigns (different rulesets, 1.5 GB, some ported over from Classic)

RAM: 5 GB

Note this is with a brand new campaign [nothing actively loaded (see "Constants for every test")].

[B]The issue

I did not notice the issue (single test only) in 5E (300-400 MB RAM), PF2 had slightly elevated RAM usage (1.5 GB).

Having only several smaller campaigns (21 campaigns <100 MB each , 373 MB total) or a few larger campaigns (4 campaigns, 576, 326, 125, 130 MB) loaded did not make much of a difference.

21 smaller campaigns <100 MB each only: 4.5 GB RAM

4 large campaigns only (576, 326, 125, 130 MB): 3.9 GB RAM

It did however help me in narrowing down the issue to two campaign.

1. The largest campaign - no surprise there.

2. The test campaign I created for another bug report with no data except 700+ character [see other bug report for issues opening character selection screen and saving for details (https://www.fantasygrounds.com/forums/showthread.php?69720-FG-lagging-presumably-due-to-too-many-characters-in-campaign-(500-))]

Without these two campaigns, RAM usage is 700-800 MB for Starfinder, adding either one results in RAM usage of around 4 GB, adding both leads to the original 6+ RAM usage.

Summary:

Too many PC characters cause RAM usage to balloon in campaigns using the same ruleset (tested with Starfinder).

Edit: Steps to reproduce

1. Create empty Starfinder campaign and write down the RAM usage.

2. Open madman's pregen module (https://www.fantasygrounds.com/forums/showthread.php?58365-Society-Pregens-Module) and import a medium complexity character (e.g. Altronus level 8) [or import a medium complexity character another way].

3. Import the same character again at least 200 times. [If anyone is interested in testing it out but does not want to click 200+ times I can send a 40 MB campaign file.]

(You will already notice RAM usage balloon in the current campaign.)

4. Open up a new empty Starfinder campaign and compare RAM usage to the previous RAM usage.