The Apache ab pressure measurement mode of operation and

ab pressure measurement
The Apache ab pressure measurement mode of operation and
The Apache ab pressure measurement mode of operation and
command format:

ab [options]  网站网址
# -n、-c、-t、-v

The Apache ab pressure measurement mode of operation and
The Apache ab pressure measurement mode of operation and

Experiment
1, first we manually compile and install Apache web services and compression optimization for him, using differential pressure measurement than ab before and after optimization!
1. Manually compile and install Apache
detailed procedure to review: https://blog.51cto.com/14557905/2459413
2. need to configure the DNS server, and here we use another method to modify the hosts file to
The Apache ab pressure measurement mode of operation and
multi-page insert in several pictures for testing
The Apache ab pressure measurement mode of operation and
The Apache ab pressure measurement mode of operation and
3. locate ab pressure measurement tool
The Apache ab pressure measurement mode of operation and
4. compression module testing in a closed state:
The Apache ab pressure measurement mode of operation and
open service, turn off the firewall!
The Apache ab pressure measurement mode of operation and
Test:
The Apache ab pressure measurement mode of operation and
Second, open the compression module tested again
The Apache ab pressure measurement mode of operation and
The Apache ab pressure measurement mode of operation and
open to do to complete the test
The Apache ab pressure measurement mode of operation and
summary: do the test because it is only rarely web content, so the gap is the result of a bit poor, but this is not accurate results, ab pressure measurement of mixed results, it is necessary several tests averaged!
apache operating mode Profile
apache web today as the most extensive and most stable of open source server software server used, its mode of operation there are many kinds of source package httpd-mpm.conf can view the file when you install httpd, this file is located extare / conf directory
At present, there are the following modes:

  • event mode
  • prefork mode
  • worker mode
    is switched to the operation mode needs to be declared in configure or modify the configuration file

    [root@localhost bin]# httpd -l   //查看apache当前工作模式
    Compiled in modules:
    core.c
    mod_so.c
    http_core.c
    event.c

    event mode of presentation

  • event is the latest apache mode of operation, and its mode like the worker, the difference is that it solves the keep-alive long time to take up the thread link resources are wasted questions
  • event work mode when it encounters certain incompatible module will fail, it will be retreated worker mode
  • event工作模式需要Linux系统(linux 2.6+)对epoll的支持,才能启用。需要补充的是HTTPS的链接(SSL)
    event工作方式

  • 在event工作模式中,会有一些专门的线程用来管理这些keep-alive类型的线程
  • 当有真实请求过来的时候,将请求传递给服务器的线程,执行完毕后,又允许它释放
  • 这样,一个线程就能处理几个请求了,实现了异步非阻塞。这增强了在高并发场景下的请求处理
    event参数讲解
    在httpd-mpm.conf配置文件中,以下是prefork模块的定义
    The Apache ab pressure measurement mode of operation and
    The Apache ab pressure measurement mode of operation and

event优化建议

  • 可根据生产环境进行调试,以确定合适参数
  • 优化参考
    The Apache ab pressure measurement mode of operation and

prefork 工作模式介绍

  • prefork是一个多路处理模块(MPM),实现了一个进程型的、预派生的web服务器,适合于没有线程安全库、需要避免线程兼容性问题的系统
  • 在要求每个请求相互独立的情况下具有很好的特性,若一个请求出现问题不会影响到其他请求
  • 具有很强的自我调节能力,只需要很少的配置指令进行调整就可以适合于企业应用要求
  • 最重要的是将MaxClient设置为一个最够大的数值以处理潜在的请求高峰,同时又不能太大,以避免所需的内存超出物理内存的大小
    prefork 工作模方式
  • 一个单独的控制进程(父进程)负责产生子进程。子进程用于监听请求并作出应答,因此在内存中会一直存在一些备用的(spare)或是空闲的子进程用于响应新的请求,可加快响应速度
  • 父进程通常以root身份运行,以便绑定个80端口,子进程通常以一个低特权的用户运行,可通过配置项的User和Group配置
  • 运行子进程的用户必须要对网站内容有读取权限,但是对其他资源必须拥有尽可能少的权限,以保证系统安全
  • Not specified when compiling the installation mode used by default prefork mode, you can view the httpd -l
    prefork parameters explained
    in httod-mpm.conf profile, what is the definition of prefork module
    The Apache ab pressure measurement mode of operation and

The Apache ab pressure measurement mode of operation and

prefork Optimization Tips

  • Debugging can be produced according to the environment, to determine the appropriate parameters
  • Optimization Reference
    The Apache ab pressure measurement mode of operation and
    worker pattern
    defined in the worker httpd-mpm.conf
    The Apache ab pressure measurement mode of operation and
    The Apache ab pressure measurement mode of operation and

apache directory properties

  • Directory permissions set to use <Directory directory path> and </ Directory> This statement went home directory or virtual directory permissions
  • They are a pair of container statements must appear in pairs, they are encapsulated between a specific set directory permissions statements, which are only set directory and its subdirectories work
    directory attribute parameters
    The Apache ab pressure measurement mode of operation and
    The Apache ab pressure measurement mode of operation and

Guess you like

Origin blog.51cto.com/14557905/2460140
Recommended