1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" lang=
"ja" xml:
lang=
"ja"><head><!--
4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5 This file is generated from xml source: DO NOT EDIT
6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
8 <title>prefork - Apache HTTP サーバ
</title>
9 <link href=
"../style/css/manual.css" rel=
"stylesheet" media=
"all" type=
"text/css" title=
"Main stylesheet" />
10 <link href=
"../style/css/manual-loose-100pc.css" rel=
"alternate stylesheet" media=
"all" type=
"text/css" title=
"No Sidebar - Default font size" />
11 <link href=
"../style/css/manual-print.css" rel=
"stylesheet" media=
"print" type=
"text/css" />
12 <link href=
"../images/favicon.ico" rel=
"shortcut icon" /></head>
14 <div id=
"page-header">
15 <p class=
"menu"><a href=
"../mod/">モジュール
</a> |
<a href=
"../mod/directives.html">ディレクティブ
</a> |
<a href=
"../faq/">FAQ
</a> |
<a href=
"../glossary.html">用語
</a> |
<a href=
"../sitemap.html">サイトマップ
</a></p>
16 <p class=
"apache">Apache HTTP サーバ バージョン
2.3</p>
17 <img alt=
"" src=
"../images/feather.gif" /></div>
18 <div class=
"up"><a href=
"./"><img title=
"<-" alt=
"<-" src=
"../images/left.gif" /></a></div>
20 <a href=
"http://www.apache.org/">Apache
</a> > <a href=
"http://httpd.apache.org/">HTTP サーバ
</a> > <a href=
"http://httpd.apache.org/docs/">ドキュメンテーション
</a> > <a href=
"../">バージョン
21 2.3</a> > <a href=
"./">モジュール
</a></div>
22 <div id=
"page-content">
23 <div id=
"preamble"><h1>Apache MPM prefork
</h1>
25 <p><span>言語:
</span><a href=
"../de/mod/prefork.html" hreflang=
"de" rel=
"alternate" title=
"Deutsch"> de
</a> |
26 <a href=
"../en/mod/prefork.html" hreflang=
"en" rel=
"alternate" title=
"English"> en
</a> |
27 <a href=
"../ja/mod/prefork.html" title=
"Japanese"> ja
</a> |
28 <a href=
"../tr/mod/prefork.html" hreflang=
"tr" rel=
"alternate" title=
"Türkçe"> tr
</a></p>
30 <div class=
"outofdate">この日本語訳はすでに古くなっている可能性があります。
31 更新された内容を見るには英語版をご覧下さい。
</div>
32 <table class=
"module"><tr><th><a href=
"module-dict.html#Description">説明:
</a></th><td>スレッドを使わず、先行して fork を行なうウェブサーバを実装
34 <tr><th><a href=
"module-dict.html#Status">ステータス:
</a></th><td>MPM
</td></tr>
35 <tr><th><a href=
"module-dict.html#ModuleIdentifier">モジュール識別子:
</a></th><td>mpm_prefork_module
</td></tr>
36 <tr><th><a href=
"module-dict.html#SourceFile">ソースファイル:
</a></th><td>prefork.c
</td></tr></table>
39 <p>このマルチプロセッシングモジュール (MPM) は、
40 Unix 上での Apache
1.3 のデフォルトの挙動と非常によく似た方法で
41 リクエストを処理する、スレッドを使わず、先行して fork を行なう
43 スレッドセーフでないライブラリとの互換性をとるために、
44 スレッドを避ける必要のあるサイトでは、このモジュールの使用が適切でしょう。
45 あるリクエストで発生した問題が他のリクエストに影響しないように、
46 個々のリクエストを単離するのにも、最適な MPM です。
</p>
48 <p>この MPM は非常に自律的なので、この MPM の設定ディレクティブを
49 調整する必要はほとんどないでしょう。もっとも重要なことは、
50 <code class=
"directive"><a href=
"../mod/mpm_common.html#maxclients">MaxClients
</a></code>
51 が、予想される同時リクエスト数を十分扱えるぐらいは大きいけれども、
52 全プロセスに十分な物理メモリが確実に行き渡る程度には小さい値にする、
56 <div id=
"quickview"><h3 class=
"directives">ディレクティブ
</h3>
58 <li><img alt=
"" src=
"../images/right.gif" /> <a href=
"mpm_common.html#acceptmutex">AcceptMutex
</a></li>
59 <li><img alt=
"" src=
"../images/right.gif" /> <a href=
"mpm_common.html#coredumpdirectory">CoreDumpDirectory
</a></li>
60 <li><img alt=
"" src=
"../images/right.gif" /> <a href=
"mpm_common.html#enableexceptionhook">EnableExceptionHook
</a></li>
61 <li><img alt=
"" src=
"../images/right.gif" /> <a href=
"mpm_common.html#group">Group
</a></li>
62 <li><img alt=
"" src=
"../images/right.gif" /> <a href=
"mpm_common.html#listen">Listen
</a></li>
63 <li><img alt=
"" src=
"../images/right.gif" /> <a href=
"mpm_common.html#listenbacklog">ListenBacklog
</a></li>
64 <li><img alt=
"" src=
"../images/right.gif" /> <a href=
"mpm_common.html#lockfile">LockFile
</a></li>
65 <li><img alt=
"" src=
"../images/right.gif" /> <a href=
"mpm_common.html#maxclients">MaxClients
</a></li>
66 <li><img alt=
"" src=
"../images/right.gif" /> <a href=
"mpm_common.html#maxmemfree">MaxMemFree
</a></li>
67 <li><img alt=
"" src=
"../images/right.gif" /> <a href=
"mpm_common.html#maxrequestsperchild">MaxRequestsPerChild
</a></li>
68 <li><img alt=
"" src=
"../images/down.gif" /> <a href=
"#maxspareservers">MaxSpareServers
</a></li>
69 <li><img alt=
"" src=
"../images/down.gif" /> <a href=
"#minspareservers">MinSpareServers
</a></li>
70 <li><img alt=
"" src=
"../images/right.gif" /> <a href=
"mpm_common.html#pidfile">PidFile
</a></li>
71 <li><img alt=
"" src=
"../images/right.gif" /> <a href=
"mpm_common.html#receivebuffersize">ReceiveBufferSize
</a></li>
72 <li><img alt=
"" src=
"../images/right.gif" /> <a href=
"mpm_common.html#scoreboardfile">ScoreBoardFile
</a></li>
73 <li><img alt=
"" src=
"../images/right.gif" /> <a href=
"mpm_common.html#sendbuffersize">SendBufferSize
</a></li>
74 <li><img alt=
"" src=
"../images/right.gif" /> <a href=
"mpm_common.html#serverlimit">ServerLimit
</a></li>
75 <li><img alt=
"" src=
"../images/right.gif" /> <a href=
"mpm_common.html#startservers">StartServers
</a></li>
76 <li><img alt=
"" src=
"../images/right.gif" /> <a href=
"mpm_common.html#user">User
</a></li>
80 <li><img alt=
"" src=
"../images/down.gif" /> <a href=
"#how-it-works">動作方法
</a></li>
83 <li><a href=
"../bind.html">Apache
84 が使用するアドレスとポートの設定
</a></li>
86 <div class=
"top"><a href=
"#page-header"><img alt=
"top" src=
"../images/up.gif" /></a></div>
88 <h2><a name=
"how-it-works" id=
"how-it-works">動作方法
</a></h2>
90 コネクションに対して listen して、しかるべき時に応答する
91 子プロセスを起動します。Apache は常に幾つかの
<dfn>スペア
</dfn>
92 かアイドルなサーバプロセスを維持していて、それらは入ってきた
93 リクエストに応答できるように待機しています。
94 このようにしてクライアントは、リクエストが応答される前に、
95 新しい子プロセスが fork されるのを待たなくてもよいように
98 <p>親プロセスがリクエストに応答するの子プロセスを
100 <code class=
"directive"><a href=
"../mod/mpm_common.html#startservers">StartServers
</a></code>,
101 <code class=
"directive"><a href=
"#minspareservers">MinSpareServers
</a></code>,
102 <code class=
"directive"><a href=
"#maxspareservers">MaxSpareServers
</a></code>,
103 <code class=
"directive"><a href=
"../mod/mpm_common.html#maxclients">MaxClients
</a></code>
104 で調整します。一般的に、Apache は非常に自律的なので、
105 大抵のサイトではこれらのディレクティブをデフォルト値から調整する
107 同時に
256 を超えるリクエストに応答しないといけないサイトでは、
108 <code class=
"directive"><a href=
"../mod/mpm_common.html#maxclients">MaxClients
</a></code>
110 一方、メモリの限られているサイトでは、スラッシング
111 (メモリとディスク間で何度もスワップ) が起こるのを防ぐために
112 <code class=
"directive"><a href=
"../mod/mpm_common.html#maxclients">MaxClients
</a></code>
113 を減らす必要があるでしょう。プロセス生成のチューニングに関する
114 詳しい情報は、
<a href=
"../misc/perf-tuning.html">性能に関するヒント
</a>
117 <p>通常 Unix では親プロセスは
80 番ポートにバインドするために
118 <code>root
</code> で起動されますが、子プロセスやスレッドは
119 もっと低い権限のユーザで Apache によって起動されます。
120 <code class=
"directive"><a href=
"../mod/mpm_common.html#user">User
</a></code> と
121 <code class=
"directive"><a href=
"../mod/mpm_common.html#group">Group
</a></code>
123 Apache の子プロセスの権限を設定するのに用いられます。
124 子プロセスはクライアントに送るコンテンツ全てを読めないといけませんが、
125 可能な限り必要最小限の権限のみを持っているようにするべきです。
</p>
127 <p><code class=
"directive"><a href=
"../mod/mpm_common.html#maxrequestsperchild">MaxRequestsPerChild
</a></code>
128 は、古いプロセスを停止して新しいプロセスを起動することによって、
129 どの程度の頻度でサーバがプロセスをリサイクルするかを制御します。
</p>
131 <div class=
"top"><a href=
"#page-header"><img alt=
"top" src=
"../images/up.gif" /></a></div>
132 <div class=
"directive-section"><h2><a name=
"MaxSpareServers" id=
"MaxSpareServers">MaxSpareServers
</a> <a name=
"maxspareservers" id=
"maxspareservers">ディレクティブ
</a></h2>
133 <table class=
"directive">
134 <tr><th><a href=
"directive-dict.html#Description">説明:
</a></th><td>アイドルな子サーバプロセスの最大個数
</td></tr>
135 <tr><th><a href=
"directive-dict.html#Syntax">構文:
</a></th><td><code>MaxSpareServers
<var>number
</var></code></td></tr>
136 <tr><th><a href=
"directive-dict.html#Default">デフォルト:
</a></th><td><code>MaxSpareServers
10</code></td></tr>
137 <tr><th><a href=
"directive-dict.html#Context">コンテキスト:
</a></th><td>サーバ設定ファイル
</td></tr>
138 <tr><th><a href=
"directive-dict.html#Status">ステータス:
</a></th><td>MPM
</td></tr>
139 <tr><th><a href=
"directive-dict.html#Module">モジュール:
</a></th><td>prefork
</td></tr>
141 <p><code class=
"directive">MaxSpareServers
</code> ディレクティブは、
142 <em>アイドルな
</em>子サーバプロセスの希望最大個数を設定します。
143 アイドルプロセスとは、リクエストを扱っていないプロセスです。
144 <code class=
"directive">MaxSpareServers
</code> よりも多い数がアイドルであれば、
145 親プロセスは超過プロセスを kill します。
</p>
147 <p>非常に混んでいるサイトでのみ、このパラメータをチューニングするべきです。
148 このパラメータを大きくするということは、大抵の場合は悪い発想です。
149 <code class=
"directive"><a href=
"#minspareservers">MinSpareServers
</a></code>
150 以下に設定した場合、
<code class=
"directive">MinSpareServers
</code>
151 <code>+
1</code> に自動調整されます。
</p>
155 <li><code class=
"directive"><a href=
"#minspareservers">MinSpareServers
</a></code></li>
156 <li><code class=
"directive"><a href=
"../mod/mpm_common.html#startservers">StartServers
</a></code></li>
159 <div class=
"top"><a href=
"#page-header"><img alt=
"top" src=
"../images/up.gif" /></a></div>
160 <div class=
"directive-section"><h2><a name=
"MinSpareServers" id=
"MinSpareServers">MinSpareServers
</a> <a name=
"minspareservers" id=
"minspareservers">ディレクティブ
</a></h2>
161 <table class=
"directive">
162 <tr><th><a href=
"directive-dict.html#Description">説明:
</a></th><td>アイドルな子サーバプロセスの最小個数
</td></tr>
163 <tr><th><a href=
"directive-dict.html#Syntax">構文:
</a></th><td><code>MinSpareServers
<var>number
</var></code></td></tr>
164 <tr><th><a href=
"directive-dict.html#Default">デフォルト:
</a></th><td><code>MinSpareServers
5</code></td></tr>
165 <tr><th><a href=
"directive-dict.html#Context">コンテキスト:
</a></th><td>サーバ設定ファイル
</td></tr>
166 <tr><th><a href=
"directive-dict.html#Status">ステータス:
</a></th><td>MPM
</td></tr>
167 <tr><th><a href=
"directive-dict.html#Module">モジュール:
</a></th><td>prefork
</td></tr>
169 <p><code class=
"directive">MaxSpareServers
</code> ディレクティブは、
170 <em>アイドルな
</em>子サーバプロセスの希望最小個数を設定します。
171 アイドルプロセスとは、リクエストを扱っていないプロセスです。
172 <code class=
"directive">MinSpareServers
</code> よりも少ない数がアイドルであれば、
173 親プロセスは最高で
1 秒につき
1 個の割合で新しい子プロセスを生成します。
</p>
175 <p>非常に混んでいるサイトでのみ、このパラメータをチューニングするべきです。
176 このパラメータを大きくするということは、大抵の場合は悪い発想です。
</p>
180 <li><code class=
"directive"><a href=
"#maxspareservers">MaxSpareServers
</a></code></li>
181 <li><code class=
"directive"><a href=
"../mod/mpm_common.html#startservers">StartServers
</a></code></li>
185 <div class=
"bottomlang">
186 <p><span>言語:
</span><a href=
"../de/mod/prefork.html" hreflang=
"de" rel=
"alternate" title=
"Deutsch"> de
</a> |
187 <a href=
"../en/mod/prefork.html" hreflang=
"en" rel=
"alternate" title=
"English"> en
</a> |
188 <a href=
"../ja/mod/prefork.html" title=
"Japanese"> ja
</a> |
189 <a href=
"../tr/mod/prefork.html" hreflang=
"tr" rel=
"alternate" title=
"Türkçe"> tr
</a></p>
190 </div><div id=
"footer">
191 <p class=
"apache">Copyright
2009 The Apache Software Foundation.
<br />Licensed under the
<a href=
"http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version
2.0</a>.
</p>
192 <p class=
"menu"><a href=
"../mod/">モジュール
</a> |
<a href=
"../mod/directives.html">ディレクティブ
</a> |
<a href=
"../faq/">FAQ
</a> |
<a href=
"../glossary.html">用語
</a> |
<a href=
"../sitemap.html">サイトマップ
</a></p></div>