slimina / xmemcached

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

关于配置readThread的问题 #266

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
你好,以前用xmemcache的做性能测试的时候发现在多个xmemcached�
��候,会有大量的read线程hold住了,TPS一直都上不去,后来查�
��xmemcached的手册,需要配置readThread数量,最近看了xmemcached的
源码其实作者已经区别的对于Linux环境的不同处理,下面是贴
出来的xmemcachClient类源码一段设置
private final void optimiezeSetReadThreadCount(Configuration conf,
            int addressCount) {
        if (conf != null && addressCount > 1) {
            if (this.isLinuxPlatform()
                    && conf.getReadThreadCount() == DEFAULT_READ_THREAD_COUNT) {
                int threadCount = 2 * SystemUtils.getSystemThreadCount();
                conf
                        .setReadThreadCount(addressCount > threadCount ? threadCount
                                : addressCount);
            }
        }
    }

但是判断是否是Linux的平台是根据java的系统os.name变量,但是�
��些应用跑在aix,Solaris的unix环境,现在回想起来那时候的系�
��测试正好是一个aix环境,不知道这个算不算问题。

Original issue reported on code.google.com by lishi...@126.com on 9 Sep 2013 at 8:22

GoogleCodeExporter commented 9 years ago
感谢你的建议,我修改为判断是否为windows系统。

Original comment by killme2...@gmail.com on 27 Oct 2013 at 7:39