LSMCD: A Persistent, Highly Scalable and Available Memcached Replacement

LSMCD

Think database web applications have to be slow? Think again! With our completely free and open source LiteSpeed Memcached, you can accelerate your site by alleviating database load dynamically!

What is LiteSpeed Memcached (LSMCD)?

LSMCD is a high-performance, distributed caching system with file-backed shared memory designed to behave as a drop-in replacement for Memcached with some marked improvements. Memcached is designed for temporary storage, which could be used to accelerate database applications if the stored results do not change frequently. It can also be used to save PHP session data or cache processing results. However, because of Memcached’s temporary, non-HA nature, if one of your servers goes down, the data stored in that server’s memory is no longer accessible.

Memcached also lacks persistence, so data put into Memcached does not stay there when it is restarted, shut down, or crashes. If you want your data to be saved permanently, you would need to write both to Memcached and a database backend. Even though Memcached makes reading from memory faster, writing to a database is just as slow if not slower than a setup without it.

LiteSpeed Memcached allows for better performance and scalability than Memcached by managing and allocating memory from across one or several servers and storing data in key/value pairs.

What we do better:
Externally LSMCD behaves the same way that Memcached does, but our internal optimizations and improvements make it superior.

  • High-Availability – Your data is replicated across several virtual pools of memory making it available even if one or more of your servers go down.
  • Memory Persistence – Data written to LSMCD is retained, even after shutting down, restarting, or even crashing. Unlike Memcached, there’s no need for a database backend!

We mentioned databases, but what other processes can LSMCD speed up?

  • API calls
  • XML
  • Heavy computations
  • Reading files

What data should you store in LSMCD?
Data that is:

  • Used often
  • Hard to compute
  • Shared across users

For more information, visit our LSMCD wiki.

Do you use Memcached? What do you think of our improvements? Tell us in the comments section below.

Comments

12 responses to “LSMCD: A Persistent, Highly Scalable and Available Memcached Replacement”

  1. Tyler Bishop Avatar

    It would be really nice to see a memcache implementation that can be deployed on shared environments. Each user having memcache access without the need for a dedicated kernel.

  2. galih rezah Avatar

    failed to install on cloudlinux 7

    1. Kacey Schroeder Avatar
      Kacey Schroeder

      Hi Galih, how did you try to install it? What was the error?

  3. Jason Avatar

    I sure could use some help. I’ve been banging my head into my keyboard for days attempting to get LSMCD to install.

    Setup:
    CENTOS 6.9 virtuozzo [server] v66.0.26
    PHP Version 7.1.10
    Managed VPS with Root on A2Hosting

    Getting the files, dependencies, all that seems to have gone well. Here’s where it drops out:

    [root@server:lsmcd]$ make install
    CDPATH=”${ZSH_VERSION+.}:” && cd . && aclocal-1.13
    ax_check_sasl.m4:5: warning: underquoted definition of CMU_SASL_INC_WHERE1
    ax_check_sasl.m4:5: run info Automake ‘Extending aclocal’
    ax_check_sasl.m4:5: or see http://www.gnu.org/software/automake/manual/automake.html#Extending-aclocal
    acinclude.m4:3010: warning: the serial number must appear before any macro definition
    acinclude.m4:3055: warning: the serial number must appear before any macro definition
    acinclude.m4:3100: warning: the serial number must appear before any macro definition
    acinclude.m4:5267: warning: the serial number must appear before any macro definition
    configure.ac:10: warning: macro ‘AM_CONFIG_HEADER’ not found in library
    cd . && automake-1.13 –foreign
    src/Makefile.am:20: warning: ‘INCLUDES’ is the old name for ‘AM_CPPFLAGS’ (or ‘*_CPPFLAGS’)
    src/edio/Makefile.am:4: warning: ‘INCLUDES’ is the old name for ‘AM_CPPFLAGS’ (or ‘*_CPPFLAGS’)
    src/lcrepl/Makefile.am:4: warning: ‘INCLUDES’ is the old name for ‘AM_CPPFLAGS’ (or ‘*_CPPFLAGS’)
    src/log4cxx/Makefile.am:4: warning: ‘INCLUDES’ is the old name for ‘AM_CPPFLAGS’ (or ‘*_CPPFLAGS’)
    src/lsr/Makefile.am:4: warning: ‘INCLUDES’ is the old name for ‘AM_CPPFLAGS’ (or ‘*_CPPFLAGS’)
    src/memcache/Makefile.am:4: warning: ‘INCLUDES’ is the old name for ‘AM_CPPFLAGS’ (or ‘*_CPPFLAGS’)
    src/repl/Makefile.am:4: warning: ‘INCLUDES’ is the old name for ‘AM_CPPFLAGS’ (or ‘*_CPPFLAGS’)
    src/shm/Makefile.am:4: warning: ‘INCLUDES’ is the old name for ‘AM_CPPFLAGS’ (or ‘*_CPPFLAGS’)
    src/socket/Makefile.am:4: warning: ‘INCLUDES’ is the old name for ‘AM_CPPFLAGS’ (or ‘*_CPPFLAGS’)
    src/util/Makefile.am:4: warning: ‘INCLUDES’ is the old name for ‘AM_CPPFLAGS’ (or ‘*_CPPFLAGS’)
    src/util/sysinfo/Makefile.am:4: warning: ‘INCLUDES’ is the old name for ‘AM_CPPFLAGS’ (or ‘*_CPPFLAGS’)
    CDPATH=”${ZSH_VERSION+.}:” && cd . && autoconf
    configure.ac:10: error: possibly undefined macro: AM_CONFIG_HEADER
    If this token and others are legitimate, please use m4_pattern_allow.
    See the Autoconf documentation.
    make: *** [configure] Error 1

    ————–

    Where am I failing? A2 can’t assist me any further, so here I am. Please help?

    1. Jason Avatar

      [root@server:lsmcd]$ ./configure CFLAGS=”-03″ CXXFLAGS=”-03″
      checking for a BSD-compatible install… /usr/bin/install -c
      checking for -p flag to install… yes
      checking whether build environment is sane… yes
      /lsmcd/missing: Unknown ‘–is-lightweight’ option
      Try ‘/lsmcd/missing –help’ for more information
      configure: WARNING: ‘missing’ script is too old or missing
      checking for a thread-safe mkdir -p… /bin/mkdir -p
      checking for gawk… gawk
      checking whether make sets $(MAKE)… yes
      checking whether make supports nested variables… yes
      ./configure: line 2993: syntax error near unexpected token `src/config.h:src/config.h.in’
      ./configure: line 2993: `AM_CONFIG_HEADER(src/config.h:src/config.h.in)’

    2. Lisa Clarke Avatar
      Lisa Clarke

      This looks like something that will require a little troubleshooting. Blog comments aren’t really the best place for that. Would you mind creating a ticket (or send email to bug at litespeedtech.com)? Thanks!

      1. Jason Avatar

        doh, yeah, my bad, Lisa. I’m on it…thank You 🙂

        1. Lisa Clarke Avatar
          Lisa Clarke

          My pleasure!

        2. Jason Avatar

          Hi again, Lisa:

          Ok, sent it to bug@. I don’t have my own account as I pay for it through A2 Hosting. I’m wondering though if I should go ahead and create an account though (other than my shiny new forum account). Thoughts?

          Thank you, again. If you only knew how many days I’ve poured into this … it’s embarrassing, really. I’m stubborn, though, and damn determined to see this work. I don’t see why it can’t. I’m about 99.99% sure this is just a matter of User Error with a dash of configuration adjustment.

          Unfortunately, A2 Hosting can’t assist any further as it is a Managed VPS with Root. With Great Root Comes Great Responsibility! Also great frustration hehe.
          I look forward to writing an article about this as well as adding on to the A2 KB so that others won’t have to dump the shameful number of days ( by days I mean at least 72 collective hours, at the least).

          Anyhow… Cheers!

          1. Lisa Clarke Avatar
            Lisa Clarke

            I can empathize. I’ve spent countless hours on similar pursuits on my personal site, only to discover a silly mistake I’d made early on in the process. I’m sure the support team will be able to get to the bottom of your issue 🙂

            As for creating an account, it’s not necessary if you’re happy with the email. It all ends up in the same place on our end.

            Have a great day!

  4. Satriyo Wibowo Avatar
    Satriyo Wibowo

    got this error while starting lsmcd service using systemd
    i’m running cloudlinux 7

    lsmcd.service: control process exited, code=exited status=255

    1. Lisa Clarke Avatar
      Lisa Clarke

      Hi, Satriyo.

      It’s difficult to troubleshoot in blog comments. Please create a ticket (or send email to bug@litespeedtech.com) so that we can better assist you.

      Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *