You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In non-unaryRequest mode, 4096 bytes of off-heap memory will be re-applied for each message If you send small packet requests frequently (for example, 100 bytes each time), a lot of external memory will be wasted, and this 4096 optimization logic will not take effect.
The text was updated successfully, but these errors were encountered:
Yeah, it does seem we would keep allocating the 4k and then only using a small part. commitToSink() will clear the buffer and it won't be used across messages.
Are you sending many small messages at once, where we could batch them? Or are you needing to send each of the small messages immediately, without waiting for further small messages?
We could remove the MIN_BUFFER part. I'd have to look further if there are any implications there. For many messages sent back-to-back, it'd be good to provide a corking API (which would avoid calling flush() after each message), so that they could be encoded into a single buffer.
ejona86
changed the title
The optimization of applying for a minimum of 4096 off-heap memory per request has no effect in non-unaryRequest mode
netty: The optimization of applying for a minimum of 4096 off-heap memory per request has no effect in non-unaryRequest mode
Jan 9, 2025
ClientCallImpl:
MessageFramer:
NettyWritableBufferAllocator:
In non-unaryRequest mode, 4096 bytes of off-heap memory will be re-applied for each message
If you send small packet requests frequently (for example, 100 bytes each time), a lot of external memory will be wasted, and this 4096 optimization logic will not take effect.
The text was updated successfully, but these errors were encountered: