Memcached

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
(链接)
 
(未显示1个用户的11个中间版本)
第1行: 第1行:
 +
{{SeeWikipedia}}
 +
 
memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
 
memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
  
[http://www.example.net.cn/archives/2006/01/eoamemcachedoea.html 使用memcached进行内存缓存]
+
==安装==
==Install==
+
 
  ./configure; make; make install
 
  ./configure; make; make install
  memcached -d -m 2048 -p 11211
+
  /usr/local/bin/memcached -m 300 -l 127.0.0.1 -p 11211 -d -u root
 
可能需要 export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
 
可能需要 export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
 +
 +
/usr/local/bin/memcached -m 300 -l 127.0.0.1 -p 11211 -d -u root -P /var/run/memcached.pid -c 128 -vv
 +
选项 说明
 +
*-p 使用的TCP端口。默认为11211
 +
*-m 最大内存大小。默认为64M
 +
*-vv 用very vrebose模式启动,调试信息和错误输出到控制台
 +
*-d 作为daemon在后台启动
 +
*-c 最大运行的并发连接数,默认是1024,按照服务器的负载量来设定
 +
*-P 设置保存Memcache的pid文件
 +
*-l 监听的服务器IP地址,如果有多个地址的话
 +
*-u 运行Memcache的用户,默认不能用root启动,所以当前用户为root用户时,需要用-u参数来指定
 +
 
==用户==
 
==用户==
 +
[[文件:Twitter-Cache.png|right|thumb|Twitter Cache]]
 
*http://twitter.com/ [http://www.infoq.com/cn/news/2009/06/Twitter-Architecture Twitter中间业务层件使用了Memcached]
 
*http://twitter.com/ [http://www.infoq.com/cn/news/2009/06/Twitter-Architecture Twitter中间业务层件使用了Memcached]
 
*[http://www.fotolog.com/ Fotolog.com] - the world's largest photo blogging community
 
*[http://www.fotolog.com/ Fotolog.com] - the world's largest photo blogging community
第18行: 第32行:
 
*http://www.meetup.com/ - [http://www.whalin.com/memcached/ memcached client for java]
 
*http://www.meetup.com/ - [http://www.whalin.com/memcached/ memcached client for java]
 
*[http://code.google.com/p/hibernate-memcached/ Memcached based second level cache for Hibernate]
 
*[http://code.google.com/p/hibernate-memcached/ Memcached based second level cache for Hibernate]
==Links==
+
 
*http://www.danga.com/memcached/
+
==链接==
*http://docs.huihoo.com/memcached/
+
*[http://memcached.org/ Memcached官网]
*http://download.huihoo.com/memcached/
+
*[http://docs.huihoo.com/memcached/ Memcached文档]
 +
*[http://code.google.com/p/memcached/ Memcached在Google Code]
 +
 
 +
{{comment}}
 +
 
 +
[[Category:Memcached]]
 +
[[Category:Cache]]

2010年11月27日 (六) 01:24的最后版本

Wikipedia-35x35.png 您可以在Wikipedia上了解到此条目的英文信息 Memcached Thanks, Wikipedia.

memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

[编辑] 安装

./configure; make; make install
/usr/local/bin/memcached -m 300 -l 127.0.0.1 -p 11211 -d -u root 

可能需要 export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

/usr/local/bin/memcached -m 300 -l 127.0.0.1 -p 11211 -d -u root -P /var/run/memcached.pid -c 128 -vv 选项 说明

  • -p 使用的TCP端口。默认为11211
  • -m 最大内存大小。默认为64M
  • -vv 用very vrebose模式启动,调试信息和错误输出到控制台
  • -d 作为daemon在后台启动
  • -c 最大运行的并发连接数,默认是1024,按照服务器的负载量来设定
  • -P 设置保存Memcache的pid文件
  • -l 监听的服务器IP地址,如果有多个地址的话
  • -u 运行Memcache的用户,默认不能用root启动,所以当前用户为root用户时,需要用-u参数来指定

[编辑] 用户

Twitter Cache

we introduced memcache, creating a distributed 30-server cluster with 4 gigs available in total and made a very minor code mod to use memcache, and our peak period load times dropped back down to the 2 second or so range.

[编辑] 链接

Comment-32x32.png

<discussion>characters_max=300</discussion>

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱