anatomy of a memcached daemon
Before you start experimenting with memcached, here's a quick description of the command line options that will be used when starting it up. (note there is no configuration file for memcached).
It seems as if the most common command line options are used: -l -d -p -m -c
Here is what each of them do, per the memcached man pages:
-l
Listen on
option to consider as there is no other way to secure the
installation. Binding to an internal or firewalled network
interface is suggested.
-d Run memcached as a daemon.
-m
Use
is 64 megabytes.
-c
Use
-p
Listen on TCP port
Here is an example command line script to fire up memcached with some options:
This will start memcached as a daemon, allocate 128 MB memory max for storage of the memcached hashed query, listen on ip address 10.0.0.40, and listen on TCP port 11211.$ memcached -d -m 128 -l 10.0.0.40 -p 11211
So that's all there is to starting the daemon with a variety of options. Note there are more options in the man pages, but the above options are enough to give it a whirl. If you ever need to stop your memcached daemons, issue the following command:$ killall memcached
Here is a couple helpful posts of using memcached with Rails:
http://townx.org/rails_and_memcached
http://nubyonrails.com/articles/2006/08/17/memcached-basics-for-rails
http://avoir.uwc.ac.za/avoir/index.php?module=wiki&pagename=MemcachedInstallDebianEtch&action=wikilink
2 comments:
Quick and useful, thanks for posting this..
Good sharing of this nice post. Thanks.
hermes lindy bag
Post a Comment