Summary of common configuration parameters of memcached

藏色散人
Release: 2023-04-06 16:18:01
forward
3344 people have browsed it

#Process and connection settings

-d    #以守护进程(daemon)方式运行服务
-u    #指定运行memcached的用户,如果当前用户为root,需要使用此参数指定用户
-l    #指定memcached进程监听的服务器IP地址,可以不设置此参数。
-p    #指定memcached服务监听TCP端口号。默认为11211.
-P    #设置保存memcached的pid文件($$),保存PID到指定文件
Copy after login

#Memory related settings

-m    #指定memcached服务可以缓存数据的最大内存,默认为64MB
-M    #memcached服务内存不够时禁止LRU,如果内存满了会报错
-n    #为key+value+flags分配的最小内存空间,默认48字节
-f    #chunk size增长因子,默认1.25
-L    #启用大内存页,可以降低内存浪费,改进性能
Copy after login

#Concurrent connection settings

-c    #最大并发连接数,默认是1024
-t    #线程数,默认4.由于memcached采用NIO,所以太多线程作用不大。
-R    #每个event最大请求数,默认20
-C    #禁用CAS(可以禁止版本计数,减少开销)
Copy after login

#Debug parameters

-v    #打印较少的errors/warnings
-vv   #打印非常多调试信息和错误输出到控制台,也打印客户端命令及响应
-vvv  #打印极多的调试信息和错误输出,也打印内部状态转变
Copy after login

The above is the detailed content of Summary of common configuration parameters of memcached. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:jmsite.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template