Limit memory allocation per server.

Skip to first unread message

Laura G

Sep 4, 2023, 4:15:39 AM9/4/23
to Netty discussions
Hi team, 

Is it possible to restrict how much direct memory a netty server can allocate from the maxDirectMemory available?

We have the following scenario:
1 machine has multiple private IPs attached, and for each IP a server is started. Those servers are not all active at the same time (let's say 50% of them are idle). The active servers can allocate all direct memory leaving the other server starving if they become active. We are trying to avoid this.

Is it possible to split the available direct memory equally to the number of servers so that each server gets its piece of memory?

The same scenario can occur at Thread level, where some threads get all the memory available to the server leaving the other threads without memory to allocate. Any limit it can be applied at thread level for how much memory they can allocate?

Looking forward to hearing from you.

Thank you,

Laura G

Sep 27, 2023, 12:04:39 PM9/27/23
to Netty discussions
Anyone has any idea for this?
Thank you!
Reply all
Reply to author
0 new messages