Win7解决方案:
打开注册表:运行:输入regedit。
注册表定位到:HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/services/memcachedServer
双击右边的ImagePath,数值数据如下:"D:\SoftWare\memcached-1.2.1-win32\memcached.exe" -drunservice,在后边加入-m 512(将limit_maxbytes设为512M)。
重新启动memcached 服务,进入memcached安装目录(我的是D:\SoftWare\memcached-1.2.1-win32)
>memcached –d stop
>memcached –d start
查看memcached的limit_maxbytes是否修改成功
>telnet 127.0.0.1 11211
>stats
显示STAT limit_maxbytes 1048576000, 设置成功。
Linux 解决方案:
假设已经安装过memcached。
在每次重新启动memcached的时候加-m 512可以将limit_maxbyte设置成512M,例如:
# /usr/local/bin/memcached –d –c 1024 –m 512–u root
其中/usr/local/bin/memcached为我自己的memcached路径(根据每人安装不同地方决定)
Memcached状态查询方法和win7一致。