Information Technology Consulting Service

www.katarincic.com


Welcome Guest Search | Active Topics | Members | Log In

memcached Options · View
scott
Posted: Friday, October 09, 2009 3:02:32 PM
Rank: Administration
Groups: Member

Joined: 3/24/2008
Posts: 2,804
Points: 5,588
Location: South Florida USA
scott
Posted: Wednesday, February 09, 2011 4:03:50 PM
Rank: Administration
Groups: Member

Joined: 3/24/2008
Posts: 2,804
Points: 5,588
Location: South Florida USA
https://github.com/enyim/EnyimMemcached/wiki/MemcachedClient-Configuration

Quote:

Defines how the client should handle the connections to the Memcached servers. All attributes are optional.

■minPoolSize: The minimum number of connections opened to each Memcached server. Default is 10.
■maxPoolSize: The maximum number of connections that can be opened to each Memcached server. Default is 20.
■connectionTimeout: The amount of time the client is waiting to establish a connection to the memcached server. If it times out the current operation will fail and the node will be marked as unresponsive.
■deadTimeout: The amount of time the client is waiting to check the state of an unresponsive node. Default is 00:00:10.
■queueTimeout: The amount of time the client is waiting to acquire a socket when the pool reached maxPoolSize. If it times out the current operation will fail and the node will be marked as unresponsive. Default is 00:00:00.100 (100msecs). New in 2.8+


Both minPoolSize and maxPoolSize must be greater than zero. The recommended value for maxPoolSize is 0.75 * (number of threads) to avoid thread starvation when one of the nodes becomes unresponsive.

The connection pool works the following way:

1.When the client is initialized, it opens minPoolSize connections to each server defined in memcached/servers. The client will wait for connectionTimeout to establish a connection. If it expires, the node will be marked as dead.
2.Each operation takes a socket from the pool
3.If the pool has no unused connection but it did not reach maxPoolSize, then a new socket will be created. The client will wait for connectionTimeout to establish the connection. If it expires, the node will be marked as dead.
4.If the pool has no unused connection and it did reach maxPoolSize (a semaphore is used to track this), the client will wait for queueTimeout. If it still cannot acquire one, the node will be marked as dead. The the pool only gets full when a) maxPoolSize is to low while the load is high, or b) a node goes down. A low value here ensures that the application will not eat up all threads while waiting for all connections to timeout when a node goes down.
5.The first time a node goes down a timer will be started which will periodically (see deadTimeout) check the marked nodes if they are available. The timer will be stopped when all nodes come online.
Note: maxPoolSize had a much larger value in 2.6 and below. Until you can upgrade it's recommended to set to the optimal value in your configuration files manually (see above).




scott
Posted: Wednesday, February 09, 2011 4:04:29 PM
Rank: Administration
Groups: Member

Joined: 3/24/2008
Posts: 2,804
Points: 5,588
Location: South Florida USA
memcached Telnet Interface

http://lzone.de/articles/memcached.htm

scott
Posted: Wednesday, February 09, 2011 4:20:57 PM
Rank: Administration
Groups: Member

Joined: 3/24/2008
Posts: 2,804
Points: 5,588
Location: South Florida USA
scott
Posted: Wednesday, February 09, 2011 4:26:17 PM
Rank: Administration
Groups: Member

Joined: 3/24/2008
Posts: 2,804
Points: 5,588
Location: South Florida USA
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

SoClean Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.6 (NET v2.0) - 11/14/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.
This page was generated in 0.060 seconds.