PDA

View Full Version : Fantasy Grounds Memory Utilization - A brief story....



Gwydion
January 10th, 2017, 15:17
So, after having bad allocation errors on occasion over the past month or so I started researching on the House of Healing way they would occur. I saw that once your memory usage goes over 3.0 GB for 64 bit operating system (which I have) you can run into errors. So, I opened my task manager, booted fantasygrounds and watched. I saw the usage consistently go to 2.8-2.9 GB as soon as I opened FG and it stayed there.

Given this seemed high to me I started trying to follow the best practices. My token module (host) was almost 300 mb so I moved some of the folders to dropbox (thinking I can create token mod files later for them). Then I started turning off extensions, deleting images that were huge in my campaign folder (2.2 mb, 1.8 mb, etc) and closing modules. (I had many map modules open just in case, Tome of Beasts, Volo's guide, etc....). I exited fantasy grounds to the load screen and jumped back in. Then my memory usage was constantly 3.2 gb!!! What happened!

After trying many different things I finally exited COMPLETELY out of fantasy grounds and then booted it back up. Low and behold I'm now running consistently at about 1.5 - 1.6 GB. I'll probably slowly turn stuff back on and see if there is a particularly memory hog. I think it was a combination of all of the above.

Just wanted to share with other that if you run a lot of extensions, mods, etc. like me you might want to keep an eye on memory usage.

I probably could have posted this in House of Healing, but given it isn't really an issue but rather a recommendation (and I only play 5E!), I thought I would post here.

LordEntrails
January 10th, 2017, 15:25
It comes from the images or tokens. Note that an image that might be 1.0MB file size when opened can take up anywhere from 2 MB to a 500MB in RAM. And that's where the problem comes.

If you have high quality tokens (a couple hundred pixels square) then that was probably the culprit, otherwise it was all your pretty maps :)

Talyn
January 10th, 2017, 15:25
Yeah, generally my personal suggestion is: when playing a game, only load what you actually need to play that session. In your offtime, just reading or prepping then sure dink around with it and experiment with how much data your system can handle. Most of the adventures have their own local copy of the NPCs so you shouldn't need a Bestiary/Monster Manual/etc. loaded. Even if you're doing a homebrew adventure, just copy the NPCs into your adventure then unload the bestiary module. And so forth.

Tokens are a culprit because they stay loaded in memory whether you're using them or not. I pop all my tokens into modules to prevent that.

Also keep in mind the current architecture really cranks up the memory usage for anything you share to players (assuming you're the GM that is). So stuff you can run just fine may end up crashing their PC if you share a bunch of modules.

Zacchaeus
January 10th, 2017, 15:26
Good grief you must have some stuff open to get up to those kind of levels.

Just looking at my screen now and with FG running with the PHB open and SKT I'm using a little over 400Mb. So you must have something close to 20 modules open. Even after adding in the DMG and MM I'm still running at only a shade under 600Mb

Gwydion
January 10th, 2017, 15:34
Good grief you must have some stuff open to get up to those kind of levels.

Just looking at my screen now and with FG running with the PHB open and SKT I'm using a little over 400Mb. So you must have something close to 20 modules open. Even after adding in the DMG and MM I'm still running at only a shade under 600Mb

Well, I have the POTA module open, DMG, PHG, MM, EE companion and then about 6-7 misc modules (random monster tables, crit tables, etc.) but the misc modules are all very small when I look at the size. It might be the token modules mainly. I use hagrid70's spell tokens which I love. I initially had the 70px and 140px in my token (host) folder. I moved the 70px files to dropbox and kept only the 140px. However, I decided to create npc's for each spell and drug the 140px tokens into the npc for easier access. I don't know if that is "doubling up" memory utilization or not. I created an NPC module for the tokens so maybe I should move the 140px token folder to dropbox and just load the npc module I created. That could be a big culprit.

Other thing is a do use several extensions that could be eating memory. Something I'll keep an eye on certainly!

Andraax
January 10th, 2017, 15:59
One thing that most people don't realize - once the OS has allocated memory to a process, it stays allocated until that process exits. Even if the process "frees" the memory, the OS doesn't reclaim it, but it will re-use the "freed" memory the next time that process requests memory, instead of enlarging the process' memory space. To *really* free memory requires exiting the process completely.

Zacchaeus
January 10th, 2017, 16:02
Indeed, those tokens do indeed use up quite a chunk of memory

Gwydion
January 10th, 2017, 16:35
One thing that most people don't realize - once the OS has allocated memory to a process, it stays allocated until that process exits. Even if the process "frees" the memory, the OS doesn't reclaim it, but it will re-use the "freed" memory the next time that process requests memory, instead of enlarging the process' memory space. To *really* free memory requires exiting the process completely.

Yeah, I think that is where I was getting confused and I assume why it took me completely exited fantasy grounds (and not just to the launch screen) to free up space for all the stuff I was trying.

LordEntrails
January 10th, 2017, 16:45
For reference, I checked a couple of Hagrid's Spell tokens. I use the 70px versions so realize the 140px versions should be about 4 times as large in memory space. The ones I checked (70px) ranged from 1MB to 7.9MB each.

Since there are 73 of them, I expect at least 150MB of process size by having those tokens in my shared folder. You are using the 140px versions, so that's about 600MB right there.

Gwydion
January 10th, 2017, 16:47
For reference, I checked a couple of Hagrid's Spell tokens. I use the 70px versions so realize the 140px versions should be about 4 times as large in memory space. The ones I checked (70px) ranged from 1MB to 7.9MB each.

Since there are 73 of them, I expect at least 150MB of process size by having those tokens in my shared folder. You are using the 140px versions, so that's about 600MB right there.

Too funny.... I was checking before I read this and yes, using the 140px versions is about 600MB in memory. I might move the to 70px version. Thanks, for looking at this!