java client locking issue

Muruga Chinnananchi murugac at gmail.com
Wed Apr 4 21:53:31 UTC 2007


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)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20070404/6b93c3cd/attachment.html


More information about the memcached mailing list