web服务器apache可以处理的最大用户数? [英] web server maximum number of users apache can handle?

查看:41
本文介绍了web服务器apache可以处理的最大用户数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是 Apache webserver 2.2.2 可以处理的最大用户数是多少,我有一个网站有时会超过 300 多个并发用户,但是 apache 默认配置设置为最大 150,我知道我可以增加这个值,但是如果我这样做,我担心我可能会超过 Apache 可以处理的容量,我的服务器非常强大,配备 8 个四核 AMD 处理器和 16 个 GM 内存

  1. 如何确定apache可以处理多少请求,

  2. 一般来说,针对服务器负载进行最佳优化的选项/配置是什么.即禁用保持活动..等

  3. 当我增加最大用户大小时,MySql 会吃掉大部分处理器能力,有时会超过 150% 的 CPU .... 不知道为什么..

有专家吗?

解决方案

Apache 的最大线程数为 40-100.可以增加它以允许同时处理更多线程.

在对应用程序进行任何更改之前,应对其进行监控.根据响应,尝试相应地更改ThreadsPerChild"和AcceptThreads".

默认的最大"线程数通常就足够了;但是,在某些情况下可能需要增加这个数字.可以监控线程使用情况.要进行监控,请启动管理实例,选择有问题的 HTTP 服务器,然后选择左下角的实时服务器统计信息.

如果空闲线程数接近或为零,这是一个问题.只要空闲线程数为零,就不能建立新的客户端连接.新客户端将进入等待状态,直到线程可用.我们对这种情况的建议是添加具有增加值的指令 ThreadsPerChild,如果它在 40 到 100 的范围内,则大约是当前值的两倍,如果高于 100,则增加 50.所需的最小值(对于最大值)参数)只能通过反复试验才能找到.如果增加该值后,服务器运行顺利,停止测试.

(noreferOpenDocument">rel>

My question is what is the maximum number of users that Apache webserver 2.2.2 can handle, i have a website which sometimes gets over 300+ concurrent users, however apache default configuration is set to max 150, i know i can increase this value, however if i do i fear that i might run over the capacity that Apache can handle, my server is quite powerful with 8 quad core AMD processor with 16 GM memory

  1. How do i determine how many requests that apache can handle,

  2. In general what the options/configurations for a best optimised for server loads. i.e disable keep alive ..etc

  3. When i increase the max user size , MySql eats up most of the processor power with going over 150% CPU sometimes .... not sure why ..

Any experts ?

Apache comes with 40-100 max threads. It can be increased to allow more threads to be handled at the same time.

The application should be monitored before making any changes to it. Based on the response, try to change "ThreadsPerChild" and "AcceptThreads" accordingly.

The default amount of "maximum" number of threads is usually enough; however, there can be conditions where this number may have to be increased. The threads usage can be monitored. To monitor, start the Administrative instance, select the HTTP server in question, and select Real Time Server Statistics at the bottom left.

If Idle Threads is close to or at zero, this is a problem. As long as Idle Threads is zero, no new client connections can be established. New clients will be put into a wait status until a thread becomes available. Our recommendation for this condition is to add the directive ThreadsPerChild with an increased value, approximately double the current value if it was in the range of 40 to 100, or plus 50, if it was above 100. The required minimum value (for the maximum parameter) can only be found by trial and error. If after increasing the value, the server runs smoothly, stop testing.

(source)

这篇关于web服务器apache可以处理的最大用户数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆