Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Ericrb

fcraft vs 800craft Memory Leak

Recommended Posts

VPS are limited by a certain amount of RAM. Once the RAM exceed the limit, the server crash.

Both client uses the same amount of RAM to perform the same actions. The problem is when 800craft finishes the action, the memory goes to waste (It takes a lot of time before 800craft resets. Way to much time when there's a lot of people in the server). It's still there, but it's not being used. Fcraft on the other end, resets the RAM when the action is done.

Here what I mean mathematically. Let's say to gen a world you need 500mb of RAM. Both client starts at 40mb of ram and let's say the VPS limit is 1GB. This is how the clients perform the actions :

800craft = 40mb. Gen world, 540mb. Gen world, 1040mb. Gen world, 1540mb. Crash.
fcraft = 40mb. Gen world, 540mb. Gen world, 540mb. Gen world 540mb. I can go on but... yeah.

This is not limited to world generating. Commands use ram, building, loading the map, etc.







Share this post


Link to post
Share on other sites
So what your saying is unless this gets fix'd AITM has to go back to fCraft?

NOOOOOOOOOOOOOOO!!!!!!!!!!!!!!!!!!!!

Share this post


Link to post
Share on other sites
Kev said he is going to "fucking" fix this "shit" before I found this problem.

Share this post


Link to post
Share on other sites
Interesting!

I'll look into this right away.

Its weird, because the fCraft and 800Craft infrastructure are the same, especially the /Gen command. I'll keep you updated on this issue.

approve

Share this post


Link to post
Share on other sites
I think I have narrowed down the cause of the memory leak upon creating a new map, I have passed the issue on to LaoTszy, since its his code notifying me.

I'll let you know when the next version is out with this fix so you can update.

Share this post


Link to post
Share on other sites
Sweet I hope it gets fixed soon.
On a slightly related topic, welcome to AITM's forum Jonty.

Share this post


Link to post
Share on other sites
Update : ServerCLI vs GUI

If I open up the server with ServerCLI.exe, everything works fine. If I open ServerGUI, nuhuh.

ServerCLI vs GUI starting RAM:


ServerCLI vs GUI after a world generation!


Is it a bug? One more!


Moreeeee! Wait what?!


Found out the GUI resets after hitting ~3500mb!
The only fix I can think now is to limit the RAM usage or heap size, or use CLI or w/e. :/

Share this post


Link to post
Share on other sites
Hmmm, now that is interesting.

I narrowed the bug down to an instance not properly being disposed of in the new Map Format extension, but its weird for ServerCLI to not use the same amount of memory as the GUI :S

I get the same memory usage in the CLI as the GUI.

The memory clears are 3000mb because that's the time-interval for when the software dumps the excess memory

Share this post


Link to post
Share on other sites
Jonty800 wrote:
I get the same memory usage in the CLI as the GUI.


Do you mean the "good" memory or the "leak" memory? You might want to wait 10-15s before CLI clears. While the GUI takes 10mins+.

Share this post


Link to post
Share on other sites
I was able to reproduce this bug in fCraft too



The safest way to dump the excess memory during generation is by requesting it, which takes time and is normal. Instant dumping would cause serious problems.

So yeah, there is no bug, this is totally normal for both fCraft and 800Craft. If GC does not kick in on your machine until it's out of memory, your runtime is misconfigured

Share this post


Link to post
Share on other sites
*note

Sometimes the dump happens really quickly, hence why you were unable to produce it on fCraft and why I was unable to locate the bug. The CLI and GUI will run exactly the same. The Dumping of the memory happens whenever it can, so it can take any amount of time.

Share this post


Link to post
Share on other sites

×
×
  • Create New...