Technical data

Using Native I/O for Serving Static Files (Windows Only)
Administration Guide 8-27
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.
To use native I/O, 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 deployment descriptor. These entries must be placed in the web.xml file after
the
<distributable> element and before <servlet> element.
<context-param>
<param-name>weblogic.http.nativeIOEnabled</param-name>
<param-value>TRUE</param-value>
</context-param>
<context-param>
<param-name>weblogic.http.minimumNativeFileSize</param-name>
<param-value>500</param-value>
</context-param>
For more information on writing deployment descriptors, see Writing Web
Application Deployment Descriptors at
http://e-docs.bea.com/wls/docs61/webapp/webappdeployment.html.