最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Apache的fork模式和worker模式判斷方法

 更新時(shí)間:2015年07月06日 11:11:06   投稿:goldensun  
這篇文章主要介紹了Apache的fork模式和worker模式判斷方法,文中給出的方法基于http,需要的朋友可以參考下

本文章來給各位同學(xué)介紹判斷apache的工作模式是prefork模式還是worker模式,測試方法我們只要使用http來操作。

apache常用的工作模式有prefork和worker模式。運(yùn)行命令httpd -l 或者apache2 -l ,輸出的結(jié)果中如果含有prefork.c,那就是prefork模式,如果結(jié)果中含有worker.c,那就是worker模式。

知道模式之后我們可以在apache的confextrahttpd-mpm.conf 進(jìn)行編輯了

#
# Server-Pool Management (MPM specific)
#

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
# Note that this is the default PidFile for most MPMs.
#
<IfModule !mpm_netware_module>
  PidFile "logs/httpd.pid"
</IfModule>

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
<IfModule !mpm_winnt_module>
<IfModule !mpm_netware_module>
LockFile "logs/accept.lock"
</IfModule>
</IfModule>

#
# Only one of the below sections will be relevant on your
# installed httpd. Use "apachectl -l" to find out the
# active mpm.
#

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
  StartServers     5
  MinSpareServers    5
  MaxSpareServers   10
  MaxClients     150
  MaxRequestsPerChild  0
</IfModule>

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_worker_module>
  StartServers     2
  MaxClients     150
  MinSpareThreads   25
  MaxSpareThreads   75
  ThreadsPerChild   25
  MaxRequestsPerChild  0
</IfModule>

# BeOS MPM
# StartThreads: how many threads do we initially spawn?
# MaxClients:  max number of threads we can have (1 thread == 1 client)
# MaxRequestsPerThread: maximum number of requests each thread will process
<IfModule mpm_beos_module>
  StartThreads      10
  MaxClients       50
  MaxRequestsPerThread 10000
</IfModule>

# NetWare MPM
# ThreadStackSize: Stack size allocated for each worker thread
# StartThreads: Number of worker threads launched at server startup
# MinSpareThreads: Minimum number of idle threads, to handle request spikes
# MaxSpareThreads: Maximum number of idle threads
# MaxThreads: Maximum number of worker threads alive at the same time
# MaxRequestsPerChild: Maximum number of requests a thread serves. It is
#           recommended that the default value of 0 be set for this
#           directive on NetWare. This will allow the thread to
#           continue to service requests indefinitely.             
<IfModule mpm_netware_module>
  ThreadStackSize   65536
  StartThreads      250
  MinSpareThreads     25
  MaxSpareThreads    250
  MaxThreads      1000
  MaxRequestsPerChild   0
  MaxMemFree       100
</IfModule>

# OS/2 MPM
# StartServers: Number of server processes to maintain
# MinSpareThreads: Minimum number of idle threads per process,
#         to handle request spikes
# MaxSpareThreads: Maximum number of idle threads per process
# MaxRequestsPerChild: Maximum number of connections per server process
<IfModule mpm_mpmt_os2_module>
  StartServers      2
  MinSpareThreads    5
  MaxSpareThreads    10
  MaxRequestsPerChild  0
</IfModule>

# WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_winnt_module>
  ThreadsPerChild   150
  MaxRequestsPerChild  0
</IfModule>

我們?nèi)绻莣indows系統(tǒng)一般是使用最后面的winnt mpm來操作了。

相關(guān)文章

  • 詳解如何在Ubuntu上檢查、開啟、關(guān)閉端口

    詳解如何在Ubuntu上檢查、開啟、關(guān)閉端口

    在深入探討如何在Ubuntu上檢查、開啟、關(guān)閉端口之前,理解網(wǎng)絡(luò)基礎(chǔ)概念、端口的工作原理以及Ubuntu的網(wǎng)絡(luò)架構(gòu)是至關(guān)重要的,文中通過代碼示例介紹的非常詳細(xì),具有一定的參考價(jià)值,需要的朋友可以參考下
    2024-06-06
  • 系統(tǒng)講解Apache Kafka消息管理與異常處理的最佳實(shí)踐

    系統(tǒng)講解Apache Kafka消息管理與異常處理的最佳實(shí)踐

    Apache Kafka 作為分布式流處理平臺(tái)的核心組件,廣泛應(yīng)用于實(shí)時(shí)數(shù)據(jù)管道、日志聚合和事件驅(qū)動(dòng)架構(gòu),下面我們就來系統(tǒng)講解 Kafka 消息管理與異常處理的最佳實(shí)踐吧
    2025-04-04
  • Linux之CRLF/CR/LF等回車換行符的問題

    Linux之CRLF/CR/LF等回車換行符的問題

    這篇文章主要介紹了Linux之CRLF/CR/LF等回車換行符的問題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2023-04-04
  • linux給用戶添加root權(quán)限方法總結(jié)

    linux給用戶添加root權(quán)限方法總結(jié)

    在本篇文章里小編給大家整理的是關(guān)于
    2020-02-02
  • Apache Iceberg 底層數(shù)據(jù)查詢原理解析

    Apache Iceberg 底層數(shù)據(jù)查詢原理解析

    Apache Iceberg是一個(gè)開源表格格式,用于大型分析數(shù)據(jù)集,本文主要介紹了如何通過快照、Manifest文件和元數(shù)據(jù)文件查詢Iceberg表的數(shù)據(jù),通過解析元數(shù)據(jù)文件獲取當(dāng)前表的快照ID,進(jìn)而讀取對(duì)應(yīng)的Avro文件和Manifest文件中的Parquet數(shù)據(jù)文件,感興趣的朋友一起看看吧
    2024-09-09
  • 在CentOS 7.2上安裝SuPHP的詳細(xì)方法

    在CentOS 7.2上安裝SuPHP的詳細(xì)方法

    這篇文章主要介紹了在CentOS 7.2上安裝SuPHP的詳細(xì)方法,本教程介紹從源代碼安裝CentOS 7.2上的SuPHP,因?yàn)闆]有可用于CentOS 7.2的SuPHP軟件包,需要的朋友可以參考下
    2020-02-02
  • .htaccess rewrite 規(guī)則詳細(xì)說明

    .htaccess rewrite 規(guī)則詳細(xì)說明

    用Apache虛擬主機(jī)的朋友很多,apache提供的.htaccess模塊可以為每個(gè)虛擬主機(jī)設(shè)定rewrite規(guī)則,這對(duì)網(wǎng)站SEO優(yōu)化相當(dāng)有用,同時(shí)也改善了用戶體驗(yàn)
    2016-04-04
  • linux系統(tǒng)中rsync+inotify實(shí)現(xiàn)服務(wù)器之間文件實(shí)時(shí)同步

    linux系統(tǒng)中rsync+inotify實(shí)現(xiàn)服務(wù)器之間文件實(shí)時(shí)同步

    這篇文章主要介紹了rsync+inotify實(shí)現(xiàn)服務(wù)器之間文件實(shí)時(shí)同步,需要的朋友可以參考下
    2014-11-11
  • Linux unlink函數(shù)和刪除文件的操作方法

    Linux unlink函數(shù)和刪除文件的操作方法

    這篇文章主要介紹了Linux unlink函數(shù)和刪除文件的操作方法,本文給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2020-02-02
  • sersync2完全安裝配置說明(一) 基本功能使用

    sersync2完全安裝配置說明(一) 基本功能使用

    當(dāng)前版本的sersync依賴于rsync進(jìn)行同步。如下圖所示,在同步主服務(wù)器上開啟sersync,將監(jiān)控路徑中的文件同步到目標(biāo)服務(wù)器,因此需要在主服務(wù)器配置sersync,在同步目標(biāo)服務(wù)器配置rsync
    2011-11-11

最新評(píng)論

同仁县| 南开区| 广水市| 陆河县| 浙江省| 富源县| 安乡县| 高邑县| 东兰县| 清苑县| 靖安县| 丽江市| 呼图壁县| 澜沧| 平湖市| 恩施市| 子长县| 泉州市| 望城县| 延安市| 大埔区| 湖州市| 上栗县| 铜山县| 芜湖县| 闽侯县| 鄄城县| 扎兰屯市| 长海县| 大化| 永城市| 英超| 长寿区| 顺平县| 凯里市| 嵊州市| 永清县| 临高县| 宁阳县| 巴楚县| 乌兰察布市|