How to reduce memory footprint of RedisClient #2915
Labels
status: feedback-reminder
We've sent a reminder that we need additional information before we can continue
status: waiting-for-feedback
We need additional information before we can continue
Current Behavior
We noticed that each lettuce client uses ~4 MB of memory even when we are not issuing large commands that are several MBs in size to Redis. I would expect ~KBs of memory usage in our case.
I did a heap dump analysis and observed those
byte[]
buffers are allocated fromio.lettuce.core.protocol.CommandHandler
andio.lettuce.core.protocol.RedisStateMachine
Input Code
Input Code
Expected behavior/code
Is this expected behavior? If so, are there ways for me to reduce the memory footprint of lettuce clients?
We are running on a relatively memory constraint system with only ~1GB of memory. We configured about 570MB of direct memory. (i.e. JVM config parameter
-Xms256m -Xmx640m -XX:MaxDirectMemorySize=570m -DdirectMemorySoftLimit=320m
). We can support more lettuce client connections if the memory footprint can be lowered here.Environment
The text was updated successfully, but these errors were encountered: