I have mdb - message driven bean, that process hundreds messages per
minute. I want to update memcache on every message - this is very
frequently. But if i make my mdb singleton it will process messages
sequentially, so the next update will be done when the previous is
finished. Is this a problem?
Regards.
--
Marc Bollinger
mboll...@gmail.com
There must be something terribly wrong with your application or
configuration.
Last time I measured, I was doing 90,000 per second on my laptop
(just relative numbers, I was working on a java client improvement
which I brought up from about 45,000/s for the same test).
I don't see problems at 10tps on my old hard drives.
What kinds of problems were you seeing? Do you have code we can
perhaps help straighten out?
The only problem we had was the terrible slow .net serialization and
the md5 computed when we plug hibernate with memcached.
In my experience, the bottlenecks at the clients arise far more often
than in the server.
--
Sent from my mobile device
Quidquid latine dictum sit, altum sonatur. ;-)
http://code.google.com/p/spymemcached/
- Nelz
Anyway, how healthy is your network?.
Have you tried running memcached with -vv (two 'v' and not a 'w' and)
and see the log in the server?
On Thu, Feb 25, 2010 at 1:56 PM, mariyan nenchev
<nenchev...@gmail.com> wrote:
> Hi, it is not up to me to change the client.
>
--
So do you had the java virtual machine and the memcached runing in the
box while you got those errors?. If so, forget about the network. But
you could check how busy is your box when you start those threads
(mem, cpu)
On the other hand, see the log in the memcached server. Start it like
memcached <your usual configuration> -vv 2>/tmp/log
and see what appears in the log file.
Also see syslog file.
On Thu, Feb 25, 2010 at 2:35 PM, mariyan nenchev
On Thursday, February 25, 2010, mariyan nenchev
<nenchev...@gmail.com> wrote:
> What will happen if i create 5000 threads(5000 users update simultaniosly) to update the cache just once at the same time?
>
--
awl
Unless your box has 5,000 cores, your application is going to fall
apart in all kinds of other exciting ways here. It's certainly not
going to happen all at the same time anyway.
You're far better off running that work an ExecutorService.
But in general, spymemcached doesn't care how many threads you're
using. There are only practical limitations (e.g. you don't have
5,000 cores so you have a lot of threads waiting for a CPU to become
available for each app thread, spymemcached thread, memcached thread,
etc...) and small contention points while enqueuing commands.