On 15. juni. 2009, at 10.48, JC wrote:


Hi,

just out of curiosity, what are those tracks?
I was thinking as Jaime per slab class mutex

This mutex shouldn't really be such a big problem, because it is only used when you try to insert / modify something in your cache... (well, of course this depends on your use pattern, but are you really doing that high number of concurrent incr/decr/append/prepend/set/add/ replace ?)

and also static division
of the hashtable with specific mutex for each part; am I in the right
direction?


I have a version of memcached where I partitioned the hash into n partitions and use a mutex per partition. I have not pushed that version to github yet, because I haven't finished up benchmarking and running lock analysis on it....

Cheers,

Trond


cheers,
Jean-Charles

On Jun 15, 9:11 am, Toru Maesaka <tmaes...@gmail.com> wrote:
Hi!

Apologies for the late reply.

Things you've mentioned are correct and we've talked about
SMP performance issues of the daemon for a while at hackathons,
events, IRC and etc. As Dustin had mentioned, some experimental
work has been done and hopefully things will look better in future
releases :)

You know, things were worse prior to 1.4 with the global stats lock
so we've actually come quite far since 1.2 ;)

Cheers,
Toru



On Sat, Jun 13, 2009 at 2:32 AM, Jaime Medrano<jaime.medr...@gmail.com> wrote:

I have been doing a little lock profiling on memcached and I have
found that cache_lock has a lot of contention in machines with more
than 4 processors.

Mutex contention is very bad when using libevent because it means that
all connections assigned to the thread that is waiting are frozen.

Is there any plan on improving that?

I think that instead of using a global mutex, locking could be done on
a per bucket basis plus an additional lock for LRU list management.

Would you be interested on any work on that direction?

Regards,
Jaime.

--
Trond Norbye

Web Scale Infrastructure                 E-mail: trond.nor...@sun.com
SUN Microsystems                         Phone:  +47 73842100
Haakon VII's gt. 7B                      Fax:    +47 73842101
7485 Trondheim, Norway

Reply via email to