java client locking issue
Greg Whalin
greg at meetup.com
Wed Apr 4 23:22:50 UTC 2007
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?
gw
On 4/4/07, Muruga Chinnananchi <murugac at gmail.com> wrote:
>
> 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.
>
> 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.
>
> SockIOPool pool = SockIOPool.getInstance( "test" );
> pool.setServers(serverlist);
>
> pool.setInitConn( 100 );
> pool.setMinConn( 100 );
> pool.setMaxConn( 500 );
> pool.setMaintSleep( 30 );
> pool.setAliveCheck( true );
>
> pool.setNagle( false )
>
> "Thread-100" prio=1 tid=0x083c8168 nid=0x1144 runnable
> [0xaee92000..0xaee93040]
> at com.danga.MemCached.SockIOPool.addSocketToPool (SockIOPool.java
> :963)
> at com.danga.MemCached.SockIOPool.checkIn(SockIOPool.java:1047)
> - locked <0x891392b8> (a com.danga.MemCached.SockIOPool)
> at com.danga.MemCached.SockIOPool.checkIn(SockIOPool.java :1062)
> at com.danga.MemCached.SockIOPool$SockIO.close(SockIOPool.java:1509)
> at com.danga.MemCached.MemCachedClient.getMulti(MemCachedClient.java
> :1217)
> at com.danga.MemCached.MemCachedClient.getMulti(MemCachedClient.java:1141)
> at com.danga.MemCached.test.MyBench$bench.run(FeeddoBench.java:136)
> ....
> ...
> "Thread-3" prio=1 tid=0x0817b550 nid=0x10e3 waiting for monitor entry
> [0xb1f73000..0xb1f740c0]
> at com.danga.MemCached.SockIOPool.getConnection (SockIOPool.java:874)
> - waiting to lock <0x891392b8> (a com.danga.MemCached.SockIOPool)
> at com.danga.MemCached.SockIOPool.getSock(SockIOPool.java:716)
> at com.danga.MemCached.MemCachedClient.getMulti (MemCachedClient.java
> :1205)
> at com.danga.MemCached.MemCachedClient.getMulti(MemCachedClient.java
> :1141)
> at com.danga.MemCached.test.MyBench$bench.run(FeeddoBench.java:136)
>
> ....
> "Thread-0" daemon prio=1 tid=0x081794b8 nid=0x10e0 waiting for monitor
> entry [0xb20f6000..0xb20f6e40]
> at com.danga.MemCached.SockIOPool.selfMaint(SockIOPool.java:1161)
> - waiting to lock <0x891392b8> (a com.danga.MemCached.SockIOPool)
> at com.danga.MemCached.SockIOPool$MaintThread.run(SockIOPool.java:1310)
>
--
Greg Whalin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20070404/ac54f7ce/attachment.htm
More information about the memcached
mailing list