• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Can RAM Usage Decrease?

Junior Spellweaver
Joined
Aug 9, 2019
Messages
170
Reaction score
26
This is just a curiosity, you know that zones consume 1GB and above of RAM and is there a way to reduce this? Has anyone done research on why this is so high or is it possible to reduce it? This is just an opinion post. I guess everyone wanted to drop this, at least once :D
 
Junior Spellweaver
Joined
Sep 29, 2014
Messages
149
Reaction score
66
Okay, let me give you some insight. The major ram consumption is due to the way how the zone server is made (zone.exe file). For most zones, it loads almost all lua files into the heap → later puts them into the stack. Now, obviously most zones don't need all the luas, so if I remember correctly, the sc can do some kind of regulation on which array of luas it will load, however, It's still way overestimated then the actual use case. Which means, its wasting a lot of lua files into dead ram which will never be used on the load order of any zone.

Now, the next problem occurs, if you keep an eye on the code. RW made a decent job writing the main engine (the founder of rw is a passionate guy who went over to the USA and studied CS (computer science) + he had some decent jobs as well) but as soon as the main components were done, it switched into a business, no longer a passion thing. Long story short: the code around the main engine is horrible and a clusterfuck of c++ 2004/5 skills. So much could be optimized by today's standards.

In the 64bit release, we already fixed many ram leaks in the code, however, it would take around the same time (7-9 months) to also fix all the ram free bugs (aka mallocs/allocs).

TLDR:
Yes, there is plenty left that could be optimized but fixing the need of loading all luas and freeing the ram correctly, is more work than anyone is willing to invest. We are talking a complete code restructure.
 
Upvote 0
Junior Spellweaver
Joined
Aug 9, 2019
Messages
170
Reaction score
26
Okay, let me give you some insight. The major ram consumption is due to the way how the zone server is made (zone.exe file). For most zones, it loads almost all lua files into the heap → later puts them into the stack. Now, obviously most zones don't need all the luas, so if I remember correctly, the sc can do some kind of regulation on which array of luas it will load, however, It's still way overestimated then the actual use case. Which means, its wasting a lot of lua files into dead ram which will never be used on the load order of any zone.

Now, the next problem occurs, if you keep an eye on the code. RW made a decent job writing the main engine (the founder of rw is a passionate guy who went over to the USA and studied CS (computer science) + he had some decent jobs as well) but as soon as the main components were done, it switched into a business, no longer a passion thing. Long story short: the code around the main engine is horrible and a clusterfuck of c++ 2004/5 skills. So much could be optimized by today's standards.

In the 64bit release, we already fixed many ram leaks in the code, however, it would take around the same time (7-9 months) to also fix all the ram free bugs (aka mallocs/allocs).

TLDR:
Yes, there is plenty left that could be optimized but fixing the need of loading all luas and freeing the ram correctly, is more work than anyone is willing to invest. We are talking a complete code restructure.
Yes, I think I understand you, and this seems like a difficult and time-consuming task, dude.
 
Upvote 0
Back
Top