Memory usage

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

Moderators: Lapo, Bax

User avatar
LordDawn
Posts: 42
Joined: 15 Apr 2019, 08:36

Memory usage

Postby LordDawn » 08 May 2019, 13:01

My server is currently idle, and has been so for 5 hours. It's memory usage ramps up to over 600Mb then crashes back down to 50Mb. I presume this is GC, but should it really get that far out of hand before GC kicks in?

Image1.jpg
(26.62 KiB) Not downloaded yet
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Memory usage

Postby Lapo » 08 May 2019, 16:48

It really just depends on how much memory is available in your system.
By default the JVM allocates RAM proportionally to what's available. E.g. in a small server it might just allocate 64MB of RAM (or even less).

In your case it looks like your server machine has plenty of available RAM and therefore the JVM allocates a big chunk of heap. As regards the graph in the picture, yes it is the GC and since it's a non-deterministic task, it's difficult to predict it's activity.

The 600MB of data might have accumulated after a relatively long time and at some point the GC decides that it's time to get rid of it. Keep in mind that the server has lots of background tasks going even when it's not serving clients.

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
LordDawn
Posts: 42
Joined: 15 Apr 2019, 08:36

Re: Memory usage

Postby LordDawn » 09 May 2019, 10:00

Cool, thanks Lapo. Yes the development server has 32GB to play with. Now I know that's just how JVM acts, I'm happy with that.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Baidu [Spider] and 94 guests