Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data are far larger in V2 #100

Open
J4z3 opened this issue Feb 6, 2021 · 2 comments
Open

Data are far larger in V2 #100

J4z3 opened this issue Feb 6, 2021 · 2 comments

Comments

@J4z3
Copy link

J4z3 commented Feb 6, 2021

Hello,

I've upgraded to V2 (2021 branch) to test it. It seems messages of "max message size" length are always sent, instead of only what is necessary.

Edit : this is only the case on reception side, i.e. messages of appropriate size are sent through the network, but OnData returns a message a max message size at the reception.

BR,
Jaze

@J4z3
Copy link
Author

J4z3 commented Feb 15, 2021

Ok, I now understand what happens (now in master = V1.6). This is due to Pool allocating byte[max_message_size] arrays. This is not too bad for a few messages due to the reuse system of the Pool class, however if a burst of messages happens, a lot of bytes are allocated and stay in the pool indefinitely for nothing.

@michaelsakharov
Copy link

This is definitely a problem in our and many other use cases.
We run a server with 250+ players at peak hours with Tons of packets actively being sent, Highest packet count we have seen at once time was about 2000 packets! with the max packet being in the MB's since the server sends Map data and everything to the client this, in theory, could allocate 20+ GB of data then just leave it in memory?

We're currently using a very old version of Telepathy back from early 2020, we're gonna upgrade anyway and for the time being remove the Pool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants