2024年5月13日月曜日

MPM prefork(Apache):チーニング編


 1)/etc/httpd/conf.d/mpm.confを作成する

<IfModule mpm_prefork_module>
StartServers 400
MinSpareServers 400
MaxSpareServers 400
ServerLimit 400
MaxClients 400
MaxRequestsPerChild 80
</IfModule>

2)00-mpm.confの編集を行う。

# Select the MPM module which should be used by uncommenting exactly
# one of the following LoadModule lines. See the httpd.conf(5) man
# page for more information on changing the MPM.

# prefork MPM: Implements a non-threaded, pre-forking web server
# See: http://httpd.apache.org/docs/2.4/mod/prefork.html
#
# NOTE: If enabling prefork, the httpd_graceful_shutdown SELinux
# boolean should be enabled, to allow graceful stop/shutdown.
#

## mpm_prefork ##
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

# worker MPM: Multi-Processing Module implementing a hybrid
# multi-threaded multi-process web server
# See: http://httpd.apache.org/docs/2.4/mod/worker.html
#
#LoadModule mpm_worker_module modules/mod_mpm_worker.so

# event MPM: A variant of the worker MPM with the goal of consuming
# threads only for connections with active processing
# See: http://httpd.apache.org/docs/2.4/mod/event.html
#

## Default setting ##
#LoadModule mpm_event_module modules/mod_mpm_event.so


3)httpd.confに追記

KeepAlive On
MaxKeepAliveRequests 80
KeepAliveTimeout 120

4)apache のサービスを再起動






0 件のコメント:

コメントを投稿

helm( kube-prometheus-stack)とlokiの連携

helm経由で、 kube-prometheus-stackとloki stackを入れるだけだと連携ができないので 追加で以下の手順を進める必要がある。 1)Loki stackの導入を実施 helm install loki grafana/loki-stack --name...