Replies: 1 comment
-
|
Hi Amod, We've struggled with tuning these settings as well so I'm not sure how much help I'll be, but you can see that all the async Redisson tasks (e.g. lock renewal tasks, map eviction tasks, etc) extend io.netty.util.TimerTask, so these are all using your Netty thread pool which is controlled by nettyThreads (default 32). We actually ended up setting nettyThreads to 64 because we had issues with RLock renewals not being processed quickly enough and getting expired by async Redisson cleanup threads. If you have a lot of RLock or RMap usage, you may want to increase nettyThreads so that async tasks aren't starved. I'm not sure what other tasks Netty threads are used for in Redisson. The master and slave connection pool sizes define how many concurrent connections you can have to the master and slave servers, and so aren't directly related to nettyThreads but to how many concurrent actions you will have executing in your server at peak. Beyond that number you will see contention for Redis connections. Master & slave connection pool sizes default to 64. So tune that appropriately based on the number of concurrent server threads. If you are interacting with many Redisson objects inside each thread, then you may need to increase nettyThreads as we have done. For item 4 above, I think you would be fine with default connection pool sizes since you should have peak usage of 20 Redisson connections. Same for netty threads since the async activity would be pretty low with only a single RMap. Adjust each separately as you increase concurrent threads and/or Redisson objects per thread. Sorry, I have no experience with RTopic so I can't provide any insight for #5. Hope this helps! Cheers, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
A. org.redisson.config.Config class has setNettyThreads() api.
B. SingleServerConfig/BaseMasterSlaveServersConfig class has setM 8000 asterConnectionPoolSize/setSlaveConnectionPoolSize methods
Assume:
How does executing a single command (e.g. single get/set call on Rmap object or any other redission object) uses connection/netty threads?
What is the relation between netty thread & connection?
Is there any ratio that is advised between nettyThreads & connectionPool size?
Lets say my application is creating 20 application threads.
All operations on redis via redisson library objects (such as RMap etc) are going to be executed from these 20 application threads only.
For such configuration, what should be size of setNettyThreads/setMasterConnectionPoolSize/setSlaveConnectionPoolSize
As per java doc for org.redisson.config.Config, setThreads() is used for listeners of RTopic object/RRemoteService/RExecutorService tasks.If I am not using RTopic object/RRemoteService/RExecutorService tasks related functionality, can I set setThreads to a very low value. Does redission client internally uses it for other internal things?
Could anyone provide more information on above points?
I would be grateful for any insights/ on these points.
Thanks & Regards,
Amod
Beta Was this translation helpful? Give feedback.
All reactions