16 12
发新话题
打印

VPS究竟行不行? 感觉比虚拟主机还差!!!

VPS究竟行不行? 感觉比虚拟主机还差!!!

我最近购买了LP的VPS主机(512MB)
使用了发现apache 的maxclient默认是10, 我把它设到80,都扛不住了,高峰期根本打不开,内存耗尽。

我的VPS怎么就没有想像那么好?

以前在hostgator差不多一万IP才给K掉了,现在都不足3K 日流量,都扛不住了

谁可以分享一下VPS的经验?

TOP

LP客服建议我最多只能设到20-25,慢!

TOP

吧keepalive关掉,或者不关keepalive,把keepalivetimeout设小点,5以下,试试.

TOP

已经关掉,而且 超时为 3

TOP

同意,vps就是这样

TOP

晕  看来vps也不是那么省心....
难道要我勒紧裤腰带 奔向我的服务器?

TOP

毕竟一个服务器装了数个系统,数个apache,数个mysql,不像虚拟主机只装一个大家共用.
特别是unmanaged vps需要自己做大量优化.

TOP

# Timeout: The number of seconds before receives and sends time out.
#
Timeout 120

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive Off

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

##
## Server-Pool Size Regulation (MPM specific)
##

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
ServerLimit       400
StartServers       10
MinSpareServers    10
MaxSpareServers    15
MaxClients        200
MaxRequestsPerChild  10000
</IfModule>

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule worker.c>
StartServers         3
MaxClients          2000
ServerLimit         25  
MinSpareThreads      50
MaxSpareThreads      200
ThreadsPerChild     100
MaxRequestsPerChild  0
</IfModule>
这是我的设置,在周末的时候会死机一次,其他时间还可以,我还叫客服帮我装了个脚本优化软件。

TOP

引用:
原帖由 kingofcar 于 2008-3-31 08:58 PM 发表
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 120

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" ...
你的VPS配置怎样的?

TOP

如何優化上面那個httpd
18輪大卡車遊戲中文論壇
倫敦相冊: www.kingto.info

使用Godaddy Linux VDS 和 Bluehost~

TOP

 16 12
发新话题