Run on the server:
#./Memcached-D-M 2048-l 10.0.0.40-P 11211
This starts a process that occupies 2 GB of memory and opens port 11211 to receive requests. Because the 32-bit system can only handle 4G memory addressing, 2-3 processes can be run on 32-bit servers with 4G memory and monitored on different ports.
Another example is memcached-D-M.10-U root-l192.168.105.73-P12000-C256-P/tmp/memcached. PID
-D option is to start a daemon,
-M indicates the amount of memory allocated to memcache. The unit is mb. Here I am 10 MB,
-U is the user who runs memcache. Here I am root,
-L is the IP address of the listener server. If there are multiple IP addresses, I have specified the IP address of the server.192.168.105.73 ,
-P is the port for memcache listening. I have set port 12000 here, preferably port 1024 or above,
-The "C" option is the maximum number of concurrent connections. The default value is 1024. I have set 256 here, which is based on the load of your server,
-P is the PID file for saving memcache. Here I am saving it in/tmp/memcached. PID