The server has a single-process, multi-threaded, asynchronous I/O design. On a single-processor system this is the most efficient approach. On a multi-processor system it is limited by the single process context (with scripts executing within their own context). For I/O constrained processing (the most common in general Web environments) the AST-driven approach is quite efficient.
WASD v10 Data
Please note that relative performance data has not yet been generated for WASD v11. What follows is v10 data. WASD v11 is very similar in most respects, especially for HTTP/1.1 processing, and so the relativities here likely remain valid even if the absolute numbers might be marginally different.As also related in 5.2 - HTTP/2 and Performance, on the developer's bench using the same (HTTP/1.1) load profile** with WASD v11.0 compared to v10.4 showed ~5% additional CPU and duration (with v11.0). This is (probably) largely due to dictionary processing.
** 100 individual files, size 2kB to 250kB, 50 concurrent, ~30% CPU utilisation (~5% USER mode, mostly INTERRUPT servicing), batched 10,000 at a time over a LAN.
The test-bench system was an HP rx2600 (Itanium 1.40GHz/1.5MB) with 2 CPUs and 8191MB, running VMS V8.3-1H1 and HP TCP/IP Services Version V5.6 - ECO 2.
Many thanks to Kednos (http://www.kednos.com) for the use of the system.
The performance data is collected using the "WASDbench" utility (13.14 - WASDbench :^)). Previous performance measurements had been made using the ApacheBench utility (13.6 - ApacheBench) but experimenting with both it was observed that (perhaps the asynchronous I/O of) WASDbench provided generally greater throughput and less variation on this higher performance Itanium platform. DCL procedures with sets of WASDbench calls are used to benchmark requests. These procedures and the generated output from benchmark runs (collected via $@procedure/OUTPUT=filename) are available in the WASD_ROOT:[EXERCISE] directory.
On a multi-user system too many things vary slightly all the time.
Every endeavour has been made to ensure the comparison is as equitable as possible. Each server executes at the same process priority, access logging and host name lookup disabled, and runs on the same machine in the same relatively quiescent environment. Each test run was interleaved between each server to try and distribute any environment variations. Those runs that are very high throughput use a larger number of requests to improve sample period validity. All servers were configured pretty-much "out-of-the-box", minimal changes (generally just enough to get the test environment going). The server and test-bench utility were located on the same system eliminating actual data on the wire. Multiple data collections have yielded essentially the same relative results.
For the test-bench WASD v10.0 is present on port 7080.
The OSU comparison used the v3-11 release suitable for Itanium. OSU is executing in kernel-threads mode ("M"). OSU is present on port 7777.
The Apache comparison used the latest CSWS (CSWS-V0201, based on v2.0.52), Perl (CSWS_PERL-V0201) and PHP (CSWS_PHP-V0210) kits, and any required updates/ECOs, available at the time of collection. Apache is present on port 8888.
A series of tests using batches of accesses. The first test returned an empty file measuring response and file access time, without any actual transfer. The second requested a file of 64K characters, testing performance with a more realistic load. All were done using one and ten concurrent requests. Note that the Apache measurement is "out-of-the-box" - the author could find no hint of a file cache, let-alone how to enable/disable one. Each request required a complete TCP connection and disposal.
|
|
|
|
Result files:
The difference between cached and non-cached result with the zero file size (no actual data transfer involved) gives some indication of the raw difference in response latency, some 5x improvement. It also indicates the relative efficiencies of file-system access. This is a fairly BASIC analysis, but does give an approciation of the utility and efficiencies of having an in-server cache.
Requests for a large binary file indicate a potential transfer rate of many tens of Mbytes per second. On the test-bench this data does not get onto the wire of course but it does serve to demonstrate that server architecture should not be the limiting factor in file throughput.
|
Result file:
The WASD server can handle STREAM, STREAM_LF, STREAM_CR, FIXED and UNDEFINED record formats very much more efficiently than VARIABLE or VFC files. With STREAM, FIXED and UNDEFINED files the assumption is that HTTP carriage-control is within the file itself (i.e. at least the newline (LF), all that is required required by browsers), and does not require additional processing. With VARIABLE record files the carriage-control is implied and therefore each record requires additional processing by the server to supply it. Even with variable record files having multiple records buffered by the HTTPd before writing them collectively to the network improving efficiency, stream and binary file reads are by Virtual Block and are written to the network immediately making the transfer of these very efficient indeed!
Just one other indicative metric; CPU time consumed during the file request runs. The value for Apache was not measured as it would be distributed over an indeterminate number of child processes.
|
Result files (towards end of each):
A simple performance evaluation shows the relative merits of the four WASD scripting environments available, plus a comparison with OSU and Apache. WASD_ROOT:[SRC.CGIPLUS]CGIPLUSTEST.C, which executes in both standard CGI and CGIplus environments, and an ISAPI example DLL, WASD_ROOT:[SRC.CGIPLUS]ISAPIEXAMPLE.C, which provides equivalent output. A series of accesses were made. The first test returned only the HTTP header, evaluating raw request turn-around time. The second test requested a body of 64K characters, again testing performance with a more realistic load.
The CGIPLUSTEST.C with the v10 package has be reworked (primarily by using CGILIB) to provide a more equitable comparison by using CGI with WASD and Apache, and the native dialog phase (i.e. non-CGI) with OSU.
DECnet-based WASD scripting was tested using essentially the same environment as detached process based CGI, assessing the performance of the same script being executed using DECnet to manage the processes. The OSU-emulation provided by WASD was also (somewhat obviously) provided using DECnet.
|
|
Result file:
Although these results are indicative only, they do show the persistent environment of CGIplus and ISAPI to have a potential for improvement over standard CGI with factors of 5x to 10x - a not inconsiderable improvement. Of course this test generates the output stream very simply and efficiently and so excludes any actual processing time that may be required by a "real" application. If the script or application has a large activation time the reduction in response latency could be even more significant (e.g. with scripting engines such as Perl, PHP and Python, and RDMS access languages); see Persistent Scripting Observations immediately below.
CGI scripting is notoriously slow (as illustrated above), hence the effort expended by designers in creating persistent scripting environments - those where the scripting engine (and perhaps other state) is maintained between requests. Both WASD and Apache implement these as integrated modules, the former as CGIplus/RTE, and in the latter as loadable modules.
The following comparison uses two of the most common scripting environments and engines shared between WASD and Apache, Perl and PHP. The engines used in both server environments were identical. No comparison is made with OSU (in part due to the lack of obvious integration of such environments with OSU).
A simple script for each engine is used as a common test-bench for the two servers.
<!-- face2face.php --> <?php echo "<B>Hello!</B>" ?>
# face2face.pl print "Content-Type: text/html\n\n <B>Hello!</B> ";
These are designed to measure the script environment and its activation latencies, rather than the time required to process script content (which should be consistent considering they are the same engines). In addition, the standard php_info.php is used to demonstrate with a script that actually performs some processing.
|
Result file:
These results demonstrate the efficiency and scalability of the WASD CGIplus/RTE technology used to implement its persistent scripting environments. Most site-specific scripts can also be built using the libraries, code fragments, and example scripts provided with the WASD package, and obtain similar efficiencies and low latencies. See WASD Web Services - Scripting document.
At this time there are no definitive measurements of SSL performance (4 - Transport Layer Security). One might expect that because of the CPU-intensive cryptography employed in SSL requests that performance, particularly where concurrent requests are in progress, would be significantly lower. In practice SSL seems to provide more-than-acceptable responsiveness.
Here are some suggestions for improving the performance of the server, listed in approximate order of significance. Many are defaults. Note that these will have proportionally less impact on an otherwise heavily loaded system.
TCPIP> SHOW INTERFACE Packets Interface IP_Addr Network mask Receive Send MTU SE0 203.127.158.3 255.255.255.0 376960 704345 1500 LO0 127.0.0.1 255.0.0.0 306 306 0
In this example the MTU of the ethernet interface is 1500 (bytes). Set the [BufferSizeNetWrite] configuration directive to be some multiple of this. In the case of 1500, say 3000, 4500 or 6000. Also set the [BufferSizeDclOutput] to the same value. Rationale: always use completely filled network packets when transmitting data.
The [BufferSizeNetMTU] directive when set to the MTU will automatically optimise buffer sizes using this approach.