fcraft vs 800craft Memory Leak

Go down

fcraft vs 800craft Memory Leak

Post  Ericrb on Tue Jul 24, 2012 3:52 pm

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.







avatar
Ericrb



Posts : 1289
Join date : 2010-12-24
Location : Canada

View user profile

Back to top Go down

Re: fcraft vs 800craft Memory Leak

Post  Voltzahl on Tue Jul 24, 2012 6:25 pm

So what your saying is unless this gets fix'd AITM has to go back to fCraft?

NOOOOOOOOOOOOOOO!!!!!!!!!!!!!!!!!!!!
avatar
Voltzahl


Posts : 265
Join date : 2011-12-25
Age : 105
Location : Your electronic devices.

View user profile

Back to top Go down

Re: fcraft vs 800craft Memory Leak

Post  Ericrb on Tue Jul 24, 2012 10:11 pm

Kev said he is going to "fucking" fix this "shit" before I found this problem.
avatar
Ericrb



Posts : 1289
Join date : 2010-12-24
Location : Canada

View user profile

Back to top Go down

Re: fcraft vs 800craft Memory Leak

Post  Jonty800 on Tue Jul 24, 2012 10:54 pm

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

Jonty800

Posts : 5
Join date : 2012-07-24

View user profile

Back to top Go down

Re: fcraft vs 800craft Memory Leak

Post  Jonty800 on Tue Jul 24, 2012 11:24 pm

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.

Jonty800

Posts : 5
Join date : 2012-07-24

View user profile

Back to top Go down

Re: fcraft vs 800craft Memory Leak

Post  Voltzahl on Wed Jul 25, 2012 1:23 am

Sweet I hope it gets fixed soon.
On a slightly related topic, welcome to AITM's forum Jonty.
avatar
Voltzahl


Posts : 265
Join date : 2011-12-25
Age : 105
Location : Your electronic devices.

View user profile

Back to top Go down

Re: fcraft vs 800craft Memory Leak

Post  Ericrb on Wed Jul 25, 2012 5:59 am

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. :/
avatar
Ericrb



Posts : 1289
Join date : 2010-12-24
Location : Canada

View user profile

Back to top Go down

Re: fcraft vs 800craft Memory Leak

Post  Jonty800 on Wed Jul 25, 2012 6:15 am

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

Jonty800

Posts : 5
Join date : 2012-07-24

View user profile

Back to top Go down

Re: fcraft vs 800craft Memory Leak

Post  Ericrb on Wed Jul 25, 2012 6:18 am

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+.
avatar
Ericrb



Posts : 1289
Join date : 2010-12-24
Location : Canada

View user profile

Back to top Go down

Re: fcraft vs 800craft Memory Leak

Post  Jonty800 on Wed Jul 25, 2012 7:42 am

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

Jonty800

Posts : 5
Join date : 2012-07-24

View user profile

Back to top Go down

Re: fcraft vs 800craft Memory Leak

Post  Jonty800 on Wed Jul 25, 2012 7:44 am

*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.

Jonty800

Posts : 5
Join date : 2012-07-24

View user profile

Back to top Go down

Re: fcraft vs 800craft Memory Leak

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum