java memcached client

Greg Whalin gwhalin at gmail.com
Wed Jan 2 12:34:18 UTC 2008


Your config looks fine to me (though a maint sleep of 1 sec is pretty
aggressive and will likely cause some performance issues).  As to other
branches, nothing I can do if people do not choose to send them back
upstream.  That said, I am fairly confident their are no threading issues
which would cause what you are seeing.  This would be the only report and
the client is in heavy use by many deployments w/ no bug reports matching
this.  The threading issues that do exist in the version you are running are
more due to excessive locking and thread contention.  Those are mostly gone
in the trunk version.  The trunk version also merged in the consistent
hashing from the ketama branch, but that branch itself is way out of date
and filled w/ bugs that have been fixed.  Some pretty bad.

gw

On Jan 2, 2008 5:38 AM, André Cruz <andre.cruz at co.sapo.pt> wrote:

> Hello Greg.
>
> On 2007/12/28, at 21:02, Greg Whalin wrote:
>
> > Sorry for not responding sooner.  I have been out of town for the
> > holidays.  This does not correspond to any known or reported bug in
> > the Java client I am maintaining and it is in heavy use at quite a
> > few heavy installations.  Not saying that it is out of the question,
> > but definitely not something I am aware of.  Looking at the debug,
> > the client is simply spitting out the response it received from the
> > server.  How have you configured your client install (did you follow
> > the HOWTO document from the site)?
> >
>
> Yes I did. Here is some code:
>
>                String serverList = ctx.getInitParameter
> (MEMCACHE_SERVERS_INIT_PARAM);
>                timeout = 1000 *
> Long.parseLong(ctx.getInitParameter(TIMEOUT_INIT_PARAM));
>
>                pool = SockIOPool.getInstance();
>
>                if (serverList != null) {
>                        String[] memcaches = serverList.split(" ");
>                        if (memcaches.length > 0) {
>                                pool.setServers(memcaches);
>
>                        }
>                }
>
>                pool.setInitConn(5);
>                pool.setMinConn(5);
>                pool.setMaxConn(50);
>                pool.setMaintSleep(1000);
>
>                pool.setHashingAlg(SockIOPool.NEW_COMPAT_HASH);
>                pool.setNagle(false);
>                pool.initialize();
>
>
>
> I then use SockIOPool.getInstance() in various places in my code to
> access memcache. Are there threading issues I should be aware of?
>
> Also, I got an email from hanson.char at gmail.com saying:
>
> > Hi André,
> >
> > I am using the java memecached client 1.6.1 with the SockIOPool
> > replaced with ketama for consistent hashing.  I did find some
> > threading issue and fixed them.  So currently the one I have seems to
> > be running fine.  Are you interested to try out my version of the java
> > memcached client to see if it still has the same problem ?
>
>
> I don't know why he didn't submit them but maybe it would be
> productive if you two synched?
>
> Thanks for the help,
> André Cruz




-- 
Greg Whalin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20080102/1ed981ac/attachment.html 


More information about the memcached mailing list