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 件のコメント:

コメントを投稿

【AI×GitOps】Docker Composeから始めるRaspberry Pi 5 Kubernetesクラスタへの自動デプロイ設計

現在構築を進めている動画管理システム開発において、いきなりKubernetes(K8s)に展開するのではなく、 Docker Composeを中間地点に挟んで段階的にK8s+Argo CD(GitOps)へ移行するアーキテクチャ設計 をまとめました。 Bionic(AIアシスタン...