Configuration File

The LSMCD configuration file is located at “/usr/local/lsmcdctrl/bin/conf/node.conf”. This wiki entry will explain the list of the available configuration options within the file.

A sample node.conf is included with lsmcd. It can make it easier initially copying the file from the distribution to the destination and making changes to it from there. Notes are discussed which mention the changes you will need to make and some recommended changes.

Installation is usually done as root and is done after compilation make install. However, if you wish to run as an specific user you can run directly from the build directory. When starting the facility, run lsmcdctrl start from the build dist/bin directory.

These options configure the CacheD portion of LSMCD.


Cached.Addr is the LSMCD public listening address and port. This is the address used when connecting and interacting with LSMCD. If replacing Memcached, this should match the current Memcached listening address. You must stop memcached before starting LSMCD.


If you will be using LSMCD entirely within a single machine and do not need it to listen on a IP port, you can specify a UNIX Domain Socket file name for extra security. For example, using the socket name /tmp/lsmcd.sock specify:


If you are using UNIX domain sockets, see your memcached language guide for connecting to it. For example, for PHP, you specify the domain socket file name as the first parameter (hostName) to addServer and a 0 as the second parameter (port).


Cached.Slices is the number of slices that the data will be stored in. This should be equal to or higher than CachedProcCnt to minimize lock contention.



Cached.Slice.Priority is the priority of the slice in the replication group. This is explained in detail here.



Cached.ShmDir defines the location of LSMCD data files, such as cache data. If /dev/shm is used, the data will be stored in memory, but will be lost after a server reboot. If using the regular disk, data will be persistent, but it will be slower due to disk I/O. It is recommended to use an SSD for data storage, as SSDs will provide faster performance while keeping data persistent.



Cached.HashTableName is the global hash table name. There is no need to have a different setting per slice.


User and Group

The User and Group options define the user and group that LSCMD will run as.



CachedProcCnt setting determines how many LSMCD processes will run. LSMCD uses multiprocessing unlike MemcacheD, which uses multithreading.



TmpDir specifies the location of the LSMCD pid file.



LogLevel determines the level of the log messages output in LSMCD. Example levels include Info, Error, Warn, Notice, Info, Debug (as well as dbg_high, dbg_medium, dbg_low) and Trace.



LogFile specifies the location of the LSMCD log file. It should be checked for any problems or issues.



Set to TRUE if you wish to enable SASL in your memcached installation. This requires that your application provide a user and password with every transaction. If you are using SASL, see this wiki for additional configuration details:


Once you have changed this value, you must delete your existing LSMCD files:

rm -rf /dev/shm/lsmcd


Can only be used if CACHED.USESASL=TRUE and if no replication is used. If set to 'true', each SASL user will be allocated an individual set of data within the data pool. When memcached requests are preceded by a user authorization (which is always the case unless you are using legacy code and enable the Cached.Anonymous option) the request is always for the user specified in the request whether it's a get, put, or stats. See the SASL wiki (above) for details on use.


Can only be used if CACHED.USESASL=TRUE and if no replication is used. While legacy apps (those without user/password validation) can be made to work with this option until they've all been updated, it makes the most sense if you've specified Cached.DataByUser=true. If set to 'true', users without validation code can access the system, but operate within the common area and do not affect the user specified data areas. See the SASL wiki (above) for details on use.


Can only be used if CACHED.USESASL=TRUE and if no replication is used. Allows you to specify a database name other than the default sasl database of /etc/sasldb2. Recommended in very secure sensitive environments. See the SASL section for use of this option, particularly with saslpasswd2 and sasldblistusers2.


If set to a non-zero value, it is the number of bytes that will be stored in the hash before least recently used items begin to be purged. The default is 64000000.


If user level databases are turned on, the initial size of each user's database. The default is 1000.


The default initial cache entry size in bytes. Defaults to 500000. The maximum size is controlled with Cached.MemMaxSz.


The maximum size of any individual entry in the cache. 0 disables the limit, the default is 1000000.

These options configure the replication portion of LSMCD. If there is no replication group, none of these parameters are required.


Repl.LbAddrs is a comma separated list of IP addresses (with port number) that form the replication group. This is always required for replication and should be two or more address/port number entries, comma separated.



Cached.PriAddr is the LSMCD private listening address and port used for interactions between LSMCD instances. Required for replication.



Repl.ListenSvrAddr is a required parameter which is the IP address and port that lsmcd will be listening on. Required for replication. Most users will use:



Repl.DispatchAddr is a replication required parameter. It is recommended that it be specified as:



RepldSockPath specifies the location of the Repld sock file.



CachedSockPath specifies the location of the Cached sock file and is required. The extra dot at the end is important as this is used as a prefix for a number of separate files.



Repl.HeartBeatReq is the frequency of the replication heartbeat.



Repl.HeartBeatRetry is the maximum timeout for replication heartbeat.



Repl.MaxTidPacket is the maximum replication packet size.



Repl.GzipStream indicates whether or not LSMCD should use gzip stream for replication traffic.

  • Admin
  • Last modified: 2019/11/07 22:26
  • by Robert Perper