Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache 1.0.2 2001 2 : J02963-01
Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache, 1.0.2 : J02963-01 Oracle9i Application Server Oracle HTTP Server powered by Apache Performance Guide Release 1.0.2 for Windows NT A86676-01 Sharon Malek, Carol Orange, Leela Rao Copyright 2000 Oracle Corporation. All rights reserved. Printed in Japan. * Oracle Corporation Oracle Corporation Restricted Rights Legend Restricted Rights Legend Programs delivered subject to the DOD FAR Supplement are "commercial computer software" and use, duplication and disclosure of the Programs shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement. Otherwise, Programs delivered subject to the Federal Acquisition Regulations are "restricted computer software" and use, duplication and disclosure of the Programs shall be subject to the restrictions in FAR 52.227-14, Rights in Data -- General, including Alternate III (June 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City, CA 94065.
... v 1... 1-2... 1-2... 1-4... 1-4... 1-5... 1-6... 1-6... 1-7... 1-7... 1-7... 1-8... 1-9... 1-10 2 Web... 2-2... 2-2... 2-3... 2-3... 2-4... 2-5 Web... 2-6 i
mod_status Web... 2-6 JServ... 2-10 3... 3-2 CPU... 3-3... 3-4 Oracle HTTP Server... 3-4 JServ... 3-4 Java... 3-4 OracleJSP... 3-5 CPU JServ... 3-6 4 HTTP... 4-2 ThreadsPerChild... 4-2 ThreadsPerChild... 4-3 ThreadsPerChild... 4-3 SSL... 4-3... 4-4 HTTP/1.1... 4-4... 4-4 5 Apache JServ JServ... 5-2... 5-3... 5-3... 5-3... 5-4... 5-6 OracleJSP... 5-7 OracleJSP... 5-8... 5-8... 5-8... 5-9 ii
OracleJSP... 5-9 iii
iv
Oracle HTTP Server powered by Apache Web Apache 100Mbps v
Oracle HTTP Server powered by Apache Oracle9i Application Server Web 1 Oracle9i Application Server Oracle HTTP Server 2 Web Web 3 4 HTTP HTTP 5 Apache JServ Apache JServ OracleJSP vi
ub4 sword OCINumber C parallel_clause Uold_release.SQL old_release sqlplus SQL*Plus department_id department_name location_id hr.departments QUERY_REWRITE_ENABLED true oe SQL PL/SQL SQL*Plus SELECT username FROM dba_users WHERE username = 'MIGRATE'; vii
[ ] 1 { } 2 1 1...... DECIMAL (digits [, precision ]) {ENABLE DISABLE} {ENABLE DISABLE} [COMPRESS NOCOMPRESS] CREATE TABLE...AS subquery; SELECT col1, col2,..., coln FROM employees; acctbal NUMBER(11,2); acct CONSTANT NUMBER(4) := 3; CONNECT SYSTEM/system_password SELECT last_name, employee_id FROM employees; SELECT * FROM USER_TABLES; DROP TABLE hr.employees; SELECT last_name, employee_id FROM employees; sqlplus hr/hr viii
1 Oracle9i Application Server 1-1
1-2 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
: 1-7 1-1 1 10 1-1 1 2 3 4 5 6 7 8 9 10 1 2 1 3 1 2 1-3
CPU CPU 1 1 10 9 1-2 1-2 1-4 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
CPU I/O 1-3 1-3 2 1-5
1-4 Oracle HTTP Server ThreadsPerChild JServ security.maxconnections 1-4 CPU CPU 1-6 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
3 I/O I/O 1-7
90% 5 20 1-5 9 10 1 2 1-5 1-8 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
: : 3 : 4 HTTP 5 Apache JServ : 2 Web : : 3 4 HTTP 5 Apache JServ 2 Web 1-9
1-6 Oracle9i Application Server Oracle HTTP Server powered by Apache Apache JServ OracleJSP 1-6 Oracle9i Application Server 1-10 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
2 Web Web JServ Web 2-1
Network Monitor Network Monitor Windows NT Network Monitor Agent Network Monitor 2 Network Monitor Web Windows Oracle HTTP Server 2 5MB 1 5% CPU HTTP Java Process % Processor Time % User Time Page Faults/sec Working Set System Memory Cache PhysicalDisk LogicalDisk Paging File 2-2 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
Process Thread Server Processor Browser Server 1. 2. 1. 2. 3. 4. Process 5. HTTP 2 Apache 6. [Ctrl] 7. 8. 2-1 2 HTTP Apache Web 2-3
2-1 1. 2. 3. 4. [Ctrl] 5. 6. 7. 8. 9. 2-4 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
10. : 3 1. 2. 3. 4. 5. 6. 7. OK 8. 9. 10. OK 11. Web 2-5
Web 12. 13. Web Oracle HTTP Server mod_status Web mod_status Web httpd.conf your_domain.com <Location /server-status> SetHandler server-status Order deny, allow Deny from all Allow from your_domain.com </Location> ExtendedStatus On your_domain.com http://hostname:port/server-status hostname:port 2-6 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
Web Web 2-7
Web 2-2 ExtendedStatus 2-2 2-8 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
Web ExtendedStatus 1 ThreadsPerChild 50 49 M 2-2 URL refresh http://servername:port/server-status?refresh=x servername:port x 3 refresh=3 URL auto http://servername:port/server-status?auto 2-3 Web 2-9
JServ JServ Oracle9i Application Server JServ Status JServ Up Down 1. jserv.conf JServ JServ localhost <Location /jserv/> SetHandler jserv-status order deny, allow deny from all allow from hostname_1.com allow from hostname_2.com </Location> 2. http://hostname:port/jserv/ port Web httpd.conf Configured Hosts 3. JServ 2-4 2-10 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
JServ 2-4 JServ Web 2-11
JServ : JServ jserv.conf JServ 2-4 4 JServ Up 1 Down 4 : Status Up Down + - X / 2-12 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
3 CPU CPU 3-1
80% : httpd.conf ThreadsPerChild 3-2 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
CPU 3-1 3-1 1 2 3 1 1 CPU 4 5 6 % 7 100 0 0.3 100 5.2 19 99 100 1 0.3 65-100 4.2 19 99 100 10 0.3 0-32 0.9 9 48 100 10 0.6 0-53 2.9 8 80-2 - 3-1 4-2-6 mod_ status Web 5-6 1-7 CPU - CPU CPU CPU 3-2 CPU CPU 2 Web 3-2 400 MHz x86 CPU 20KB CPU 5msec JDK Java Developer's Kit 1.2 50msec 3-3
Oracle HTTP Server JServ Java OracleJSP CPU JServ Oracle HTTP Server HTTP 6MB 12MB JServ JDK 1.2 JServ 7MB 12MB NT JServ Apache JServ 1 5 Java JDK 1.2 67MB Java java.lang Runtime.getRuntime().totalMemory() Runtime.getRuntime().freeMemory 3-4 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
128MB jserv.properties Java wrapper.bin.parameters=-mx128m JServ JServ JServ OracleJSP OracleJSP JDK 1.2 OracleJSP 7MB OracleJSP JServ 12MB : 3-4 JServ JServ 8MB OracleJSP 8MB <%@ page session="false" %> jserv.properties false 3-5
CPU JServ 1 CPU 2 JServ 4 CPU 1 JServ 2 JServ 4 JServ 8 JServ 1 JServ 10 50% JServ jserv.properties security.maxconnections JServ 50 httpd.conf ThreadsPerChild JServ security.maxconnections 10 : SingleThreadModel security.maxconnections singlethreadmodelservlet.maximumcapacity 10 HTTP JServ JServ x security.maxconnections = ThreadsPerChild x 2 HTTP JServ HTTP JServ security.maxconnections Java JServ 1 10 20 JVM Java httpd JServ : JServ 5-4 3-6 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
4 HTTP ThreadsPerChild Oracle HTTP Server ThreadsPerChild SSL HTTP/1.1 HTTP 4-1
Oracle HTTP Server 1. 2. TCP/IP / 3 3. / TCP OK / 1 : TCP/IP TCP/IP ThreadsPerChild httpd.conf ThreadsPerChild HTTP ThreadsPerChild TCP/IP TCP/IP 4-2 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
SSL ThreadsPerChild HTTP ThreadsPerChild JServ JServ jserv.properties security.maxconnections HTTP JServ JServ ThreadsPerChild 4 JServ security.maxconnections 10 JServ 40 ThreadsPerChild 20 ThreadsPerChild ThreadsPerChild 1 CPU 20 CPU 4 ThreadsPerChild 80 CPU 85% ThreadsPerChild mod_status : 2-6 mod_status Web SSL Oracle HTTP Server SSL SSL SSL 5 5.54 SSL 5 1.18 httpd.conf SSLSessionCacheTimeout 300 SSLSessionCache %ORACLE_HOME% Apache Apache logs Oracle HTTP Server SSL HTTP HTTP 4-3
HostNameLookups 2 7% HostNameLookups HostNameLookups Off IP HostNameLookups IP DNS HostNameLookups 10 12% DNS DNS IP HTTP/1.1 Oracle HTTP Server HTTP/1.1 Netscape Navigator 4.0 HTTP/1.0 1.1 Internet Explorer HTTP/1.1 1 HTTP/1.1 Apache KeepAlive HTTP/1.1 Netscape 4-4 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
HTTP/1.1 1 HTTP Web 3 Web 1 5 1 2 1 2 2 1 3 2 15 1 5 2 2 2 3 2 12 20% 1 HTTP 4-5
HTTP/1.1 OracleJSP Oracle9i Application Server lotto.jsp 1 1 5 20% 10 100 6% 4-6 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
5 Apache JServ JServ OracleJSP Oracle JavaServer Pages 1.1 JServ OracleJSP OracleJSP Apache JServ 5-1
JServ JServ Apache JServ httpd mod_jserv Apache Java mod_jserv C JServ JVM Java 5-1 JServ HTTP JServ Apache JServ Protocol 1.2 5-1 Apache JServ 5-2 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
JServ JVM 1 Apache JServ JVM servlets.startup init() servlets.startup JServ JSP JSP HttpServlet oracle.jsp.jspservlet servlets.startup JSP 1 init() servlets.startup autoreload.classes True False Apache JServ 5-3
autoreload.classes=false autoreload.file=false JServ HTTP Apache JServ 3 HTTP 2 JServ jserv.properties JServ JServ JServ Oracle HTTP Server %ORACLE_HOME% Apache Apache bin JServ JServ 3-4 Java JServ JServ jserv.properties JServ 1. JServ copy jserv.properties jserv1.properties copy jserv.properties jserv2.properties 2. jserv1.properties port=8001 log.file=e: Oracle isuites Apache jserv logs jserv1.log 3. jserv2.properties port=8002 log.file=e: Oracle isuites Apache jserv logs jserv2.log 5-4 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
: HTTP JServ HTTP IP jserv.properties security.allowedaddresses Web %ORACLE_HOME% Apache Apache bin startjserv.bat stopjserv.bat jserv.conf 1. ApJServManual on 2. a. ApJServMount ApJServMount /servlets /root http://your.server.com/servlets/testservlet ApJServMount /root testservlet b. /root balance://set/root ApJServMount /servlets balance://jserv_set/root ApJServBalance JServ_set JServ1 ApJServBalance JServ_set JServ2 2 ApJServHost JServ1 ajpv12://127.0.0.1:8001 ApJServHost JServ2 ajpv12://127.0.0.1:8002 ApJServRoute JS1 JServ1 ApJServRoute JS2 JServ2 ApJServShmFile E: Oracle isuites Apache jserv logs jserv_shm ApJServMount /servlets balance://set/root /servlets JServ1 JServ2 ApJServBalance JServ1 JServ2 JServ2 '2' 2 JServ2 JServ2 2/3 JServ Apache JServ 5-5
ApJServHost ApJServRoute JServ JServ 1 JServ Cookie ApJServShmFile httpd JServ JServ mod_jserv JServ 1. httpd 2. mod_jserv JServ 1 JServ ApJServBalance set JServ2 2 JServ2 3. httpd mod_jserv 4. mod_jserv JServ a. mod_jserv ApJServRoute JServ b. mod_jserv JServ SingleThreadModel STM STM 25% STM init() destroy() doget() service() JDBC zone.properties STM 3 5-6 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
OracleJSP JServ DB / JServ = 1 STM JServ 3 5-4 1 10 zone.properties singlethreadmodelservlet.initialcapacity = 10 singlethreadmodelservlet.incrementcapacity = 0 singlethreadmodelservlet.maximumcapacity = 10 : singlethreadmodelservlet.maximumcapacity jserv.properties security.maxconnections JServ OracleJSP OracleJSP 1.1.0.0 JavaServer Pages 1.1 Oracle Oracle JavaBeans SQL Oracle9i Application Server Apache JServ 5-7
OracleJSP OracleJSP Oracle JSP 0.5MB OracleJSP <%@ page session="false" %> 30 session.invalidate() OracleJSP Oracle8i JavaServer Pages 1 True jserv.properties False servlet.oracle.jsp.jspservlet.initargs=developer_mode=false True OracleJSP JDK 1.2 50 128MB TCP 14% 28% 5-8 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
OracleJSP OracleJSP contexttype JSP <%@ page buffer= none %> OracleJSP 8KB OracleJSP OracleJSP OracleJSP JDBC JDBC Apache JServ 5-9
OracleJSP <%@ include file= /jsp/filename.jsp %> JSP 64KB <jsp:include page= /jsp/filename.jsp flush="true" /> JSP 5-10 Oracle9i Application Server for Windows NT Oracle HTTP Server powered by Apache
A Apache JServ Protocol 1.2 5-2 ApJServBalance 5-5 ApJServManual 5-5 ApJServMount 5-5 ApJServRoute 5-5 ApJServShmFile 5-5 C CPU 3-3 2-2 1-4 3-3 D developer_mode 5-8 E ExtendedStatus 2-8 H httpd.conf 3-6 I servlets.startup 5-3 J JDBC 5-6 JServ 5-2 5-4 5-3 5-4 5-4 JServ Protocol 1.2 5-2 jserv.conf 2-12 jserv.properties 3-6 5-4 JSP 5-7 M mod_jserv 5-2 5-6 mod_status 2-6 N Network Monitor 2-2 O Oracle9i Application Server 1-10 oracle.jsp.jspservlet 5-3 S security.allowedaddresses 5-5 security.maxconnections 3-6 SetHandler 2-6 -1
-2 singlethreadmodelservlet.maximumcapacity 3-6 SSL 4-3 T ThreadsPerChild 2-9 3-6 4-2 Z zone.properties 5-6 JServ 5-2 Oracle9i Application Server 1-10 2-6 1-4 1-3 3-2 1-2 1-8 1-7 2-12 1-6 5-9 1-4 2-6 2-6 2-6 1-3 1-2 SingleThreadModel 5-6 5-2 5-3 5-3 5-6 1-2 3-2 2-12 1-5 1-6 1-2 2-6 1-6 1-4 1-2 JServ 5-6 SSL 4-3 5-6 5-3 2-12 1-4 1-2 1-4 1-6 5-6
2-6 2-9 1-7 1-2 3-2 3-2 5-3 1-2 3-2 5-4 1-2 1-7 3-1 1-8 Apache JServ 1.2 5-2 HTTP/1.1 4-4 JServ 2-10 2-9 2-6 3-2 1-6 5-3 -3
-4