Init funcs="pcheck_uri_clean_fixed_init" shlib="C:/Sun/webserver7/lib/custom.dll"
fn="load-modules" NativeThread="no"
The NativeThread ag aects all functions in the funcs list, so if you have more than one
function in a library, but only some of them use native threads, use separate Init lines. If you set
NativeThread to yes, the thread maps directly to an OS thread.
For information on the load-modules function, see “load-modules” in Sun Java System Web
Server 7.0 Update 1 Administrator’s Conguration File Reference.
Process Modes
You can run Sun Java System Web Server in one of the following modes:
■
“Single-Process Mode” on page 44
■
“Multi-Process Mode” on page 44
Note – Multi-process mode is deprecated for Java technology-enabled servers. Most applications
are now multi-threaded, and multi-process mode is usually not needed. However,
multi-process mode can signicantly improve overall server throughput for NSAPI
applications that do not implement ne-grained locking.
Single-Process Mode
In the single-process mode, the server receives requests from web clients to a single process.
Inside the single server process, acceptor threads are running that are waiting for new requests
to arrive. When a request arrives, an acceptor thread accepts the connection and puts the
request into the connection queue. A request processing thread picks up the request from the
connection queue and handles the request.
Because the server is multi-threaded, all NSAPI extensions written to the server must be
thread-safe. This means that if the NSAPI extension uses a global resource, like a shared
reference to a le or global variable, then the use of that resource must be synchronized so that
only one thread accesses it at a time. All plug-ins provided with the Web Server are thread-safe
and thread-aware, providing good scalability and concurrency. However, your legacy
applications might be single-threaded. When the server runs the application, it can only execute
one at a time. This leads to server performance problems when put under load. Unfortunately,
in the single-process design, there is no real workaround.
Multi-Process Mode
You can congure the server to handle requests using multiple processes with multiple threads
in each process. This exibility provides optimal performance for sites using threads, and also
provides backward compatibility to sites running legacy applications that are not ready to run
in a threaded environment. Because applications on Windows generally already take advantage
of multi-thread considerations, this feature applies to UNIX and Linux platforms.
UnderstandingThreads,Processes,andConnections
SunJavaSystemWebServer7.0Update1 PerformanceTuning,Sizing,and ScalingGuide •44