Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Realm Works Forums > Realm Works Discussion

Notices

Reply
 
Thread Tools Display Modes
Dr_Automaton
Senior Member
 
Join Date: Mar 2013
Posts: 150

Old January 15th, 2017, 05:05 AM
Yesterday morning I played around with the new realm copy and import/export features. When I was finished, I deleted several new realms that I had created. After updating this morning I made a new backup and noticed that the file size had increased by around 30 MB. Looking back at the automatic backups that RW generates, the filesize increased around the time I was playing around and never decreased after removing the newly created test realms.

Has anyone else noticed this behavior?
Dr_Automaton is offline   #1 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old January 15th, 2017, 05:19 AM
This is normal. Database engines typically behave this way. The data has been deleted within the database, but the file size is not shrunk. Once the database adds to its tables, it's both expensive and inefficient to delete that enlarged storage. Instead, the individual records are deleted, and the database stays the larger size. The next time that new records are written, they will simply reuse the internal space that's been freed up. So the database won't grow again for awhile, even if you add more material to it. The freed space will be reclaimed for use again.

Hope this helps!
rob is offline   #2 Reply With Quote
Dr_Automaton
Senior Member
 
Join Date: Mar 2013
Posts: 150

Old January 15th, 2017, 05:26 AM
Thanks, Rob. I suspected this might be the issue. This could be a problem in the future for users with large realms who might want to excise realms they aren't using to reduce the file size. Since each DB is effectively 11 times its listed size due to automatic backups, this could be an unfortunate side effect unless an option to compact the DB is implemented at some point.
Dr_Automaton is offline   #3 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old January 16th, 2017, 01:12 AM
Excellent point. This is something we recently realized (read: a couple weeks ago). We need to figure out how best to resolve it in the VERY near future, but we didn't consider it critical enough to further delay the release. Hopefully, we made the right call on that one.
rob is offline   #4 Reply With Quote
Parody
Senior Member
 
Join Date: Jan 2013
Location: Rochester, MN
Posts: 1,515

Old January 16th, 2017, 04:58 AM
If you have Cloud Service, a workaround would be to delete/rename your Master folder and force Realm Works to download your realms again. Then it'd be as small as the engine would allow, at the cost of losing your local preferences (and any unsynced changes, but hopefully you all know better than that. ;)

Parody is offline   #5 Reply With Quote
kbs666
Senior Member
 
Join Date: Oct 2014
Location: Chicago, IL
Posts: 1,690

Old January 16th, 2017, 05:09 PM
Quote:
Originally Posted by rob View Post
This is normal. Database engines typically behave this way. The data has been deleted within the database, but the file size is not shrunk. Once the database adds to its tables, it's both expensive and inefficient to delete that enlarged storage. Instead, the individual records are deleted, and the database stays the larger size. The next time that new records are written, they will simply reuse the internal space that's been freed up. So the database won't grow again for awhile, even if you add more material to it. The freed space will be reclaimed for use again.

Hope this helps!
There is something more going on than that.

Over the last several days I have made a copy of main realm a couple of times to convert to Pathfinder rules. I deleted the first attempt, assuming a second would not grow my DB, in order to get a log file. However when I checked the DB and the backups it became clear that the DB grew with each copy and the extra space is not being recovered.

I have not used the DB engine you guys are using but it is quite common in DB's for a delete operation to simply mark rows and tables as deleted but to not actually remove them. There may be a setting that needs switching somewhere.

my Realm Works videos
https://www.youtube.com/channel/UCZU...4DwXXkvmBXQ9Yw
kbs666 is offline   #6 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old January 21st, 2017, 05:31 PM
I looked into this a bit further today, and you're right. We're going to need to investigate this in more depth to get a clear handle on how best to handle this. That probably won't happen for a little bit, since our immediate focus is on the few remaining bugs in RW itself and then getting the Content Market officially launched. But I've flagged this as an issue for us to circle back to relatively soon.

Thanks for catching this!
rob is offline   #7 Reply With Quote
kbs666
Senior Member
 
Join Date: Oct 2014
Location: Chicago, IL
Posts: 1,690

Old January 21st, 2017, 06:28 PM
NP.

It shouldn't actually be an issue except when people do stuff outside normal use cases. The problem is the forum denizens are exactly the types to do that.

Probably will turn out to be something simple like changing a setting somewhere or adding an additional SQL command on top of the DELETE. I vaguely remember some DB's supporting PURGE for this sort of thing.

my Realm Works videos
https://www.youtube.com/channel/UCZU...4DwXXkvmBXQ9Yw
kbs666 is offline   #8 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 08:35 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.