Usage of Direct and Mapped Buffer Pools

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

Moderators: Lapo, Bax

pratts
Posts: 34
Joined: 23 Aug 2016, 17:46

Usage of Direct and Mapped Buffer Pools

Postby pratts » 19 Apr 2017, 07:15

Hello,
Do you use direct and mapped buffer pools in Smartfox server ?
I don't have much idea about them, and was reading a post about them.
I recently used visualvm and saw both buffer pools and memory allocated to them. When I tried to connect 30+ users from JS client, memory in both
pools increased and was not released when they left(disconnected).
I guess they are not even garbage collected because when I forced GC, their memory usage was not reduced.
When is their memory freed ?
Is this increases in memory and not freeing a cause of worry ?

Thank you
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Usage of Direct and Mapped Buffer Pools

Postby Lapo » 19 Apr 2017, 09:08

pratts wrote:Hello,
Do you use direct and mapped buffer pools in Smartfox server ?
I don't have much idea about them, and was reading a post about them.
I recently used visualvm and saw both buffer pools and memory allocated to them. When I tried to connect 30+ users from JS client, memory in both
pools increased and was not released when they left(disconnected).
I guess they are not even garbage collected because when I forced GC, their memory usage was not reduced.
When is their memory freed ?
Is this increases in memory and not freeing a cause of worry ?

No, we don't use direct buffers.
keep in mind that there is no such thing as "forcing GC" in Java. You can simply signal the GC that now is a good time to clear up some memory, but the GC might ignore your notification anyway.

I don't think you should really worry. The server is battle-tested against hundreds of thousand of concurrent users and there's no known memory issues.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
pratts
Posts: 34
Joined: 23 Aug 2016, 17:46

Re: Usage of Direct and Mapped Buffer Pools

Postby pratts » 19 Apr 2017, 09:52

Image
This is the above picture when I connected and logged in 99 users using JS client.
There are traces of HeapByteBuffer in the heap dump also. Do you use it, since you once mentioned that you use netty for websockets ?
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Usage of Direct and Mapped Buffer Pools

Postby Lapo » 19 Apr 2017, 13:27

Could be Netty allocating some direct buffers. Still, there are no known performance issues related to Netty.
FYI, Netty is gone it in the upcoming 2.13 release. We have switched to Jetty for all web-related services.

Hope it helps
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 98 guests