Continuously growing allocated memory

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Ber4ber43
Posts: 47
Joined: 30 Apr 2019, 14:35

Continuously growing allocated memory

Postby Ber4ber43 » 19 Apr 2021, 15:05

Continuously growing allocated memory

Hi,
We realized that the memory used on our server is constantly growing, up to the maximum of the allocated memory, adding more allocated memory, and then drastically decreasing, and it repeats continuously until all the memory is used up.

We ran our server on another machine so we had 0 users, and the result in 30 minutes is this:
Image

I wanted to ask if this is normal behavior, or is it given by my server code, and if so how do I find out which class is causing this illegal memory allocation?

EDIT:
I used visualVM to analyze the memory, the result is this:

Image

Thank you
Last edited by Ber4ber43 on 19 Apr 2021, 16:18, edited 1 time in total.
User avatar
Lapo
Site Admin
Posts: 21955
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Continuously growing allocated memory

Postby Lapo » 20 Apr 2021, 07:57

Hi,
We realized that the memory used on our server is constantly growing, up to the maximum of the allocated memory, adding more allocated memory, and then drastically decreasing, and it repeats continuously until all the memory is used up.

yes that's normal behavior.
Java uses Garbage Collection to manage memory, so it's expected to see memory allocation going up as new objects are created, then the GC will delete all the unreferenced objects when more memory is needed.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
Ber4ber43
Posts: 47
Joined: 30 Apr 2019, 14:35

Re: Continuously growing allocated memory

Postby Ber4ber43 » 20 Apr 2021, 12:05

Ok thanks Lapo

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 40 guests