DoYouSpeakWak??
02-17-2010, 07:24 AM
Hey everybody
I got a few questions regarding memcache. After alot of searching i see very little topics that specificly talk about each line on config and what it does. And especially how to tweak it for large,medium,small sites and diffrent file types.
First off. Got any usefull links. Post them please.
This memcache
http://dk2.php.net/manual/en/book.memcache.php
< --- First question --- >
When setup. Do i need to clear the cache at some point to avoid it stacking up ?
< --- Second question --- >
When installing a deamon.
memcached -d -m 256 -l 10.0.0.40 -p 11211 -u memcached
I set the -m (stands for memory) to a certain number. Any suggestions about the size of this would be very welcome.
< --- Third one. (Going over these one by one) --- >
memcache.allow_failover "1"
(This is set to yes as standard,But why)
From the authors site
"Whether to transparently failover to other servers on errors. "
Q: What if i dont have more servers, just one server with one deamon running. Shouldnt this be uncommented in the ini file then ?
------------
memcache.max_failover_attempts "20"
Q: Same here, i still only have one server.
------------
memcache.chunk_size "8192"
Q: Makes sense.
------------
memcache.default_port "11211"
Q: Makes sense.
------------
memcache.hash_strategy "standard"
From the site
"Controls which strategy to use when mapping keys to servers. Set this value to consistent to enable consistent hashing which allows servers to be added or removed from the pool without causing keys to be remapped. Setting this value to standard results in the old strategy being used. "
Q: So if i set it to "consistent" it will enabel remapping. Is this good or bad for speed ?
------------
memcache.hash_function "crc32"
From the site
"Controls which hash function to apply when mapping keys to servers, crc32 uses the standard CRC32 hash while fnv uses FNV-1a. "
Q: So this is also related to the mapping of keys, With two diffrent options. "crc32" or "fnv" What is the diffrence if i enable remapping.
------------
session.save_handler "files"
From the site
"Use memcache as a session handler by setting this value to memcache. "
Q: Okay so i can let memcache handle sessions by chaning this to "memcache" Why should i do that, will it improve anything ?
------------
session.save_path
Q: Makes sense. But should this also be set if "session.save_handler" is set to files or only set if "session.save_handler" is set to memcache.
< --- Extended questions --- >
Things not covered by the installation guide at developers site.
More deamons. Instead of just one deamon its posible to run more at the time.
Q: Will it make memcache more effitient or faster ?
http://www.lullabot.com/articles/how_install_memcache_debian_etch
< --- Extra --- >
We will be using this for wikies,forums, blos etc. php, html,images mainly.
I hope some usefull information about the lovely software can come to light, to many all these little details are just details and hard to understand. So experts out there, Show us your knowledge.
I got a few questions regarding memcache. After alot of searching i see very little topics that specificly talk about each line on config and what it does. And especially how to tweak it for large,medium,small sites and diffrent file types.
First off. Got any usefull links. Post them please.
This memcache
http://dk2.php.net/manual/en/book.memcache.php
< --- First question --- >
When setup. Do i need to clear the cache at some point to avoid it stacking up ?
< --- Second question --- >
When installing a deamon.
memcached -d -m 256 -l 10.0.0.40 -p 11211 -u memcached
I set the -m (stands for memory) to a certain number. Any suggestions about the size of this would be very welcome.
< --- Third one. (Going over these one by one) --- >
memcache.allow_failover "1"
(This is set to yes as standard,But why)
From the authors site
"Whether to transparently failover to other servers on errors. "
Q: What if i dont have more servers, just one server with one deamon running. Shouldnt this be uncommented in the ini file then ?
------------
memcache.max_failover_attempts "20"
Q: Same here, i still only have one server.
------------
memcache.chunk_size "8192"
Q: Makes sense.
------------
memcache.default_port "11211"
Q: Makes sense.
------------
memcache.hash_strategy "standard"
From the site
"Controls which strategy to use when mapping keys to servers. Set this value to consistent to enable consistent hashing which allows servers to be added or removed from the pool without causing keys to be remapped. Setting this value to standard results in the old strategy being used. "
Q: So if i set it to "consistent" it will enabel remapping. Is this good or bad for speed ?
------------
memcache.hash_function "crc32"
From the site
"Controls which hash function to apply when mapping keys to servers, crc32 uses the standard CRC32 hash while fnv uses FNV-1a. "
Q: So this is also related to the mapping of keys, With two diffrent options. "crc32" or "fnv" What is the diffrence if i enable remapping.
------------
session.save_handler "files"
From the site
"Use memcache as a session handler by setting this value to memcache. "
Q: Okay so i can let memcache handle sessions by chaning this to "memcache" Why should i do that, will it improve anything ?
------------
session.save_path
Q: Makes sense. But should this also be set if "session.save_handler" is set to files or only set if "session.save_handler" is set to memcache.
< --- Extended questions --- >
Things not covered by the installation guide at developers site.
More deamons. Instead of just one deamon its posible to run more at the time.
Q: Will it make memcache more effitient or faster ?
http://www.lullabot.com/articles/how_install_memcache_debian_etch
< --- Extra --- >
We will be using this for wikies,forums, blos etc. php, html,images mainly.
I hope some usefull information about the lovely software can come to light, to many all these little details are just details and hard to understand. So experts out there, Show us your knowledge.
