Redis maxReadPoolSize and maxWritePoolSize

340 views
Skip to first unread message

Carlos Mendes

unread,
Mar 29, 2011, 12:07:35 PM3/29/11
to servic...@googlegroups.com
Hi,

I'm trying ServiceStack Redis Client.

Can someone explain or share some experience about which values to use on maxReadPoolSize and maxWritePoolSize?

Thanks in advance

Demis Bellot

unread,
Mar 29, 2011, 12:17:42 PM3/29/11
to servic...@googlegroups.com, Carlos Mendes
Ummm, the higher it is, the less locking you will have :) 

So these options only exist on the pooled RedisClientsManager and you can basically think about it like a database connection pool. Each item in the pool maintains a connection to Redis, the architecture of redis (i.e. event-loop) means that connections are really cheap, so you don't need to worry about hurting redis here, what you want is to aim for a number that is around your max concurrent connections or perhaps 2x your average concurrent connections so you in most cases your requests are not blocked waiting for a connection to be free. 

At a guess at a tangible number I would guess somewhere in the range of 10-100?

Note: The if your redis server is on the same server then its best to use BasicRedisClientsManager which provides no connection pooling but is faster because establishing a new TCP connection on localhost everytime is effectively a NO OP so there are no inherent benefits of sharing a connection.

Hope this helps!

Cheers,

Carlos Mendes

unread,
Mar 29, 2011, 1:01:22 PM3/29/11
to servic...@googlegroups.com, Carlos Mendes, Demis Bellot
I will try it with something around 50 to see how it performs since Redis is running in another server.

Thank you for the fast and informative reply. 

Reply all
Reply to author
Forward
0 new messages