Skip to content

memcached (with dump-to-disk feature) development tree

License

BSD-3-Clause, BSD-3-Clause licenses found

Licenses found

BSD-3-Clause
LICENSE
BSD-3-Clause
COPYING
Notifications You must be signed in to change notification settings

dkrotx/memcached-dd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
-------------------------------------------------------------------------------
Memcached-dd
-------------------------------------------------------------------------------

Fork of memcached providing dump to disk feature.
Comparing to other solution(s) you may heard about, it's pure memcached with only patch. Not noSQL wich just support memcached protocol (Tarantool or MemBase).

Usage is straightforward: just add `-F file' option to command-line. Memcached will read this `file' at start and write to file.tmp when SIGUSR2 received. Then (after successfull write), it will rename file.tmp -> file. So, `file' should be never truncated.
Dump performs in separate thread, so it doesn't affect memcached itself.
For example:
$ memcached -F /tmp/memcache.dump -m 64 -p 11211 -l 127.0.0.1 


-------------------------------------------------------------------------------
INSTALLATION:
-------------------------------------------------------------------------------
./version.sh
autoreconf -fiv
./configure
make
sudo make install

-------------------------------------------------------------------------------
Original README:
-------------------------------------------------------------------------------

Dependencies:
# Memcached

## Dependencies

* libevent, http://www.monkey.org/~provos/libevent/ (libevent-dev)

## Environment

### Linux

If using Linux, you need a kernel with epoll.  Sure, libevent will
work with normal select, but it sucks.

epoll isn't in Linux 2.4, but there's a backport at:

    http://www.xmailserver.org/linux-patches/nio-improve.html

You want the epoll-lt patch (level-triggered).

### Mac OS X

If you're using MacOS, you'll want libevent 1.1 or higher to deal with
a kqueue bug.

Also, be warned that the -k (mlockall) option to memcached might be
dangerous when using a large cache.  Just make sure the memcached machines
don't swap.  memcached does non-blocking network I/O, but not disk.  (it
should never go to disk, or you've lost the whole point of it)

## Website

* http://www.memcached.org

## Contributing

Want to contribute?  Up-to-date pointers should be at:

* http://contributing.appspot.com/memcached

About

memcached (with dump-to-disk feature) development tree

Resources

License

BSD-3-Clause, BSD-3-Clause licenses found

Licenses found

BSD-3-Clause
LICENSE
BSD-3-Clause
COPYING

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 71.7%
  • Perl 25.3%
  • DTrace 1.8%
  • Other 1.2%