Pesistant Storage - Interim Solutions
Moderators: Wynna, NWN2 - 03 DM
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
Re: Pesistant Storage - Interim Solutions
See the edit to the stickied topic re: P-storage. The fix is in, and holding. 
Re: Pesistant Storage - Interim Solutions
Well done.
What was the fix?
What was the fix?
Current PCs:
NWN1: Soppi Widenbottle, High Priestess of Yondalla.
NWN2: Gruuhilda, Tree Hugging Half-Orc
NWN1: Soppi Widenbottle, High Priestess of Yondalla.
NWN2: Gruuhilda, Tree Hugging Half-Orc
Re: Pesistant Storage - Interim Solutions
spoonfeeding
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
Re: Pesistant Storage - Interim Solutions
It started to become clear that the problem was tied to how big the TSM module had gotten, specifically it's memory footprint. BG doesn't have the symptoms, much smaller mod. Exodus' Amn server (on the same core/perisistency scripts) didn't have the p-storage problems before, but has recently started to exhibit them (their module is getting close to TSM in size now). This prompted me to re-test using a pared-down version of TSM which had a smaller memory footprint (by deleting a pile of large exteriors), which turned out to work (though there was still a massive lag hit during the first write operation).NickD wrote:What was the fix?
Watching the pagefile usage in Task Manager, I was reminded of a strange but recurrent phenomenon, whereby the first object write to the native campaign DB would cause a big jump in pagefile/memory use (maybe 20-40% increase in overall size), with subsequent read and write operations running smoothly (the pagefile useage would stay high, though). I discussed the finding with Wynna, who wanted me to narrow down the threshold size that was still workable for p-storage, so she could try to trim down the mod sufficiently. In testing a nearly full-sized module, I was able to get a successful DB write with a PC who logged into an interior adjacent to a pstorage object, immediately after a module reset (fresh module, 1 player on, no ATs performed yet, no spawns in area (or active in the module yet), etc. Basically best-case scenario. Seeing that the one successful write was all that was necessary to get stability for the remainder of the module's runtime, we hit on a plan to try to "pre-initialize" the campaign DB.
OnModuleLoad, we added a script which creates a single object at the start location. Arbitarily, I decided to have it make a spoon. The script then stores the spoon in an object database (causing a write operation), and subsequently deletes the in-module copy. The net effect is to get the major lag/performance/memory hit of that first write operation out of the way before anyone has opportunity to log in, such that things are stable and functional for subsequent campaign DB operations elsewhere on the server.
Four lines of code, including the WriteTimestampedLogEntry("There is no spoon"). TSM takes an extra minute or two to load now while it recovers from that first DB write, but seems to be working otherwise.
And so I get to avoid revamping the entire p-storage code to work with BLOBs for a few more months at least, with any luck.
Re: Pesistant Storage - Interim Solutions
Now that's out of the box thinking. Nice work, AL 
< Signature Free Zone >
- Ithildur
- Dungeon Master
- Posts: 3548
- Joined: Wed Oct 06, 2004 7:46 am
- Location: Best pizza town in the universe
- Contact:
Re: Pesistant Storage - Interim Solutions
Brilliant. The simplest and most elegant solutions are often the best. Gotta love the spoon bit. 
Formerly: Aglaril Shaelara, Faerun's unlikeliest Bladesinger
Current main: Ky - something
It’s not the critic who counts...The credit belongs to the man who actually is in the arena, who strives violently, who errs and comes up short again and again...who if he wins, knows the triumph of high achievement, but who if he fails, fails while daring greatly.-T. Roosevelt
Current main: Ky - something
It’s not the critic who counts...The credit belongs to the man who actually is in the arena, who strives violently, who errs and comes up short again and again...who if he wins, knows the triumph of high achievement, but who if he fails, fails while daring greatly.-T. Roosevelt
- Brother Humphrey
- Kosher Kojak
- Posts: 1116
- Joined: Wed Aug 18, 2004 12:59 pm
- Location: Hadera, Israel
Re: Pesistant Storage - Interim Solutions
Just goes to show that spooning afterwards really does promote harmony
<paazin> Elves I bet are kinda fun to play.
<BH|werksux> I prefer the trumpet or clarinet
<BH|werksux> elves wiggle too much
Current Server: TSM
Current PC: Delshandra
Pwned PCs: Lemuel,Skimmer,Clevon,Juno,Gilbert,BH,Dunkin,Osk & Rodney
Current Status: Highly Mobile
<BH|werksux> I prefer the trumpet or clarinet
<BH|werksux> elves wiggle too much
Current Server: TSM
Current PC: Delshandra
Pwned PCs: Lemuel,Skimmer,Clevon,Juno,Gilbert,BH,Dunkin,Osk & Rodney
Current Status: Highly Mobile
Re: Pesistant Storage - Interim Solutions
Brother Humphrey wrote:Just goes to show that spooning afterwards really does promote harmony
Re: Pesistant Storage - Interim Solutions
AL and Wynna,
Your geniuseseses has once again made all things right with the world of ALFA.
Thank you
Your geniuseseses has once again made all things right with the world of ALFA.
Thank you
"thats dob85y, sound it out! - d o b b s y"
"Hey man, this aint no game, this is serious"
Shiver
Previous Toon
Ward Halliams - Priest of Kelemvor
Tirus Blazingeye
Ryu Yahchamazina Shield of Helm - Everwatch Knights
"Hey man, this aint no game, this is serious"
Shiver
Previous Toon
Ward Halliams - Priest of Kelemvor
Tirus Blazingeye
Ryu Yahchamazina Shield of Helm - Everwatch Knights
