Closed GoogleCodeExporter closed 9 years ago
What problem do you have that you believe is not served currently? It is not
clear from your bug.
Original comment by dsalli...@gmail.com
on 10 Jun 2010 at 11:06
[deleted comment]
I've read that spymemcached is a single-threaded client, but memcahced server
supports multiple threads. In my web application Apache Tomcat creates many
parallel threads for each user. So, I want as fast as possible application. All
of this threads should work in parallel don't waiting while some thread
read/write value from/to the memcached server.
Original comment by Alexander.Petrichkovich@gmail.com
on 11 Jun 2010 at 10:51
Use one spymemcached client for all of your threads. If you are able to detect
that it is in any way a performance bottleneck, create a pool of two or three.
More threads ≠ more faster unless you're actually CPU bound and have idle
cores to spin up. In a typical network application, you can run a lot faster
with fewer threads than you can with more.
Original comment by dsalli...@gmail.com
on 11 Jun 2010 at 5:31
[deleted comment]
Web application is highly loaded social network. On this time number of
processors is 4 each with 12 cores (total number of cores is 48)... I think it
is not right way to use few clients. What to do when number of servers will be
1000?
Solution should be scalable.
Original comment by Alexander.Petrichkovich@gmail.com
on 11 Jun 2010 at 7:14
Do you have any evidence that it's not? It sounds like you have an idea of how
it should work and with your idea of how it should work you're deciding it
wouldn't perform well.
Please try my idea of how it works and suggest specific things that would
benefit you after your testing.
Original comment by dsalli...@gmail.com
on 11 Jun 2010 at 9:17
Hi, I've tested array of clients and according on results I can do the next
assumptions:
1. memcached 1.4.5 supports multi-threading by default.
2. the optimal number of clients depends on number of cores.
So, YOUR solution to use a pool is simple and nice :)
Hmm, now there is a one thing what is interesting for me: in this time I don't
know why, for example, 2 methods 'MemcachedClient.set()' can't be executed in
the same time... Is there some 'synhrozed method' in spymemcached client or
something else?
Original comment by Alexander.Petrichkovich@gmail.com
on 14 Jun 2010 at 10:47
You can call set, or get, or anything else you want from as many threads as you
want concurrently. The only time you should worry about pooling is when you've
proven that that you're saturating a core with the client and have more
processing power to spare.
Original comment by dsalli...@gmail.com
on 14 Jun 2010 at 10:52
Original issue reported on code.google.com by
Alexander.Petrichkovich@gmail.com
on 10 Jun 2010 at 7:25