Memory not coming down in client after removed from room

Post here your questions about the Java client / Android API for SFS2X

Moderators: Lapo, Bax

shahidbits2012
Posts: 16
Joined: 09 Jun 2021, 07:23

Memory not coming down in client after removed from room

Postby shahidbits2012 » 25 Jan 2022, 05:09

Hi Team,

We are performing stress test on the Smartfox Server. For this, we have created a Java application which creates 1000 client connections to the smartfox server. We are observing some strange behaviour with memory on the client-side.

After adding around 1000 clients to a room, we are seeing memory consumption of around 4-5GB. But, after removing the room, we are not seeing any decline in the memory on the client-side. We can see no player present in the room or the zone, which means connection is destroyed!

Can we please get your help in analyzing the memory?


Note: We have got the heap dump incase you are interested.

=======
VM Config:
OS: Centos [x86_64 x86_64 x86_64 GNU/Linux]
Core: 16
Memory: 32GB

Application Config:
Client: Java
Max Heap Memory: 24GB (-Xmx24g)
=======


Thanks!
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Memory not coming down in client after removed from room

Postby Lapo » 25 Jan 2022, 08:16

Hi,
if you're running 1000 clients it is expected to see a high memory usage as you have a 1000 copies of the API running :)
As regards the memory not being reclaimed: garbage collection in Java is kind of unpredictable, so memory will stay allocated until the GC "decides" that it's time to do some cleaning.

Also we have no knowledge of memory leaks in the Java API and we use them extensively for stress testing, so we would have noticed by now.

In any case if you have evidence of a memory leak let us know the details. (Just keep in mind that seeing some allocated memory not being reclaimed at a specific moment is not necessarily equivalent with a "memory leak")

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
shahidbits2012
Posts: 16
Joined: 09 Jun 2021, 07:23

Re: Memory not coming down in client after removed from room

Postby shahidbits2012 » 25 Jan 2022, 16:26

Thanks for your quick reply Lapo!

I have share more data points in the mail, please do checkout.

Return to “SFS2X Java / Android API”

Who is online

Users browsing this forum: No registered users and 10 guests