|
| United States Worldwide |
|
The OPJ Virtual MachineThe OPJ Virtual Machine executes Java bytecodes.SYNOPSISopj [ options ] classname <args> DESCRIPTIONThe OPJ Virtual Machine is an enhanced virtual machine that provides orthogonal persistence. It also executes regular Java(TM) programs, although slightly more slowly. The latter arises from additional checks related to persistence made in the interpreter and JIT-generated code.The OPJ Virtual Machine accepts all the standard virtual machine command line options, arguments and environment variables which are described in the Java(TM) 2 SDK Documentation. However, some default values for these options have been increased to better suit OPJ applications. In particular, the default initial heap size is 24MB and the default maximum heap size is 64MB. MEMORY MANAGEMENTSeveral of the options described below control the behavior of the PJama memory management subsystem. We acknowledge that there are far too many options for typical users of PJama applications to understand and manipulate. They exist in this form primarily to support research into the behavior of the memory management subsystem. In the long term we would expect to provide much simpler, ideally automatic, controls. In the meantime some understanding of the PJama memory management subsystem might be helpful.PJama utilizes a two-generation allocation system and garbage collector, referred to as "young-space" and "old-space", respectively. In the absence of persistent objects, this system operates in the same way as the standard virtual machine. Objects are allocated in young-space and, if they survive several young-space collections, they are promoted to old-space, which is collected less frequently. When running with a persistent store, persistent objects are faulted into main-memory as needed by allocating them in either the young space or the old space, which can be controlled by a command-line option. The default is to allocate faulted-in objects in old space, on the assumption that persistent objects are inherently long-lived, at least when compared with the very short-lived objects that are created during computations. It may help to think of the persistent objects as being the a special very-old generation, although the heap is not, in fact, structured as a three generation system. Memory management in PJama is complicated by the fact that the total size of the persistent objects accessed by an application may exceed the maximum heap size. One way to solve this is simply to increase the heap size, which is the only solution available in a standard Java Virtual Machine. Ultimately, this results in the paging of the heap by the operating ssystem once physical memory is exhausted. This solution can interact badly with the old-space garbage collector, as it always traces the entire old-space generation, provoking considerable paging activity. PJama provides an alternative solution that is based on evicting individual objects. This is similar to paging, but operates at the object granularity, which can be more efficient. Several policies are available for controlling eviction, of which the default is called "second-chance". This policy attempts to determine objects that are not being accessed by the application and selects these for eviction. Evicted objects, of course, are faulted in again automatically if they are subsequently needed. Eviction only occurs as part of an old-space collection. OPJ OPTIONSIn this document we only describe the options and environment variables that are specific to OPJ. Some are preceeded by -X, consistent with the conventions for non-standard options. The only option that is required in normal usage is -config.
opj -Xevict:0 -config .... Questions and comments to forest-info@sunlabs.com | ||||||||||||||||||||||