全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 1842|回复: 2
打印 上一主题 下一主题

[nginx] 求高手指点!

[复制链接]
跳转到指定楼层
1#
发表于 2010-1-1 03:46:27 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我用的是ramhost128内存的vps,装了debian和论坛置顶的“LNMP一键安装包(12月12日更新)”,安装完后优化了mysql的配置文件,减少了phpcgi的个数等等,就是为了节约内存,刚启动时内存可以稳定在60M以下,可是慢慢的就一直上升,直到现在80,top看了下,都是phpcgi弄的,于是发ticket,回复说:
Most of your memory usage appears to be the result of your persistent php fcgi processes.
If you continue to have problems then I would suggest either running php as a regular (not persistent) cgi, or upgrading your memory to a higher level
于是我就问该怎么把php-cgi从persistent改到regular,他回复:
since it looks like you are using nginx, and nginx doesn't support traditional cgi, that won't be possible (using something like lighttpd instead would make that possible).
It also looks like you compiled everything from scratch - since you decided to do that we can't help you with specific configuration issues. Considering that 2 persistent php processes are using half of your vps memory you should consider what options you enabled when you compiled those binaries as most likely the build options you used are causing your programs to use more memory than necessary.
You should note, however, that running as a plain cgi will be slower than as a persistent cgi - especially if your site gets a large amount of traffic
我英语不算差,都看得懂,可是由于是比较专业的问题,不懂php方面的,所以又不太懂他说的什么意思。他说我是nginx所以不可能改,而如果是lighttpd就可以。所以我问下这里的高手:像我这种特小内存的vps,到底是坚持目前的nginx好,还是换成lighttpd更省内存?我觉得即使是现在的nginx,优化正确了应该也能使内存降到80以下吧?我要求很低的,就放自己的一个小博客,几乎无人访问除了自己--! 如果坚持现在的nginx,该怎么最大限度优化内存呢?如果换lighttpd又该如何呢?Apache就不用考虑了吧,貌似它是最耗内存的
2#
 楼主| 发表于 2010-1-1 03:49:58 | 只看该作者
给个top的截图,大家给点意见,谢谢啦!
3#
发表于 2010-1-1 10:59:29 | 只看该作者

回复 2# 的帖子

没看到什么问题呀,你已经很节约了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-5-8 01:29 , Processed in 0.064868 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表