Renchunbing / xmemcached

Automatically exported from code.google.com/p/xmemcached
Apache License 2.0
1 stars 0 forks source link

如何定义xmemecache参数,达到性能最优 #115

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
HI:
    这边需求是存储大约3000W的item,容量大约为15G, 并发在200左右,  缓存服务器有两台linux机器 ,内存足够。

    现在在两台服务器共起了6个memcached进程, 有多个xmemcached Client,下面是我设置的参数:
MemcachedClientBuilder builder = 
            new XMemcachedClientBuilder(AddrUtil.getAddresses(cacheConfig.getServiceContent())); 
builder.setConnectionPoolSize(cacheConfig.getConnectionPool());
builder.setCommandFactory(new TextCommandFactory());
builder.setSessionLocator(new KetamaMemcachedSessionLocator());
builder.setTranscoder(new SerializingTranscoder());
builder.setFailureMode(true);

this.memcachedClientExt.getTranscoder().setCompressionThreshold(10*1024); 
this.memcachedClientExt.setConnectTimeout(10*1000);
this.memcachedClientExt.setHealSessionInterval(24*60*60*1000);     
this.memcachedClientExt.setEnableHeartBeat(false);  

请问如何调整参数能达到最优化。 

Original issue reported on code.google.com by cscpsw...@gmail.com on 23 Mar 2011 at 2:22

GoogleCodeExporter commented 9 years ago
一切以测试数据为准,基本原则见
http://www.blogjava.net/killme2008/archive/2010/07/08/325564.htmlhttp://www.blog
java.net/killme2008/archive/2010/07/08/325564.html

Original comment by killme2...@gmail.com on 23 Mar 2011 at 12:43

GoogleCodeExporter commented 9 years ago
粘帖了两次,正确链接如下:

http://www.blogjava.net/killme2008/archive/2010/07/08/325564.html

Original comment by killme2...@gmail.com on 24 Mar 2011 at 8:15