Skip to content
linux kernel memcache server
Branch: master
Clone or download
Latest commit fb4df2e Aug 1, 2013
Type Name Latest commit message Commit time
Failed to load latest commit information.
devtools move to devtools Jun 25, 2013
doc tcp listen socket bug Apr 25, 2013
include init-settings procedure refactoring Jun 29, 2013
kmod fix memory leak when received a netlink message but not found a callb… Jul 10, 2013
t test Jul 11, 2013
test fix testapp bug Aug 1, 2013
user init-settings procedure refactoring Jun 29, 2013
.gitignore kmemcache init Jan 18, 2013
AUTHORS kmemcache init Jan 18, 2013
COPYING kmemcache init Jan 18, 2013
LICENSE tcp listen socket bug Apr 25, 2013
Makefile test case Jun 19, 2013 update README Jun 29, 2013


kmemcache is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

kmemcache is derived from memcached-v1.4.15, exactly it is a linux kernel memcached, and aims at quicker response and higher performance.

Current Limitations

kmemcache has now implemented all most major features of memcached, including the complete binary and text protocols, based on tcp, udp and unix domain communication protocols, slab allocation dynamically rebalanced, hash table expansion and so on.

The programming interface remains consistent with memcached. Clients using memcached can easily connected to kmemcache, without modification. You could also easily add the kmemcache server to your cluster of memcached servers.

The following are some features that have not been implemented yet:

  • SASL


x86_32/x86_64 kernel: [2.6.32, 3.2] other versions have not been tested

Building, Running & Testing

  1. Clone kmemcache from github

    [jgli@linux]$ git clone

  2. Compiling kmemcache

    [jgli@linux]$ cd kmemcache [jgli@linux]$ make

  3. Running kmemcache

3.1 Change user to root

[jgli@linux]$ su root

3.2 Insert kernel module and start server

[root@linux]# insmod kmod/kmemcache.ko
[root@linux]# user/umemcached -h
[root@linux]# user/umemcached -p 11213
  1. Stopping kmemcache

    [root@linux]# rmmod kmemcache

  2. Testing kmemcache

5.1 Case 1, using libmemcached

[root@linux]# apt-get install libmemcached
[root@linux]# memcapable -h localhost -p 11213
[root@linux]# memslap --servers=localhost:11213

5.2 Case 2, using testapp

[root@linux]# insmod kmod/kmctest.ko
[root@linux]# ./test/testapp

5.3 Case 3, using perl scripts

[root@linux]# ./t/

5.4 More cases refer to memcached


Want to contribute? You are so welcome! Any reporting bugs, feedback, and pulling requests are encouraged!


Official memcached: Test tools: Something about kmemcache from my blog:

You can’t perform that action at this time.