Technical data

Using Native I/O for Serving Static Files (Windows Only)
Configuring and Managing WebLogic Server 7-25
The client must specify the port in the URL, even if the port is 80. You can set up your
WebLogic Server to listen for HTTP requests on any port, although the most common
choice is port 80 since requests to port 80 are customarily allowed through a firewall.
You specify the listen port for WebLogic Server in the Administration Console under
the “Servers” node, under the “Network” tab.
Using Native I/O for Serving Static Files
(Windows Only)
When running WebLogic Server on Windows NT/2000 you can specify that
WebLogic Server use the native operating system call
TransmitFile instead of using
Java methods to serve static files such as
HTML files, text files, and image files. Using
native I/O can provide performance improvements when serving larger static files.
Native I/O is enabled by default. You can disable it by clicking on server/tuning and
deselecting the checkbox. When you save this configuration it is written to the
config.xml file rather than the web.xml file used when you configure Native I/O
programmatically.
To configure native I/O programmatically, add two parameters to the
web.xml
deployment descriptor of a Web Application containing the files to be served using
native I/O. The first parameter,
weblogic.http.nativeIOEnabled should be set to
TRUE to enable native I/O file serving. The second parameter,
weblogic.http.minimumNativeFileSize sets the minimum file size for using
native I/O. If the file being served is larger than this value, native I/O is used. If you
do not specify this parameter, a value of
400 bytes is used.
Generally, native I/O provides greater performance gains when serving larger files;
however, as the load on the machine running WebLogic Server increases, these gains
diminish. You may need to experiment to find the correct value for
weblogic.http.minimumNativeFileSize.
The following example shows the complete entries that should be added to the
web.xml deploymentdescriptor. These entries must be placed in the web.xml file after
the
<distributable> element and before <servlet> element.