2012年6月8日星期五

memcached启动参数


-p <num>     指定监听的TCP端口号,默认是11211
-U <num>     指定监听的TCP端口号 (默认: 11211, 0 表示关闭)
-s <file>     UNIX socket path to listen on (disables network support)
-a <mask>     access mask for UNIX socket, in octal (default: 0700)
-l <addr>    指定绑定的IP地址,多个地址用逗号分隔。
-d            以后台进程运行
-r            maximize core file limit
-u <username> 指定运行的帐号(只有root时有效)
-m <num>      最大内存使用值,单位是M(default: 64 MB)
-M            return error on memory exhausted (rather than removing items)
-c <num>      最大并发连接数 (默认: 1024)
-k            lock down all paged memory.  Note that there is a
              limit on how much memory you may lock.  Trying to
              allocate more than that would fail, so be sure you
              set the limit correctly for the user you started
              the daemon with (not for -u <username> user;
              under sh this is done with 'ulimit -S -l NUM_KB').
-v            日志模式 (在事件循环中打印错误/警告)
-vv           强日志模式 (还打印客户端的命令/响应)
-vvv        最大日志模式 (打印内部状态交互信息)
-h            打印帮助信息
-i            打印 memcached 和 libevent 的版权信息
-P <file>     -d参数下,指定pid file
-f <factor>   chunk size growth factor (default: 1.25)
-n <bytes>    为 key+value+flags  分配的最小空间(字节)(default: 48)
-L            Try to use large memory pages (if available). Increasing
              the memory page size could reduce the number of TLB misses
              and improve the performance. In order to get large pages
              from the OS, memcached will allocate the total item-cache
              in one large chunk.
-D <char>     Use <char> as the delimiter between key prefixes and IDs.
              This is used for per-prefix stats reporting. The default is
              ":" (colon). If this option is specified, stats collection
              is turned on automatically; if not, then it may be turned on
              by sending the "stats detail on" command to the server.
-t <num>      线程数 (default: 4)
-R            Maximum number of requests per event, limits the number of
              requests process for a given connection to prevent
              starvation (default: 20)
-C          禁用 CAS
-b            Set the backlog queue limit (default: 1024)
-B            Binding protocol - one of ascii, binary, or auto (default)
-I            Override the size of each slab page. Adjusts max item size
              (default: 1mb, min: 1k, max: 128m)
-o            Comma separated list of extended or experimental options
              - (EXPERIMENTAL) maxconns_fast: immediately close new
                connections if over maxconns limit
              - hashpower: An integer multiplier for how large the hash
                table should be. Can be grown at runtime if not big enough.
                Set this based on "STAT hash_power_level" before a
                restart.

没有评论:

发表评论