You are likely running into lock contention w/in the client when it comes to maintaining the pool size. There is definitely room for improvement in this regard. However, those pool settings are insanely aggressive for most usage, and somewhat defeat the point of running with a pool. We do a pretty high number of memcache hits in our cluster, and run w/ much less aggressive pool settings. Also, curious as to which version of the client you are running with?
<br><br>gw<br><br><div><span class="gmail_quote">On 4/4/07, <b class="gmail_sendername">Muruga Chinnananchi</b> <<a href="mailto:murugac@gmail.com">murugac@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I was trying to use the one memcahed server with the java client on the same machine. i tried with 100 threads using the MemcachedClient using the same socket pool (with 300 socket connections minimum), after few seconds all the threads getting locked at
com.danga.MemCached.SockIOPool.checkIn. I wanted to measure the memcached performance numbers with lots of threads concurrently executing the getMulti( ) method. <br><br>Using 1 thread, i get 150 msec response..when i tried with 5 threads i get 350 msec average...as i increase the threads the the response is slower and slower (2000 msecs average). Am i missing some configurations?, here is my config.
<br><br>SockIOPool pool = SockIOPool.getInstance( "test" );<br>pool.setServers(serverlist);<br><br> pool.setInitConn( 100 );<br> pool.setMinConn( 100 );<br> pool.setMaxConn( 500 );<br>
pool.setMaintSleep( 30 );<br> pool.setAliveCheck( true );<br><br> pool.setNagle( false )<br><br>"Thread-100" prio=1 tid=0x083c8168 nid=0x1144 runnable [0xaee92000..0xaee93040]<br> at com.danga.MemCached.SockIOPool.addSocketToPool
(SockIOPool.java:963)<br> at com.danga.MemCached.SockIOPool.checkIn(SockIOPool.java:1047)<br> - locked <0x891392b8> (a com.danga.MemCached.SockIOPool)<br> at com.danga.MemCached.SockIOPool.checkIn(SockIOPool.java
:1062)<br> at com.danga.MemCached.SockIOPool$SockIO.close(SockIOPool.java:1509)<br> at com.danga.MemCached.MemCachedClient.getMulti(MemCachedClient.java:1217)<br> at com.danga.MemCached.MemCachedClient.getMulti(
MemCachedClient.java
:1141)<br> at com.danga.MemCached.test.MyBench$bench.run(FeeddoBench.java:136)<br>....<br>...<br>"Thread-3" prio=1 tid=0x0817b550 nid=0x10e3 waiting for monitor entry [0xb1f73000..0xb1f740c0]<br> at com.danga.MemCached.SockIOPool.getConnection
(SockIOPool.java:874)<br> - waiting to lock <0x891392b8> (a com.danga.MemCached.SockIOPool)<br> at com.danga.MemCached.SockIOPool.getSock(SockIOPool.java:716)<br> at com.danga.MemCached.MemCachedClient.getMulti
(MemCachedClient.java:1205)<br> at com.danga.MemCached.MemCachedClient.getMulti(MemCachedClient.java:1141)<br> at com.danga.MemCached.test.MyBench$bench.run(FeeddoBench.java:136)<br><br>....<br>"Thread-0" daemon prio=1 tid=0x081794b8 nid=0x10e0 waiting for monitor entry [0xb20f6000..0xb20f6e40]
<br> at com.danga.MemCached.SockIOPool.selfMaint(SockIOPool.java:1161)<br> - waiting to lock <0x891392b8> (a com.danga.MemCached.SockIOPool)<br> at com.danga.MemCached.SockIOPool$MaintThread.run(SockIOPool.java
:1310)<br>
</blockquote></div><br><br clear="all"><br>-- <br>Greg Whalin