Memcache支持线程

原贴:http://blog.csdn.net/heiyeshuwu/archive/2007/09/11/1780058.aspx

 [Tips]Memcache支持线程   <script src="http://blog.csdn.net/count.aspx?ID=1780058&Type=Rank" type="text/javascript"></script> 文章指数:0   CSDN Blog推出文章指数概念,文章指数是对Blog文章综合评分后推算出的,综合评分项分别是该文章的点击量,回复次数,被网摘收录数量,文章长度和文章类型;满分100,每月更新一次。

我读代码读出来的,对应的版本是 memcached-1.2.2 ,大致要支持多线程,在安装的时候必须打开:
./configure --enable-threads

安装完之后,启动的时候看看帮助信息有没有这条:
-t <num>       number of threads to use, default 4
如果有,说明已经支持了线程,就可以在启动的时候使用 -t 选项来启动多线程

然后启动的时候必须加上你需要支持的线程数量:
/usr/local/memcache/bin/memcached -t 1024 



Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1780058


<script src="http://localhost:82/PromoteIcon.aspx?id=1780058" type="text/javascript"></script> [ 收藏到我的网摘]   [ 发送Trackback]  heiyeluren发表于 2007年09月11日 08:43:00
<script type="text/javascript">function hide(){showComment();}</script>
相关文章:


特别推荐: 关闭
<script type="text/javascript">document.write(" ");</script>

评论

#      Sparkle 发表于2007-09-13 14:06:06  IP: 218.107.30.*
哪用读代码,doc/threads.txt里面就写着了

建议多少个cpu就用多少个thread

Once you have a thread-capable memcached executable, you can control the
number of threads using the "-t" option; the default is 4. On a machine
that's dedicated to memcached, you will typically want one thread per
processor core. Due to memcached's nonblocking architecture, there is no
real advantage to using more threads than the number of CPUs on the machine;
doing so will increase lock contention and is likely to degrade performance.

不建议用thread
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值