Reducing Load Delay to Improve Performance of Internet-Computing Programs

OF THE DISSERTATION Reducing Load Delay to Improve Performance of Internet-Computing Programs by Chandra Krintz Doctor of Philosophy in Computer Science and Engineering University of California, San Diego, 2001 Professor Bradley Calder, Chair Internet computing has been enabled by a mobile program execution model in which architectureindependent programs transfer to where they will be executed. The Java language model is designed to implement mobile execution by transferring bytecodes to a virtual machine which translates them into native machine instructions and then executes them on the target site. Implementing Java's mobile execution model e ciently has proved challenging for two reasons. First, the time required to transfer program code from the place where it is stored to the Java Virtual Machine (JVM) that will execute it is perceived by the program's user as execution delay. Current levels of deliverable Internet performance can cause this delay to be substantial. Second, once the code has arrived it must either be interpreted or compiled \just-in-time" for its execution. Just-In-Time (JIT) compilation o ers improved execution speed over interpretation by exploiting the opportunity for compile-time optimizations, but the compilation time is also perceived by the program's user as execution delay. In this thesis, we de ne load delay as the uni cation of these two sources of overhead: transfer delay and compilation delay. We detail the causes of, describe the existing technology that contributes to, and show the degree to which load delay degrades performance of Internetcomputing applications. We show that solutions to the problem of load delay in these mobile programs can be attacked in one of two ways regardless of the source: through avoidance and overlap. Avoidance is achieved by eliminating all or part of the cause of load delay and overlap by performing useful work concurrently with the delay. Both have the potential to reduce the e ect of load delay and to improve performance of mobile programs. We present numerous solutions to load delay that implement either avoidance, overlap, or both. Our results show that both sources of load delay can be reduced substantially given currently available remote execution technology. In addition, our results suggest modi cations that can be made to existing technology to further improve performance of Internet-computing applications. xvii Chapter I Problem Statement The Internet has been used traditionally for the provision of access. Its world-wide system of networks facilitates access to a diverse abundance of information and resources. An alternate use of the Internet that has become popular recently, is as a computational entity. The fundamental di culty associated with such use is how to e ciently and e ectively employ the processing power that is available and connected via the Internet. One methodology that has been developed to solve this problem is remote execution in which programs transfer over the network from the machine at which the code and data is stored to a target site for execution. We refer to remotely executed programs as mobile programs. Commonly, these programs are transferred in an architecture-independent representation that enables portable execution at heterogeneous target sites. However, such formats must be converted to a native representation to enable execution at the destination. This translation is commonly performed by a compiler; a piece of software that not only converts programs to the native format but performs optimization on the code to enable e cient execution. Performance of mobile programs is increasingly limited since it includes the time for transfer and compilation, as well as for execution; since transfer and compilation both occur while the program runs. We refer to these sources of overhead collectively as Load Delay. The widening gap between network and processor performance, highly variant network conditions, and the optimization complexity required for e cient execution speeds, make it exceedingly di cult to maintain acceptable mobile program performance. We propose to reduce the e ect of load delay and to improve performance of remotely executed programs. To summarize, we de ne the following terms that we use throughout this dissertation: 1 2 Remote Execution: A methodology for the use of the Internet as a computational entity in which program code and data transfer from the machine at which it is stored to a destination (target) machine and execute upon arrival. Native Code: An architecture-dependent program format. Mobile Program: A program that is transferred in an architecture-independent format for remote execution. Transfer Delay : The time for network transmission of code and data from the source to the destination during remote execution. Compilation Delay : The time for translation (and possibly optimization) of a mobile program to native code by the destination machine as required for remote execution. Load Delay : The uni cation of two sources of remote execution overhead: transfer delay and compilation delay. We use the Java Programming Language [28] as the experimental foundation of this dissertation work due to its remote execution functionality and its pervasive use in Internet computing. However, our techniques are general and can be used for other mobile program representations, e.g., MSIL, a.k. a. DotNet [40]. Performance of mobile Java programs is negatively a ected by both sources of load delay. Transfer delay is experienced by the executing program since program les are loaded over the network as needed (on-demand). The execution stalls while the request completes and the non-local le is transferred. Compilation delay is imposed each time code within a le is invoked for the rst time; execution is further interrupted waiting for compilation. We exemplify the degree to which load delay impacts the performance of an average Java program in Figure I.1. The graph depicts load delay (both transfer and compilation overhead) as a function of network bandwidth. Load delay measurements consist of the time for transmission of the (non-library) code and data, the time to request program les required for execution, and the time for compilation of all executed methods. The average Java program used for this gure accesses 70 non-local classes requiring 178 kilobytes to be transferred, and compiles 238 methods (totaling 3 seconds) using the Open Runtime Platform (ORP) [15] as the Java execution environment. For a slow link, like that of a modem, load delay imposes almost 56 seconds. For a fast link, e.g., T1 (1Mb/s), load delay imposes over 10 seconds for an average benchmark. We have measured cross-country Internet performance and our results indicate that the bandwidth available to a common Java application falls between the 0.03Mb/s modem range and a T1 link (1Mb/s). In addition, Internet performance is highly variable and a single connection can experience this range of performance over a short duration.