This is an old revision of the document!
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.
CacheD Configurations
These options configure the CacheD portion of LSMCD.
Cached.Addr
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.
Cached.Addr=127.0.0.1:11211
Cached.Slices
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.Slices=2
Cached.Slice.Priority
Cached.Slice.Priority is the priority of the slice in the replication group. This is explained in detail here.
Cached.Slice.Priority.0=100 Cached.Slice.Priority.1=200 #Cached.Slice.Priority.2=300 #Cached.Slice.Priority.3=400
Cached.ShmDir
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.ShmDir=/dev/shm/lsmcd
Cached.HashTableName
Cached.HashTableName is the global hash table name. There is no need to have a different setting per slice.
#Cached.HashTableName=memcache
User and Group
The User and Group options define the user and group that LSCMD will run as.
User=nobody Group=nobody
CachedProcCnt
CachedProcCnt setting determines how many LSMCD processes will run. LSMCD uses multiprocessing unlike MemcacheD, which uses multithreading.
CachedProcCnt=4
TmpDir
TmpDir specifies the location of the LSMCD pid file.
TmpDir=/tmp/lsmcd
CachedSockPath
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.
CachedSockPath=/tmp/cached.usock.
LogLevel
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.
LogLevel=notice #LogLevel=dbg_medium
LogFile
LogFile specifies the location of the LSMCD log file. It should be checked for any problems or issues.
LogFile=/tmp/lsmcd.log
CACHED.USESASL
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: https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:lsmcd:sasl
CACHED.USESASL=TRUE
Cached.MemMaxSz
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.
Replicator Configurations
These options configure the replication portion of LSMCD. If there is no replication group, none of these parameters are required.
Repl.LbAddrs
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.
Repl.LbAddrs=127.0.0.1:12340,192.168.0.122:12340
Cached.PriAddr
Cached.PriAddr is the LSMCD private listening address and port used for interactions between LSMCD instances. Required for replication.
Cached.PriAddr=127.0.0.1:11000
Repl.ListenSvrAddr
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.ListenSvrAddr=127.0.0.1:12340
Repl.DispatchAddr
Repl.DispatchAddr is a replication required parameter. It is recommended that it be specified as:
Repl.DispatchAddr=127.0.0.1:5501
RepldSockPath
RepldSockPath specifies the location of the Repld sock file.
RepldSockPath=/tmp/repld.usock
Repl.HeartBeatReq
Repl.HeartBeatReq is the frequency of the replication heartbeat.
Repl.HeartBeatReq=5
Repl.HeartBeatRetry
Repl.HeartBeatRetry is the maximum timeout for replication heartbeat.
Repl.HeartBeatRetry=30
Repl.MaxTidPacket
Repl.MaxTidPacket is the maximum replication packet size.
Repl.MaxTidPacket=2048000
Repl.GzipStream
Repl.GzipStream indicates whether or not LSMCD should use gzip stream for replication traffic.
Repl.GzipStream=YES