Apache under three MPM modes: Prefork,worker and EventMPM (multi-processing module, multi-process processing module): Prefork,worker and Event to view the Apache mode, you can use the HTTPD-V command to view: /usr/local/apache2/bin/httpd-vserver version:apache/2.2.29 (Unix) Server Built:aug 20:11:21server ' s Module Ma GIC number:20051115:36server loaded:apr 1.5.1, Apr-util 1.5.3Compiled using:apr 1.5.1, Apr-util 1.5.3architecture:6 4-bitserver m
I. Environmental descriptionZabbix 2.2 in Centos 6.4 64bitTwo, MPM (MySQL performance Monitor) installation1. Dependent modulesYum install Perl-file-which perl-libwww-perl perl-digest-sha1 perl-dbd-mysql perl-time-hires Perl-Crypt-SSLeay2. MPM Installation DeploymentWget-c http://www.shinguz.ch/download/mysql_performance_monitor-latest.tar.gzDecompression source package, divided into two parts, part of the
Mysql monitoring tools: zabbix + MPM (Performance Monitor for MySQL), zabbixmpm
MPM is mainly used to monitor various mysql parameter performance indicators. The following describes the configuration of MPM and zabbix:
The following figure shows the configuration file diagram.
It consists of two parts:
1. zabbix template:Template_FromDual.MySQL.*.xml
2.
Idle sub-process: the sub-process that is not processing the request.1. prefork. C Module (a non-thread-type pre-derived MPM)Prefork mpmMultiple Sub-processes are used. Each sub-process has only one thread. Each process can maintain only one connection at a specified time. On most platforms, prefork MPM is more efficient than worker
MPM is high, but the memory u
MPM is mainly used to monitor the performance indicators of various mysql parameters. The following is a brief description of its configuration with zabbix: The following is its configuration file relationship diagram, which mainly includes two parts: 1. zabbix template: template_FromDualMySQL * xml2, MPMagentperl module: Fro MPM is mainly used to monitor various mysql parameter performance indicators. The
Tags: database mysql Zabbix1. Preface Zabbix as open source free monitoring software, its easy to manage the configuration and visualization of the view, the regular maintenance of historical data, templated monitoring projects more and more by the majority of IT operations and maintenance staff favorite. Here is the main summary of the next Zabbix server and MPM using Yum for rapid deployment. The more detailed things, people still look at the offici
For the latest version of the Web server Apache (version is Apache 2.4.10, published on July 21, 2014), there are three stable mpm (multi-processing module, multi-process processing modules) mode. They are prefork,worker and event, and they also represent the evolution and development of Apache.
To view our Apache model, you can use the HTTPD-V command to view:
Shell
12345678910
# httpd-vServer version:apache/2.4.10 (Unix)Server Built
See the recommendations of http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/ , It is intended to test the performance improvement of the passenger using the worker mpm.Experiment Settings:Subjects: Web service written by railsLab Tools: http://gatling.io/-based performance test code written by yourself in ScalaTwo experimental groups
Prefork MPM (default)-Apache defaults to the current
Zabbix full MySQL monitoring with fpmmm (MPM) module (Performance Monitor for MySQL)Fpmmm is the fromdualperformance Monitor for MySQL and MariaDB and the counterpart to the MySQL Enterprisemonitor from Ora Cle. With fpmmm-can monitor your MYSQL/MARIADB databases AndAlso your database hosts (machines). Fpmmm works on Linux and SH Ould also Workon Mac OSX (and possibly some other *BSD derivatives). Windows support was plannedfor the next major release.
Our environment with Zabbix MPM to monitor MySQL, but recently the official website has not called MPM, but called fpmmm, for the reasons:fpmmm is the successor of mpm. mpm was renamed to fpmmm because of the naming conflict with the Apache Multi-Processing Modules (MPM).Wel
Zabbix MPM monitoring MySQL is a pretty good monitoring module, but recently the official website has not called MPM, but called fpmmm, for the reasons:Fpmmm is the successor of MPM. MPM is renamed to Fpmmm because of the naming conflict with the Apache multi-processing Modules (MP
Mysql Fpmmm is an upgraded version of MPM. It is more convenient to use fpmmm than mpm, but the corresponding optimization parameters must be enabled.1. Configure the pidCopy the startup scriptCp support-files/mysql. server/etc/init. d/mysqldChkconfig -- add mysqldService mysqld startPid-file =/var/run/mysqld. pidConfigure environment variablesVim/etc/profile. d/mysql. shExport PATH =/usr/local/mysql/bin: $
process: generate M child processes, each process responds to n requests directly, concurrent response requests: M*n, there are specialized threads to manage these keep-alive types of threads, (here is where the worker is improved) when there is a real request, the request is passed to the service thread, after execution is complete, Also allows for release, which enhances the request processing capability in high concurrency scenariosCENTOS6 Default Httpd-2.2:event BetaCentos7 Default Httpd-2.
MPM is an Apache multi-channel processing module that defines how Apache handles client requests. The three MPM models commonly used in Linux are prefork, worker, and event.Prefork:A pre-build process in which a request responds with a process. The Apache2.2 version uses the Prefork model by default. Advantages: Stable and reliable, high execution efficiency, the collapse of any one process will not affect
temporarily unavailable:apr_thread_create:unable to create workEr threaderror in My_thread_global_end (): 1 threads didn ' t exiterror in My_thread_global_end (): 1 threads didn ' t exiterror In My_thread_global_end (): 1 threads didn ' t exitThis is actually caused by two reasons:1. System kernel limitations, mainly max user processes, this parameter defaults to 1024, which means limiting the maximum process usage per user, and exceeding this limit will cause the HTTPD service to fail to start
The parameter of apache mpm-event cannot be adjusted.
After several working modes of apache are introduced earlier, a series of problems may occur in parameter adjustment:
The httpd service cannot be started after/usr/local/apache/bin/apachectl-k start. The error log reports the following error:
[Fri May 08 08:21:00.903245 2015] [core:warn] [pid 29799:tid 140652774147840] AH00098: pid file /usr/local/apache/logs/httpd.pid overwritten -- Unclean shutd
) visited once
Time perrequest:5.411 [MS] (mean, acrossall concurrent requests) #一个人访问一次花费的时间
Transfer rate:37.18 [Kbytes/sec] Received
In addition, if we increase the number of concurrent numbers to 500, that is, the command is adjusted to Ab.exe-n 10000-c http://localhost/test/index.php it will appear the following results.[Plain]View Plain Copy
Apr_socket_connect (): Unable to connect because the target computer was actively refused. (730061)
Total of 902 requestscompleted
MPM multi-Process Processing moduleMPM is divided into three modes:1,preforkProcess model, each process processes a request, pattern: Parent Process —————— > multiple child Processes —————— > One child process processing a request2,workerThreading model, each process derives multiple threads, each thread processes a request, pattern: Parent Process —————— > multiple child processes —————— > Multiple threads are derived from each child process------->
Apache defaults to a thread-safe prefork,prefork MPM that uses multiple child processes, each of which has one thread, each processing only one request connection at a time, and one request fails to affect other requests, which is thread-safeWorkers use multi-process multithreading, each with multiple threads, each processing a request connection, with higher performance, but non-thread-safe.PHP's official recommendation does not use the thread of
Author: Little monster Nikki Weibo: @ Goodbye little MonsterRemove the # before the include conf/extra/httpd-mpm.conf in http.conf so that the configuration in httpd-mpm.conf takes effect.#Server-pool Management (MPM specific)Include conf/extra/httpd-mpm.confFirst, the Apache default situation
startservers 3
minsparethreads
maxsparethreads
threadsperchild
maxrequestworkers
maxconnections
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.