Proposal: lets get rid of the non-thread code

dormando dormando at rydia.net
Thu Feb 7 20:16:24 UTC 2008


Brian Aker wrote:
> Hi!
> 
> Basically:
> 1) No one buys single processors machines today.
> 2) Memcached should be as simple to install as possible.
> 3) Less code to maintain means less... well work.
> 4) Single points of execution makes code less buggy and easier to 
> understand.
> 
> So lets pull the non-thread code out of memcached and default to just 
> the threaded version.
> 
> Any objections?
> 
> Cheers,
>     -Brian

I'm absolutely good with this.

I _have_ heard from people who insist on leaving threads off (Domas is 
one of them; if you're reading this please reply!).

The main reservations I've heard are:

1) Most people don't actually need threaded support.
2) There's a bit of overhead in adding thread support, but, if you dial 
it down to a single thread modern OS futexes nix the bulk of the 
performance drop. Still, we should test and find out what the difference 
actually _is_.
3) Faith in the thread code being "bug-free". I'm under the impression 
only a small percentage of users run the code. It's probably fine, but 
it's obviously not been as stressed.

On my end, it'd be really nice to simplify the code. One of the things 
that didn't make my list was an idea to make threading runtime 
switchable, by calling function pointers to avoid locks on a few things. 
Removing it entirely is another option :)

-Dormando


More information about the memcached mailing list