raksmart活动促销

分享

写回答

发帖

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

国外VPS云主机 国外VPS云主机 6928 人阅读 | 15 人回复

发表于 2008-3-29 21:17:21 | 显示全部楼层 |阅读模式

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

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

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

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

回答|共 15 个

minglwm

发表于 2008-3-29 21:45:33 | 显示全部楼层

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

happyhero

发表于 2008-3-29 22:23:42 | 显示全部楼层

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

minglwm

发表于 2008-3-29 22:29:18 | 显示全部楼层

已经关掉,而且 超时为 3

lyerx

发表于 2008-3-30 00:07:58 | 显示全部楼层

同意,vps就是这样

ofan

发表于 2008-3-30 12:26:43 | 显示全部楼层

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

happyhero

发表于 2008-3-30 12:58:44 | 显示全部楼层

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

kingofcar

发表于 2008-3-31 20:58:09 | 显示全部楼层

# 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>
这是我的设置,在周末的时候会死机一次,其他时间还可以,我还叫客服帮我装了个脚本优化软件。

minglwm

发表于 2008-4-1 00:59:45 | 显示全部楼层

原帖由 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配置怎样的?

kingto

发表于 2008-10-6 19:42:38 | 显示全部楼层

如何優化上面那個httpd
您需要登录后才可以回帖 登录 | 注册

本版积分规则