lishunli / xmemcached

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

sizing hearbeat thread pool #257

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use xmemcached on multiple processors server (assume number of processors is 
256)
2. heartBeatThreadPool created with 256 threads

What is the expected output? What do you see instead?
Size of the heartBeatThreadPool should be same as number of memcached server, 
according to code MemcachedHandler.start().

public void start() {
    int serverSize = this.client.getAvaliableServers().size();
    this.heartBeatThreadPool = Executors
    .newFixedThreadPool(serverSize == 0 ? Runtime.getRuntime()
        .availableProcessors() : serverSize);
}

What version of the product are you using? On what operating system?
1.4.1, Unix

Please provide any additional information below.
I realized in version 1.4.2, size of the heartBeatThreadPool changed to use 
number of processors as default. Is it possible to allow sizing of the hearbeat 
thread pool? Our system has 256 logical processors, it results in a 
heartBeatThreadPool with 256 threads which used up a lot of native memory.

Original issue reported on code.google.com by juanxiao...@gmail.com on 26 Jul 2013 at 3:29

GoogleCodeExporter commented 9 years ago
All right, i wil change it to be configured.Thanks.

Original comment by killme2...@gmail.com on 26 Jul 2013 at 3:33