Git Product home page Git Product logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 2, 2024
i've seen this too with spymemcached 2.1/memcached 1.2.6 on rhel3, single 
instance.

i looked into this a little and spymemcached uses the add method on the blocking
queue when adding an operation.  would it be possible to use offer and throw 
some
sort of checked exception when the queue is full?  

since the runtime exception was hidden in the implementation of spymemcached 
its not
obvious that this is something that should be handled by the caller.

thanks.

Original comment by [email protected] on 5 Nov 2008 at 7:08

from spymemcached.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 2, 2024
While I breakdown the 30000 request into e.g. three spymemcache client 
instances, 
i.e 3 IO threads. It exception could be avoided. And the performace of set() 
get() 
is almost the same as ONE IO thead.

I think that it would not occur in small scale system. But it should be taken 
into 
account for visit heavy application
Though the non blocking theory just need one IO thread, but I propose that 
provided 
a thead pool machanism just to avoid this problem. 

Original comment by [email protected] on 5 Nov 2008 at 7:13

from spymemcached.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 2, 2024
The exception can be documented, but I'm strongly against making this a checked
exception.  It's very unlikely to show up in any real production environment, so
having everyone pay a coding penalty for it seems like it'd just make for a lot 
of
bad code.

It does show up a lot in tests because people have no problems writing tests to
trigger it.  If your test did a bunch of set() calls and get() calls 
interleaved, you
wouldn't see it.  If it did all get() calls, you wouldn't see it.

The only time you're likely to see it is if you either do a large number of 
set()
calls in a fast loop without ever checking their results or synchronizing on any
other operation.

Pooling connections is certainly a good idea for some reasons.  It should be 
done
intelligently, though.  Gets in particular need to try to hash an affinity to a
connection for performance reasons.  It's a little complicated, and *really* 
hard
without a proper interface over the client.  :(

I'm going to declare this a documentation bug to be fixed in the next minor 
release
of 2.2.

Original comment by [email protected] on 5 Nov 2008 at 7:18

  • Changed state: Accepted
  • Added labels: Component-Docs, Milestone-Release2.2

from spymemcached.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 2, 2024
pushed

Original comment by [email protected] on 7 Nov 2008 at 4:35

  • Changed state: Fixed

from spymemcached.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.