perf-tuning.xml.ko revision a0e549fa035cea0147cb7700d1a814c8088676fd
<?xml version="1.0" encoding="EUC-KR" ?>
<!DOCTYPE manualpage SYSTEM "/style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="/style/manual.ko.xsl"?>
<!-- English Revision: 105989 -->
<!--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manualpage metafile="perf-tuning.xml.meta">
<parentdocument href="./">Miscellaneous Documentation</parentdocument>
<title>����ġ �������</title>
<summary>
<p>����ġ 2.0�� ��ɰ� ���ð��ɼ��� ������ ������ �µ���
������ ��� �������̴�. ��ġ��ũ ����� ��������� ��������
�ʾ����� ����ġ 2.0�� ���� ���� ��� ���� ������ ����.</p>
<p>����ġ 1.3�� ���ؼ� 2.0 ������ ó������ Ȯ�强(scalability)��
���̱����� ���� ����ȭ�� �ߴ�. �⺻������ ��κ� ����ȭ��
���� ����Ѵ�. �׷��� �����Ͻ� Ȥ�� ����� ������ ���ɿ�
ū ������ �� �� �ִ�. �� ������ ����ġ 2.0�� ������ ����ϱ�����
���� ���ڰ� ������ �� �ִ� �ɼ��� �����Ѵ�. � ����
�ɼ��� �������� �ϵ����� �ü���� ����� �� �� Ȱ���ϵ���
�ϴ� �ݸ�, � �ɼ��� �ӵ��� ���� ����� ����Ѵ�.</p>
</summary>
<section id="hardware">
<title>�ϵ����� �ü���� ���ؼ�</title>
<p>������ ���ɿ� ���� ū ������ �ִ� ���� �޸𸮴�. ������
��û�� �����ð��� ����ڰ� "����� ��ٰ�" ������ ���ϰ�
�ø��⶧���� �������� ������ �ϸ� �ȵȴ�. �������� ����ڴ�
�����ϰ� �ٽ� �����Ͽ� ���ϰ� ��� �����Ѵ�. <directive
module="mpm_common">MaxClients</directive> ���þ �����Ͽ�
�������� ������ �� ������ ���� �ڽ��� �������ʵ��� �ؾ�
�Ѵ�. ����� �����ϴ�: <code>top</code>�� ���� ��������
���μ��� ����� ���� ����ġ ���μ����� ��� �޸� ��뷮��
�˾Ƴ���, ��ü ��밡���� �޸𸮿��� �ٸ� ���μ������� �����
���� �� ������ ������.</p>
<p>�������� ����ϴ�: ����� �� CPU, ����� �� ��Ʈ��ī��,
����� �� ��ũ, ���⼭ "����� ��"�� ������ �ؼ� �����ؾ�
�Ѵ�.</p>
<p>�ü���� ���� ���� �˾Ƽ� ������ ���̴�. �׷��� �Ϲ�������
�����ϴٰ� �Ǹ�� ��� ��ħ�� �ִ�:</p>
<ul>
<li>
<p>������ �ü���� �ֽ� ���� ����� ��ġ�� �����Ѵ�.
���� �ü�� ���ۻ�� �ֱ� TCP ���ð� ������ ���̺귯����
���� �ӵ������ �ߴ�.</p>
</li>
<li>
<p>�ü���� <code>sendfile(2)</code> �ý���ȣ����
�����Ѵٸ�, �̸� ����ϱ����� �����̳� ��ġ�� ��ġ�Ͽ�����
Ȯ���Ѵ�. (���� ���, ��������� 2.4 �̻� ������ ���Ѵ�.
Solaris 8 �ʱ� ������ ��ġ�� �ʿ��ϴ�.) �����ϴ� �ý����̶��
����ġ 2�� <code>sendfile</code>�� ����Ͽ� CPU�� ��
����ϸ� ���� ������ �� ���� ����� �� �մ�.</p>
</li>
</ul>
</section>
<section id="runtime">
<title>����� ������ ���ؼ�</title>
<related>
<modulelist>
<module>mod_dir</module>
<module>mpm_common</module>
<module>mod_status</module>
</modulelist>
<directivelist>
<directive module="core">AllowOverride</directive>
<directive module="mod_dir">DirectoryIndex</directive>
<directive module="core">HostnameLookups</directive>
<directive module="core">EnableMMAP</directive>
<directive module="core">EnableSendfile</directive>
<directive module="core">KeepAliveTimeout</directive>
<directive module="prefork">MaxSpareServers</directive>
<directive module="prefork">MinSpareServers</directive>
<directive module="core">Options</directive>
<directive module="mpm_common">StartServers</directive>
</directivelist>
</related>
<section id="dns">
<title>HostnameLookups�� DNS�� ���� ����� ����</title>
<p>����ġ 1.3 ���� <directive
module="core">HostnameLookups</directive>�� �⺻����
<code>On</code>�̿���. ��û�� ��ġ���� DNS �˻��� ������
�ϹǷ� ��û���� ������ ����. ����ġ 1.3���� �� ������
�⺻���� <code>Off</code>�� ����Ǿ��. �α������� �ּҸ�
ȣ��Ʈ������ ��ȯ�Ϸ��� ���� �α�ó�� ���α׷��� �ϳ���,
����ġ�� ���Ե� <a
href="/programs/logresolve.html"><code>logresolve</code></a>
���α׷��� ����϶�.</p>
<p>�α�ó�� �۾��� ���� ���ɿ� �ǿ����� ��ġ�Ƿ� ����
����ϴ� �������� �ƴ� �ٸ� ��ǻ�Ϳ��� �α������� ��ó���ϱ�
�ٶ���.</p>
<p><code><directive module="mod_access">Allow</directive>
from domain</code>�̳� <code><directive
module="mod_access">Deny</directive> from domain</code>
���þ ����Ѵٸ� (��, IP �ּҰ� �ƴ� ȣ��Ʈ���̳� �����θ���
����Ѵٸ�) �ε��� �ߺ�-�� DNS �˻��� (���˻��� ���� ���Ƿ�
����Ǿ���� Ȯ���ϱ����� �ٽ� �˻�) �ؾ� �Ѵ�. �׷��Ƿ�
������ ���̱����� �̷� ���þ�� �����ϸ� �̸���� IP
�ּҸ� ����Ѵ�.</p>
<p><code>&lt;Location /server-status&gt;</code> ���� ������
���þ��� �������� ������ �� ������ ����϶�. �� ���
���ǿ� �´� ��û���� DNS ��ȸ�� �Ѵ�. ������
<code>.html</code>�� <code>.cgi</code> ���ϸ� DNS �˻���
�ϴ� ������:</p>
<example>
HostnameLookups off<br />
&lt;Files ~ "\.(html|cgi)$"&gt;<br />
<indent>
HostnameLookups on<br />
</indent>
&lt;/Files&gt;
</example>
<p>�׷��� CGI���� DNS���� �ʿ��� ���̶��, �ʿ��� Ư��
CGI������ <code>gethostbyname</code> ȣ���� �ϵ��� ����غ�
�� �ִ�.</p>
</section>
<section id="symlinks">
<title>FollowSymLinks�� SymLinksIfOwnerMatch</title>
<p>URL ���� <code>Options FollowSymLinks</code>��
��������ʰ� <code>Options SymLinksIfOwnerMatch</code>��
����ϸ� ����ġ�� �ɺ���ũ�� �˻��ϱ����� �ý���ȣ����
�ѹ� �� �ؾ� �Ѵ�. ���ϸ��� �� �κи��� �ѹ� �� ȣ����
�Ѵ�. ���� ���, ������ ������ ����:</p>
<example>
DocumentRoot /www/htdocs<br />
&lt;Directory /&gt;<br />
<indent>
Options SymLinksIfOwnerMatch<br />
</indent>
&lt;/Directory&gt;
</example>
<p><code>/index.html</code> URI�� ���� ��û�� �ִٰ� ��������.
�׷��� ����ġ�� <code>/www</code>, <code>/www/htdocs</code>,
<code>/www/htdocs/index.html</code> ������ ����
<code>lstat(2)</code>�� ȣ���Ѵ�. <code>lstats</code>
��� ij������ �ʱ⶧���� ��û�� ���� ������ �Ź� ����
�۾��� �Ѵ�. ��¥ �ɺ���ũ ���� �˻縦 ���Ѵٸ� ������
���� �� �� �ִ�:</p>
<example>
DocumentRoot /www/htdocs<br />
&lt;Directory /&gt;<br />
<indent>
Options FollowSymLinks<br />
</indent>
&lt;/Directory&gt;<br />
<br />
&lt;Directory /www/htdocs&gt;<br />
<indent>
Options -FollowSymLinks +SymLinksIfOwnerMatch<br />
</indent>
&lt;/Directory&gt;
</example>
<p>�� ��� �ּ��� <directive
module="core">DocumentRoot</directive> ��δ� �˻�����
�ʴ´�. DocumentRoot �ۿ� �ִ� ��η� <directive
module="mod_alias">Alias</directive>�� <directive
module="mod_rewrite">RewriteRule</directive>�� �����
��쿡�� ���� ����� ������ �ʿ��ϴ�. �ɺ���ũ ������
������� �ʰ� �ְ��� ������ ��������,
<code>FollowSymLinks</code>�� �����ϰ�,
<code>SymLinksIfOwnerMatch</code>�� ���� �ȵȴ�.</p>
</section>
<section id="htacess">
<title>AllowOverride</title>
<p>URL ���� overrides�� ����Ѵٸ� (����
<code>.htaccess</code> ����) ����ġ�� ���ϸ��� �� �κи���
<code>.htaccess</code>�� ���� �õ��Ѵ�. ���� ���,</p>
<example>
DocumentRoot /www/htdocs<br />
&lt;Directory /&gt;<br />
<indent>
AllowOverride all<br />
</indent>
&lt;/Directory&gt;
</example>
<p><code>/index.html</code> URI�� ���� ��û�� �ִٰ� ��������.
����ġ�� <code>/.htaccess</code>, <code>/www/.htaccess</code>,
<code>/www/htdocs/.htaccess</code>�� ������ �õ��Ѵ�.
�ذ�å�� ���� <code>Options FollowSymLinks</code> ����
����ϴ�. �ְ��� ������ �������� ���Ͻý��ۿ� ���ؼ� �׻�
<code>AllowOverride None</code>�� ����Ѵ�.</p>
</section>
<section id="negotiation">
<title>�������</title>
<p>�����ϰ� ��¥ ������ ������󿡵� ����� �ִٸ� ���������
���´�. ������ ����� �̵��� �������Ϻ��� �۴�. ������
��� �� �� �ִ�. ������ ���� ���ϵ�ī�带 ����ϴ� ���:</p>
<example>
DirectoryIndex index
</example>
<p>������ ����� ����Ѵ�:</p>
<example>
DirectoryIndex index.cgi index.pl index.shtml index.html
</example>
<p>���� ���� ���� �տ� �д�.</p>
<p>��, ���丮���� ���ϵ��� ã�� <code>MultiViews</code>
���ٴ�, �� ���ϸ� ������ �ʿ��� ������ ���� �� �ִ�
<code>type-map</code> ������ ���� ����� ���� �� ����
����϶�.</p>
<p>����Ʈ�� ��������� �ʿ��ϴٸ� ����� ���� <code>Options
MultiViews</code> ���þ ����ϱ⺸�� <code>type-map</code>
������ ����϶�. ����� ���� �ڼ��� �����
<code>type-map</code> ������ ����� ����� <a
href="/content-negotiation.html">�������</a> ������ ����϶�.</p>
</section>
<section>
<title>�޸𸮴��� (memory-mapping)</title>
<p>���� ���, server-side-include�� ó���ϴ� �� ����ġ
2.0�� ����� ������ ������ �ü���� <code>mmap(2)</code>
���� �����Ѵٸ� ������ �޸𸮴����Ѵ�.</p>
<p>���� �÷��� �޸𸮴����� ������ ����Ѵ�. �׷���
�޸𸮴����� ������ ������ ����Ʈ���� ������ ��������
��ġ�� ��찡 �ִ�:</p>
<ul>
<li>
<p>� �ü������ <code>mmap</code>�� CPU ������
������ <code>read(2)</code> ��ŭ Ȯ�强�� ���� �ʴ�.
���� ���, �������μ��� Solaris �������� ����ġ 2.0��
���� <code>mmap</code>�� ������� ������ ������ ��
������ �� ���� ����Ѵ�.</p>
</li>
<li>
<p>NFS ����Ʈ�� ���Ͻý��ۿ� �ִ� ������ �޸𸮴����ϴ�
���߿� �ٸ� NFS Ŭ���̾�Ʈ�� �ִ� ���μ����� ������
����ų� ����ũ�⸦ ���̸�, ������ ���μ����� ����
�� �޸𸮴����� ���ϳ����� ������ bus error�� �߻���
�� �ִ�.</p>
</li>
</ul>
<p>���� ���ǿ� �ش��ϸ� ����ϴ� ������ �޸𸮴�������
�ʵ��� <code>EnableMMAP off</code>�� ����ؾ� �Ѵ�. (����:
�� ���þ�� ���丮���� ������ �� �ִ�.)</p>
</section>
<section>
<title>Sendfile</title>
<p>����ġ�� �ü���� <code>sendfile(2)</code>�� �����ϸ�
Ŀ�� sendfile�� ����Ͽ� -- ���� ���, ���� ������ �����Ҷ�
-- ����� ������ ���� �������� �� �ִ�.</p>
<p>���� �÷��� sendfile�� ����ϸ� read�� send�� ���
�� �ʿ䰡 �� �������. �׷��� sendfile�� ����ϸ�
�������� �������� ��ġ�ԵǴ� ��찡 �ִ�:</p>
<ul>
<li>
<p>sendfile ������ �߸�Ǿ�� ������ �ý����� ������
�߰����� ���ϴ� �÷����� �ִ�. Ư�� �ٸ� ��ǻ�Ϳ���
���������� �������Ͽ� sendfile ������ �߸�� ��ǻ�ͷ�
������ ��쿡 �����ϴ�.</p>
</li>
<li>
<p>Ŀ���� �ڽ��� ij���� ����Ͽ� NFS�� ����Ʈ�� ������
���������� ������ �� ��� ��찡 �ִ�.</p>
</li>
</ul>
<p>���� ���ǿ� �ش��ϸ� ������ sendfile ������� �ʵ���
<code>EnableSendfile off</code>�� ����ؾ� �Ѵ�. (����:
�� ���þ�� ���丮���� ������ �� �ִ�.)</p>
</section>
<section id="process">
<title>����� ��</title>
<p>����ġ 1.3 ����� <directive
module="prefork">MinSpareServers</directive>, <directive
module="prefork">MaxSpareServers</directive>, <directive
module="mpm_common">StartServers</directive> ������ ���
��ġ��ũ ��� ū ������ ���ƴ�. Ư�� ����ġ�� �۾���
�����ϱ����� ����� �ڽļ��� �ٴٸ� ������ "����" �Ⱓ��
�ʿ��ߴ�. ó�� <directive
module="mpm_common">StartServers</directive>�� �ڽ���
������, <directive module="prefork">MinSpareServers</directive>
���������� �ʴ� �ڽ��� �ϳ��� ������. �׷��� <directive
module="mpm_common">StartServers</directive> �⺻����
<code>5</code>�� ������ Ŭ���̾�Ʈ 100���� ���ÿ� �����ϸ�
���ϸ� ó���ϱ⿡ ����� �ڽ��� �������� 95�ʰ� �ɷȴ�.
���� ��������� �ʴ� ���� ���������� �� ����������, 10�а���
�����ϴ� ��ġ��ũ ���� �ſ� ���ڰ� ���´�.</p>
<p>�ʴ� �Ѱ� ��Ģ�� �ڽ��� ���� �����ϸ鼭 ������ ������
���� �������� ���ߴ�. ��ǻ�Ͱ� �ڽ��� �����ϴ��� �ٻڸ�
��û�� ������ �� ���. �׷��� �� ��Ģ�� ����ġ�� ü��
���ɿ� �ǿ����� �־� �����Ͽ���. ����ġ 1.3���� �ʴ� �Ѱ�
��Ģ�� ��ȭ�Ǿ��. �ڵ�� �ڽ� �Ѱ��� �����, 1�� ����,
�ΰ��� �����, 1�� ����, �װ��� �����, �̷� ������ �ʴ�
�ڽ��� 32�� ���鶧���� ������ �����Ѵ�. �ڽļ��� <directive
module="prefork">MinSpareServers</directive> ������ �ٴٸ���
������ �ߴ��Ѵ�.</p>
<p>�� ��� �����ӵ��� �������� <directive module="prefork"
>MinSpareServers</directive>, <directive module="prefork"
>MaxSpareServers</directive>, <directive module="mpm_common"
>StartServers</directive>�� ���� ������ �ʿ䰡 ���. ���ʿ�
�ڽ��� 4�� �̻� ���ϸ� <directive
module="core">ErrorLog</directive>�� ����Ѵ�. �̷� ������
���� ���̸� �� �������� �����ϱ� �ٶ���.
<module>mod_status</module> ��� ������ �� ���̴�.</p>
<p>���μ��� ��� ����Ͽ� <directive
module="mpm_common">MaxRequestsPerChild</directive> ������
���μ����� �����Ѵ�. �⺻���� �ڽĴ� ó���� ��û���� ������
��ٴ� <code>0</code>�̴�. ���� ������ <code>30</code>��
���� �ſ� ���� ������ �������ִٸ�, ���� ����� ���� �ʿ䰡
�ִ�. SunOS�� ������ Solaris ������ ����Ѵٸ�, �޸����⶧����
�� ���� <code>10000</code> ������ �����϶�.</p>
<p>��������(keep-alive)�� ����Ѵٸ� �ڽĵ��� �̹� ����
���ῡ�� �߰� ��û�� ��ٸ��� �ƹ��͵� �����ʱ⶧���� ���
�ٻڴ�. <directive module="core">KeepAliveTimeout</directive>��
�⺻�� <code>15</code> �ʴ� �̷� ������ �ּ�ȭ�Ѵ�. ��Ʈ��
�뿪��� ���� �ڿ� ���� ������ �°� �����Ѵ�. <a
href="http://www.research.digital.com/wrl/techreports/abstracts/95.4.html">
���������� ��κ��� ������ ������⶧����</a> � ��쿡��
�� ���� <code>60</code> �� �̻����� �ø��� ����.</p>
</section>
</section>
<section id="compiletime">
<title>�����Ͻ� ������ ���ؼ�</title>
<section>
<title>MPM ����</title>
<p>����ġ 2.x�� <a href="/mpm.html">����ó�����</a>
(MPMs)�̶�� ��ü�� �� �ִ� ����ȭ ���� �����Ѵ�. ����ġ��
�������Ҷ� MPM�� �����ؾ� �Ѵ�. <module>beos</module>,
<module>mpm_netware</module>, <module>mpmt_os2</module>,
<module>mpm_winnt</module>�� ���� Ư�� �÷����� �����
�� �ִ� MPM�� �ִ�. �Ϲ����� ���н��� �ý����� ���� MPM
�߿� �ϳ��� ������ �� �ִ�. �������� �ӵ���
Ȯ�强(scalability)�� � MPM�� �����߳Ŀ� �޷ȴ�:</p>
<ul>
<li><module>worker</module> MPM�� ���� �ڽ� ���μ�����
���� ���� �����带 ����Ѵ�. �� ������� �ѹ� �� ������
����Ѵ�. �Ϲ������� worker�� prefork MPM ���� ����
�޸𸮸� ����ϹǷ� ��ŷ��� ���� ������ �����ϴ�.</li>
<li><module>prefork</module> MPM�� �����尡 �Ѱ��� �ڽ�
���μ����� ������ ����Ѵ�. �� ���μ����� �ѹ� ��
������ ����Ѵ�. ���� �ý��ۿ��� prefork�� �ӵ��� worker��
���������, �� ���� �޸𸮸� ����Ѵ�. ������ ���� ��Ȳ����
�����带 ������� �ʴ� prefork ����� worker�� ����
������ �����: �����忡 �������� (thread-safe) ����
�����ڰ� ���� ����� ����� �� �ְ�, ������ ����� ������
����� �÷��� ���� ������� �� �ִ�.</li>
</ul>
<p>�� MPM��� �ٸ� MPM�� ���� �� �ڼ��� ������ MPM <a
href="/mpm.html">����</a>�� ����ϱ� �ٶ���.</p>
</section>
<section id="modules">
<title>���</title>
<p>�޸� ��뷮�� ���ɿ��� ���� �߿��� �����̱⶧����
������ ������� �ʴ� ����� �����غ���. ����� <a
href="/dso.html">DSO</a>�� �������ߴٸ� ������ ��
��⿡ ���� <directive
module="mod_so">LoadModule</directive> ���þ �ּ�ó���ϸ�
�ȴ�. �׷��� ����� �����ϰ� �����Ͽ� ����Ʈ�� �����̵�
���������� �����ϴ��� ���캼 �� �ִ�.</p>
<p>�ݴ�� ����� ����ġ �������Ͽ� �������� ��ũ���ִٸ�
������ �ʴ� ����� �����ϱ����� ����ġ�� ���������ؾ�
�Ѵ�.</p>
<p>���⼭ �翬�� � ����� ����ϰ� ������� ����
�ǹ��� ����. ������ ������Ʈ���� �ٸ���. �׷��� �Ƹ���
<em>�ּ���</em> <module>mod_mime</module>,
<module>mod_dir</module>, <module>mod_log_config</module>
����� ����� ���̴�. ���� ������Ʈ�� �α������� �ʿ��ٸ�
<code>mod_log_config</code>�� �� �ȴ�. �׷��� ��õ����
�ʴ´�.</p>
</section>
<section>
<title>Atomic ���</title>
<p><module>mod_cache</module> ���� ���� �ֱ� ��������
worker MPM�� APR�� atomic API�� ����Ѵ�. �� API�� �淮��
������ ����ȭ�� ���� atomic ����� �����Ѵ�.</p>
<p>�⺻������ APR�� �� �ü��/CPU �÷��� ���� ȿ������
����� ����Ͽ� �� ����� �����Ѵ�. ���� ���, ���� �ֽ�
CPU���� �ϵ����� atomic compare-and-swap (CAS) ������
�ϴ� ��ɾ �ִ�. �׷��� � �÷��� APR�� �̷�
��ɾ ��� ������ CPU�� ȣȯ���� ���� �� ���� mutex���
������ �⺻������ ����Ѵ�. �̷� �÷��� ����ġ��
�������Ҷ� ����ġ�� �ֽ� CPU������ ������ ��ȹ�̶��,
����ġ�� �����Ҷ� <code>--enable-nonportable-atomics</code>
�ɼ��� ����Ͽ� �� �� atomic ������ ������ �� �ִ�:</p>
<example>
/buildconf<br />
/configure --with-mpm=worker --enable-nonportable-atomics=yes
</example>
<p><code>--enable-nonportable-atomics</code> �ɼ��� ������
���� �÷��� ������ �ִ�:</p>
<ul>
<li>SPARC���� Solaris<br />
�⺻������ APR�� Solaris/SPARC���� mutex��� atomic��
����Ѵ�. �׷��� �����Ҷ�
<code>--enable-nonportable-atomics</code>�� ����ϸ�
APR�� �� �ϵ���� compare-and-swap�� ���� SPARC
v8plus ��ɾ ����Ѵ�. �� �ɼ��� ����ϸ� atomic
����� �� ȿ���������� (CPU�� �� ����ϰ� �� ����
����ȭ�� �����ϴ�), �������� ���������� UltraSPARC
Ĩ������ ������ �� �ִ�.
</li>
<li>Linux on x86<br />
�⺻������ APR�� ���������� mutex��� atomic��
����Ѵ�. �׷��� �����Ҷ�
<code>--enable-nonportable-atomics</code>�� ����ϸ�
APR�� �� �ϵ���� compare-and-swap�� ���� 486
��ɾ ����Ѵ�. �� ȿ������ atomic ����� ����������,
�������� ���������� 486 �̻� Ĩ������ (386�� �ȵȴ�)
������ �� �ִ�.
</li>
</ul>
</section>
<section>
<title>mod_status�� ExtendedStatus On</title>
<p>����ġ�� �������Ҷ� <module>mod_status</module>�� �����ϰ�
�����Ҷ� <code>ExtendedStatus On</code>�� �����ϸ� ����ġ��
��û�� ���������� <code>gettimeofday(2)</code>(Ȥ�� �ü����
��� <code>times(2)</code>)�� �ι� ȣ���ϰ� (1.3 �����)
<code>time(2)</code>�� �߰��� ������ ȣ���Ѵ�. ���� ���?��
���۽ð��� �ʿ��ϱ� �����̴�. �ֻ��� ������ ��������
(�⺻����) <code>ExtendedStatus off</code>�� �����Ѵ�.</p>
</section>
<section>
<title>accept ����ȭ - ���� ����</title>
<note type="warning"><title>����:</title>
<p> �Ʒ� ������ ����ġ ������ 2.0 ���� ����� ������
��� ���� �ʴ�. ������ ��ȿ�� ������ ������, �����ؼ�
����ϱ� �ٶ���.</p>
</note>
<p>���н� ���� API�� ������ �����Ѵ�. �������� ���� ��Ʈ
Ȥ�� ���� �ּҸ� ��ٸ������� ���� <directive
module="mpm_common">Listen</directive>�� ����Ѵٰ� ��������.
������ �������� �� ������ �˻��ϱ����� ����ġ��
<code>select(2)</code>�� ����Ѵ�. <code>select(2)</code>��
���Ͽ� ��ٸ��� �ִ� ������ <em>�����</em> Ȥ�� <em>�ּ���
�Ѱ�</em> �ִ��� �˷��ش�. ����ġ���� ���� �ڽ��� �ְ�,
���� �ִ� ��� �ڽ��� ���ÿ� ���ο� ������ �˻��Ѵ�. ��
������ ������ ����ϴ� (�� ���� �ڵ忡�� �������� �ʾҴ�.
���� �����ϱ����� �뵵�� ������.):</p>
<example>
for (;;) {<br />
<indent>
for (;;) {<br />
<indent>
fd_set accept_fds;<br />
<br />
FD_ZERO (&amp;accept_fds);<br />
for (i = first_socket; i &lt;= last_socket; ++i) {<br />
<indent>
FD_SET (i, &amp;accept_fds);<br />
</indent>
}<br />
rc = select (last_socket+1, &amp;accept_fds, NULL, NULL, NULL);<br />
if (rc &lt; 1) continue;<br />
new_connection = -1;<br />
for (i = first_socket; i &lt;= last_socket; ++i) {<br />
<indent>
if (FD_ISSET (i, &amp;accept_fds)) {<br />
<indent>
new_connection = accept (i, NULL, NULL);<br />
if (new_connection != -1) break;<br />
</indent>
}<br />
</indent>
}<br />
if (new_connection != -1) break;<br />
</indent>
}<br />
process the new_connection;<br />
</indent>
}
</example>
<p>�׷��� ���� �ܼ��� �������� �ɰ��� �?(starvation)
������ �ִ�. ���� �ڽ��� ���ÿ� �� �ݺ����� �����ϸ�,
��û�� ��ٸ��� ��� <code>select</code>���� �����. �̶�
� ���Ͽ� ��û�� �ϳ��� ������ ��� �ڽ��� ����
(���� �ڽ��� ������ �ü���� Ÿ�ֿ̹� ��� �ٸ���).
�̵��� ��� ������ <code>accept</code>�ϱ� �õ��Ѵ�. �׷���
(������ �� ���Ḹ ������̶��) �� �ڽĸ� �����ϰ�, ��������
<code>accept</code>���� <em>�����.</em> �׷��� �� �ڽĵ���
�� ������ ��û���� �����ϵ��� ������, �� �������� ���ο�
��û�� ����� ���ͼ� ��� �ڽ��� ��ﶧ���� �������ִ�.
�̷� �? ������ <a
href="http://bugs.apache.org/index/full/467">PR#467</a>��
ó�� ����Ǿ��. �ּ��� �ΰ��� �ذ�å�� �ִ�.</p>
<p>�Ѱ����� ������ ������� �ʵ��� (non-blocking) �����
����̴�. �� ��� �ڽ��� <code>accept</code>�� �ص� ������
�ʰ�, ��� ������ �� �ִ�. �׷��� CPU �ð��� �����Ѵ�.
<code>select</code>���� ���� �ڽ��� 10�� �ְ�, ���� ������
�Ѱ� ���Դٰ� ��������. �׷��� �� �ڽ��� 9���� ����
������ <code>accept</code>�ϱ� �õ��ϰ� �����ϸ� �ƹ�
�ϵ� ���� �ʰ� �ٽ� <code>select</code>�� �ݺ��Ѵ�. �ٽ�
<code>select</code>�� ���ƿ� ������ � �ڽĵ� �ٸ� ���Ͽ�
���� ��û�� �������� �ʴ´�. (�������μ��� ��ǻ�Ϳ���)
���� �ڽ� ������ŭ CPU ������ �ִ� �幮 ��찡 �ƴ϶��
�� �ذ�å�� ���� ���ƺ����� �ʴ´�.</p>
<p>�ٸ� ����� ����ġ�� ����ϴ� ������� ���� �ݺ�����
�� �ڽĸ��� �鿩������. �ݺ����� ������ ���� (���̸�
��������):</p>
<example>
for (;;) {<br />
<indent>
<strong>accept_mutex_on ();</strong><br />
for (;;) {<br />
<indent>
fd_set accept_fds;<br />
<br />
FD_ZERO (&amp;accept_fds);<br />
for (i = first_socket; i &lt;= last_socket; ++i) {<br />
<indent>
FD_SET (i, &amp;accept_fds);<br />
</indent>
}<br />
rc = select (last_socket+1, &amp;accept_fds, NULL, NULL, NULL);<br />
if (rc &lt; 1) continue;<br />
new_connection = -1;<br />
for (i = first_socket; i &lt;= last_socket; ++i) {<br />
<indent>
if (FD_ISSET (i, &amp;accept_fds)) {<br />
<indent>
new_connection = accept (i, NULL, NULL);<br />
if (new_connection != -1) break;<br />
</indent>
}<br />
</indent>
}<br />
if (new_connection != -1) break;<br />
</indent>
}<br />
<strong>accept_mutex_off ();</strong><br />
process the new_connection;<br />
</indent>
}
</example>
<p><code>accept_mutex_on</code>�� <code>accept_mutex_off</code>
<a id="serialize" name="serialize">�Լ�</a>�� mutex �������
�����Ѵ�. �ѹ� ���� �� �ڽĸ��� mutex�� ���� �� �ִ�.
mutex�� �����ϴ� ����� ���������̴�. ���� ����� (1.3
����) <code>src/conf.h</code>�� (1.3�� �� ����)
<code>src/include/ap_config.h</code>�� ���ǵ��ִ�. �
��Ű���Ĵ� ���(locking) ����� �������� �ʱ⶧����, �̷�
��Ű���Ŀ��� ���� <directive
module="mpm_common">Listen</directive> ���þ ����ϸ�
�����ϴ�.</p>
<p>����� <directive
module="mpm_common">AcceptMutex</directive> ���þ ����Ͽ�
mutex ������ ������ �� �ִ�.</p>
<dl>
<dt><code>AcceptMutex flock</code></dt>
<dd>
<p>�� ����� ��������� ��ױ����� <code>flock(2)</code>
�ý���ȣ���� ����Ѵ� (������� ��ġ�� <directive
module="mpm_common">LockFile</directive> ���þ�� ����).</p>
</dd>
<dt><code>AcceptMutex fcntl</code></dt>
<dd>
<p>�� ����� ��������� ��ױ����� <code>fcntl(2)</code>
�ý���ȣ���� ����Ѵ� (������� ��ġ�� <directive
module="mpm_common">LockFile</directive> ���þ�� ����).</p>
</dd>
<dt><code>AcceptMutex sysvsem</code></dt>
<dd>
<p>(1.3�� �� ����) �� ����� SysV�� ������� ����Ͽ�
mutex�� �����Ѵ�. �������� SysV�� ��������� ����
���ۿ��� �ִ�. �ϳ��� ����ġ�� ������� ��������
�ʰ� ���� �� �ִ� ���̴� (<code>ipcs(8)</code> manpage
���). �ٸ� �ϳ��� �������� ������ uid�� �����ϴ�
CGI�� (<em>��,</em> <code>suexec</code>��
<code>cgiwrapper</code>�� ��������ʴ� �� ��� CGI)
�������� API�� ����Ͽ� ���񽺰źΰ���� �� �� �ִ�
���̴�. �̷� ���������� IRIX�� ������ ��Ű���Ŀ���
�� ����� ������� �ʴ´� (��κ��� IRIX ��ǻ�Ϳ���
���� �� ����� ����ġ�� ���̴�).</p>
</dd>
<dt><code>AcceptMutex pthread</code></dt>
<dd>
<p>(1.3�� �� ����) �� ����� POSIX mutex�� ����ϱ⶧����
POSIX ������ �Ծ��� ������ ������ ��Ű���Ķ�� ���
��밡��������, (2.5 ����) Solaris������ �װ͵� Ư��
���������� �����ϴ� ���ϴ�. �� ����� �õ��غ��ٸ�
������ ���缭 ������ ���ϴ��� ������� �Ѵ�. ����
���븸 �����ϴ� ������ �� �����ϴ� �� ����.</p>
</dd>
<dt><code>AcceptMutex posixsem</code></dt>
<dd>
<p>(2.0�� �� ����) �� ����� POSIX ������� ����Ѵ�.
mutex�� ���� ���μ����� �����尡 �״´ٸ�(segfault)
�������� �������� ȸ������ �ʾƼ� �������� �����.</p>
</dd>
</dl>
<p>�ý��ۿ� �� ��Ͽ� ��� ����ȭ(serialization) �����
�ִٸ� �� ����� ����ϴ� �ڵ带 APR�� �߰��� ��ġ�� �ִ�.</p>
<p>����� �غ����� ������������ �ٸ� ����� �κ�������
�ݺ����� ����ȭ�ϴ� ����̴�. ��, ���μ����� ��� �鿩������
���̴�. �� ����� ���� �ڽ��� ���ÿ� ������ �� �־
����ȭ������ ��ü �뿪���� Ȱ������ ���ϴ� �������μ���
��ǻ�Ϳ����� ����� ������ �� �ִ�. ������ ���캼 �κ�������,
�ſ� ����ȭ�� �������� ������ �ʾƼ� �켱������ ����.</p>
<p>�ֻ��� ������ ������ؼ��� ���� <directive
module="mpm_common">Listen</directive> ���� ������� �ʴ�
���� �̻����̴�. �׷��� ��� �����Ѵ�.</p>
</section>
<section>
<title>accept ����ȭ - ���� �Ѱ�</title>
<p>���� ������ ���߼��� �������� ������, ������ �Ѱ���
������ ���? ������ �����Ҷ����� ��� �ڽ���
<code>accept(2)</code>���� �����ֱ⶧���� �̷л� ����
������ �߻����� �ʰ�, �? ������ ���. �׷��� �����δ�
�տ��� ���� ������� �ʴ� (non-blocking) ��� �߻��ϴ�
"��ȸ��(spinning)" ������ ���߰� �ִ�. ��κ��� TCP ������
������ �����ϸ� Ŀ���� <code>accept</code>���� �����ִ�
��� �ڽ��� ��쵵�� �������ִ�. ���μ����� �Ѱ��� ������
��� ����ڿ������� ���ư���, �������� Ŀ�ο��� ��ȸ���Ͽ�
������ ������ �߰��ϸ� �ٽ� ���� �ܴ�. ����ڿ��� �ڵ忡����
�̷� ��ȸ���� �� �� ������, �и��� �����Ѵ�. �׷��� ���߼�����
������� �ʴ� ���� �����ϰ� ���ϸ� ���̴� ���ʿ��� �ൿ��
�Ͼ��.</p>
<p>�׷��� �츮�� ���� ��Ű���Ŀ��� ������ �Ѱ��� ��쿡��
����ȭ�ϸ� �� "��" �������� �߰��ߴ�. �׷��� ���� ��κ���
��� �⺻������ ����ȭ�� ����Ѵ�. ���������� (Ŀ�� 2.0.30,
128Mb �޸𸮿� ��� Pentium pro) ������ ��� ���� �Ѱ���
����ȭ�ϸ� ���� ���� ��쿡 ���� �ʴ� ��û�� 3% �̸�
�پ����. �׷��� ����ȭ�� ���� ���� ��� ��û�� 100ms
������ �߻��ߴ�. �� ������ �Ƹ��� LAN���� �߻��ϴ� ��
���ἱ������ ���̴�. ������ �Ѱ��� ��� ����ȭ�� �������
�������� <code>SINGLE_LISTEN_UNSERIALIZED_ACCEPT</code>��
�����Ѵ�.</p>
</section>
<section>
<title>Close ����(lingering)</title>
<p><a
href="http://www.ics.uci.edu/pub/ietf/http/draft-ietf-http-connection-00.txt">
draft-ietf-http-connection-00.txt</a> 8�� �����ϵ���
<strong>��������</strong> �������� �Ƿ���, ����� �� ������
���������� ���� �� �־�� �Ѵ� (TCP ������ �ֹ����̰�,
������ ���� �������̴�). ������ �ٸ� ���������� ����
����������, ����ġ�� 1.2���� ��Ȯ�� �����ؿԴ�.</p>
<p>�� ����� �������ϰ� ����ġ�� �߰������� ���� ���н�
���� ���� ������ �߻��ߴ�. TCP �Ծ���
<code>FIN_WAIT_2</code>�� Ÿ�Ӿƿ��� �ִٰ� ������ �ʾ�����,
���������� �ʾҴ�. Ÿ�Ӿƿ��� ��� �ý��ۿ��� ����ġ 1.2��
���� ������ ������ <code>FIN_WAIT_2</code> ���·� ������.
���� ��� �� ������ ���ۻ簡 �����ϴ� �ֽ� TCP/IP ��ġ��
����Ͽ� �ذ��� �� �ִ�. �׷��� ���ۻ簡 ��ġ�� ��ǥ����
�ʴ� ��찡 (<em>��,</em> SunOS4 -- �ҽ� ���̼����� �ִ�
����� ���� ��ġ�� �� ������) �ֱ⶧���� �� ����� �������
�ʱ�� �����ߴ�.</p>
<p>����� �ΰ�����. �ϳ��� ���� �ɼ� <code>SO_LINGER</code>��
����ϴ� ����̴�. �׷��� �������� ��κ��� TCP/IP ������
�� �ɼ��� �ùٷ� �������� �ʾҴ�. �ùٷ� ������ ���ÿ���
������ (<em>��,</em> ������ 2.0.31) �� ����� ���� ����
�� cpu�� ��ƸԴ´�.</p>
<p>����ġ�� ���� (<code>http_main.c</code>�� �ִ�)
<code>lingering_close</code>��� �Լ��� ����Ѵ�. �� �Լ���
���� ������ ����:</p>
<example>
void lingering_close (int s)<br />
{<br />
<indent>
char junk_buffer[2048];<br />
<br />
/* shutdown the sending side */<br />
shutdown (s, 1);<br />
<br />
signal (SIGALRM, lingering_death);<br />
alarm (30);<br />
<br />
for (;;) {<br />
<indent>
select (s for reading, 2 second timeout);<br />
if (error) break;<br />
if (s is ready for reading) {<br />
<indent>
if (read (s, junk_buffer, sizeof (junk_buffer)) &lt;= 0) {<br />
<indent>
break;<br />
</indent>
}<br />
/* just toss away whatever is here */<br />
</indent>
}<br />
</indent>
}<br />
<br />
close (s);<br />
</indent>
}
</example>
<p>�� �ڵ�� ������ ������ �� CPU�� ���������, ��������
������ ���� �ʿ��ϴ�. HTTP/1.1�� �� �θ� ������ ��� ������
�����Ѵٸ�(persistent), ������ �޴� ����� ���� ��û��
ó���ϸ鼭 ���� ���̴�. �����ϰԵ�
<code>NO_LINGCLOSE</code>�� �����Ͽ� �� ����� �������
���� �� ������, ���� ������ �ʴ´�. Ư�� HTTP/1.1
���������� <transnote>�������� ���¿��� ������ ��ٸ���
�ʰ� ���� ��û�� ������ ���</transnote> ������������
<code>lingering_close</code>�� �ʼ����̴� (�׸��� <a
href="http://www.w3.org/Protocols/HTTP/Performance/Pipeline.html">
���������� ������ �� ��⶧����</a> ����ϱ� �ٶ� ���̴�).</p>
</section>
<section>
<title>Scoreboard ����</title>
<p>����ġ�� �θ�� �ڽ��� scoreboard��� ���� ���� ����
����Ѵ�. �̻������δ� scoreboard�� �����޸𸮷� �����ؾ�
�Ѵ�. �츮 �����ڰ� �ش� �ü���� ������ �� �ְų� ����
���� ��� ���� ��� ���� �����޸𸮸� ����Ͽ� �����Ѵ�.
�������� ��ũ�� �ִ� ������ ����Ͽ� �����Ѵ�. ��ũ��
�ִ� ������ ������ �ŷڵ��� ������� (��ɵ� �� ���).
<code>src/main/conf.h</code> ���Ͽ��� ����ϴ� ��Ű���ĸ�
ã�Ƽ� <code>USE_MMAP_SCOREBOARD</code> Ȥ��
<code>USE_SHMGET_SCOREBOARD</code>���� Ȯ���Ѵ�. ����
�ϳ��� (���� �Բ� ����� <code>HAVE_MMAP</code>�̳�
<code>HAVE_SHMGET</code>�� ����) �����ϸ� �����޸� �ڵ带
����Ѵ�. �ý����� �ٸ� ������ �����޸𸮸� ����Ѵٸ�
<code>src/main/http_main.c</code> ������ �����Ͽ� ����ġ����
�����޸𸮸� ����� �� �ֵ��� ��(hook)�� �߰��϶�. (����
��ġ�� �츮���� �����ֱ� �ٶ���.)</p>
<note>������ ����: ����ġ�� ������ ������ ����ġ 1.2 �������
�����޸𸮸� ����ϱ� �����ߴ�. ���������� �ʱ� ����ġ
������ ������ �ŷڵ��� �������� �����̴�.</note>
</section>
<section>
<title>DYNAMIC_MODULE_LIMIT</title>
<p>����� �������� �о������ �ʴ´ٸ� (������ �����̶�
������ ���̱����� �� ���� �д´ٸ� �Ƹ��� ����� ��������
�о������ ���� ���̴�), ������ �������Ҷ�
<code>-DDYNAMIC_MODULE_LIMIT=0</code>�� �߰��Ѵ�. �׷���
����� �������� �о���̱����� �Ҵ��ϴ� �޸𸮸� ����Ѵ�.</p>
</section>
</section>
<section id="trace">
<title>�η�: �ý���ȣ�� ����� �ڼ��� �м��ϱ�</title>
<p>������ Solaris 8���� worker MPM�� ����� ����ġ 2.0.38��
�ý���ȣ�� ���(trace)�̴�. �Ʒ� ��ɾ ����Ͽ� �����
����:</p>
<example>
truss -l -p <var>httpd_child_pid</var>.
</example>
<p><code>-l</code> �ɼ��� ����ϸ� truss�� �ý���ȣ����
�ϴ� LWP (lightweight process, �淮�� ���μ���--Solaris��
Ŀ�μ��� ������) ID�� ���� ����Ѵ�.</p>
<p>�ٸ� �ý��ۿ��� <code>strace</code>, <code>ktrace</code>,
<code>par</code> ���� �ý���ȣ�� ���� ������ �ִ�. ����
����ϴ�.</p>
<p>Ŭ���̾�Ʈ�� ���������� ũ�Ⱑ 10KB�� ���� ������ ��û�Ѵ�.
������ ������ ��û���� �ʰų� ��������ϴ� ��û�� �� ���
����� �ſ� �ٸ��� (���δ� �ſ� �˾ƺ��� ����).</p>
<example>
<pre>/67: accept(3, 0x00200BEC, 0x00200C0C, 1) (sleeping...)
/67: accept(3, 0x00200BEC, 0x00200C0C, 1) = 9</pre>
</example>
<p>������ ������(listener) �����尡 LWP #67���� �������
�� �� �ִ�.</p>
<note><code>accept(2)</code> ����ȭ�� ������� ������ �ָ��϶�.
���� ��Ʈ�� ��ٸ����ʴ� ��� �� �÷����� worker MPM��
�⺻������ ����ȭ���� ���� accept�� ����Ѵ�.</note>
<example>
<pre>/65: lwp_park(0x00000000, 0) = 0
/67: lwp_unpark(65, 1) = 0</pre>
</example>
<p>������ �޾Ƶ��̰�(accept) ������ �������
worker �����带 ����� ��û�� ó���ϰ� �Ѵ�. �Ʒ� ��Ͽ���
��û�� ó���ϴ� worker �����尡 LWP #65���� �� �� �ִ�.</p>
<example>
<pre>/65: getsockname(9, 0x00200BA4, 0x00200BC4, 1) = 0</pre>
</example>
<p>����ȣ��Ʈ�� �����ϱ����� ����ġ�� ������ �޾Ƶ���
����(local) ���� �ּҸ� �˾ƾ� �Ѵ�. (����ȣ��Ʈ�� �������
�ʰų� <directive module="mpm_common">Listen</directive>
���þ ���ϵ�ī�� �ּҸ� ������� ���� ��� ��) ���� ���
�� ȣ���� ��� �� �ִ�. �׷��� ���� �̷� ����ȭ �۾���
�ȵ��ִ�. </p>
<example>
<pre>/65: brk(0x002170E8) = 0
/65: brk(0x002190E8) = 0</pre>
</example>
<p><code>brk(2)</code> ȣ���� ��(heap)���� �޸𸮸� �Ҵ��Ѵ�.
�������� ��κ��� ��û ó���� ��ü �޸�
�Ҵ���(<code>apr_pool</code>�� <code>apr_bucket_alloc</code>)��
����ϱ⶧���� �ý���ȣ�� ��Ͽ��� �� �ý���ȣ���� ���Ⱑ
�幰��. �� ��Ͽ��� �������� �������ڸ��� ��ü �޸� �Ҵ��ڰ�
����� �޸𸮺���� ������� <code>malloc(3)</code>�� ȣ���Ѵ�.</p>
<example>
<pre>/65: fcntl(9, F_GETFL, 0x00000000) = 2
/65: fstat64(9, 0xFAF7B818) = 0
/65: getsockopt(9, 65535, 8192, 0xFAF7B918, 0xFAF7B910, 2190656) = 0
/65: fstat64(9, 0xFAF7B818) = 0
/65: getsockopt(9, 65535, 8192, 0xFAF7B918, 0xFAF7B914, 2190656) = 0
/65: setsockopt(9, 65535, 8192, 0xFAF7B918, 4, 2190656) = 0
/65: fcntl(9, F_SETFL, 0x00000082) = 0</pre>
</example>
<p>���� worker ������� Ŭ���̾�Ʈ�� ����(���ϱ���� 9)��
������(non-blocking) ���·� �ٲ۴�. <code>setsockopt(2)</code>��
<code>getsockopt(2)</code> ȣ���� Solaris�� libc�� ���Ͽ�
���� <code>fcntl(2)</code>�� ��� ó���ϴ��� �����ش�.</p>
<example>
<pre>/65: read(9, " G E T / 1 0 k . h t m".., 8000) = 97</pre>
</example>
<p>worker ������� Ŭ���̾�Ʈ�� ���� ��û�� �д´�.</p>
<example>
<pre>/65: stat("/var/httpd/apache/httpd-8999/htdocs/10k.html", 0xFAF7B978) = 0
/65: open("/var/httpd/apache/httpd-8999/htdocs/10k.html", O_RDONLY) = 10</pre>
</example>
<p>������ ������ <code>Options FollowSymLinks</code>��
<code>AllowOverride None</code>�̴�. �׷��� ��û�� ���ϰ����
�� ���丮�� ���� <code>lstat(2)</code>�ϰų�
<code>.htaccess</code> ������ �˻��� �ʿ䰡 ���. ������
�˻��ϱ�����, 1) ������ �ִ���, 2) ���丮�� �ƴ� �Ϲ���������,
<code>stat(2)</code> ȣ�⸸ �ϸ� �ȴ�.</p>
<example>
<pre>/65: sendfilev(0, 9, 0x00200F90, 2, 0xFAF7B53C) = 10269</pre>
</example>
<p>�� ��� �������� �ѹ��� <code>sendfilev(2)</code> �ý���ȣ���
HTTP ��������� ��û�� ������ ����� �� �ִ�. Sendfile ����δ�
�ü������ �ٸ���. �ٸ� �ý����̶�� <code>sendfile(2)</code>��
ȣ���ϱ� �� ����� ���������� <code>write(2)</code>��
<code>writev(2)</code> ȣ���� �Ѵ�.</p>
<example>
<pre>/65: write(4, " 1 2 7 . 0 . 0 . 1 - ".., 78) = 78</pre>
</example>
<p><code>write(2)</code> ȣ���� ���ٷα�(access log)�� ��û��
����Ѵ�. �� ��Ͽ� <code>time(2)</code> ȣ���� ������ �ָ��϶�.
����ġ 1.3�� �޸� ����ġ 2.0�� �ð��� �˱�����
<code>gettimeofday(3)</code>�� ����Ѵ�.
<code>gettimeofday</code>�� ����ȭ�� �������� Solaris ����
��� �ü�������� �Ϲ����� �ý���ȣ�� �δ��� ���.</p>
<example>
<pre>/65: shutdown(9, 1, 1) = 0
/65: poll(0xFAF7B980, 1, 2000) = 1
/65: read(9, 0xFAF7BC20, 512) = 0
/65: close(9) = 0</pre>
</example>
<p>worker ������� ������ �����ݱ�(lingering close)�Ѵ�.</p>
<example>
<pre>/65: close(10) = 0
/65: lwp_park(0x00000000, 0) (sleeping...)</pre>
</example>
<p>���������� worker ������� ��� ����� ������ �ݰ�,
������(listener) �����尡 �ٸ� ������ �Ҵ��� ������
�����Ѵ�.</p>
<example>
<pre>/67: accept(3, 0x001FEB74, 0x001FEB94, 1) (sleeping...)</pre>
</example>
<p>�׵��� ������ ������� ������ (��� worker�� �۾����̸�
������ �����带 ���ߴ� worker MPM�� �帧���� ��ɿ� ���)
worker �����忡 �Ҵ����ڸ��� �ٸ� ������ �޾Ƶ��� �� �ִ�.
�� ��Ͽ��� ������ ������, worker �����尡 ��� ���� ������
ó���ϴ� ���� ���� <code>accept(2)</code>�� (��û�� �ſ�
���� ��� �׻�) �Ͼ �� �ִ�.</p>
</section>
</manualpage>