EOF 2.2 LeakTester Example

There has been substantial interest in the difficult task of finding and fixing leaks in Enterprise Objects Framework, OpenStep, and WebObjects applications. As the EOF team was preparing for the final release of WebObjects 3.5, they wrote a small test app to help them find leaks in the framework. This example will help you learn how to write an application that should be able to run indefinitely with running out of memory. Also, if you think you have encountered a serious leak in the framework, you can use this app as a minimal test case for illuminating the problem.
The LeakTester app takes a few input arguments:

-batchsize m [number, default 1]
-runs n [number, default 1]
-trials t [number, default 1]
-hang yn [YES/NO, default NO]

For each trial, at runtime the app will, using the Movies EOmodel:

- Empty the tables
- Insert movies (insert m * n movies)
- Add directors and actors (m*n objects fetched, m*n to-one
faults fired, m*n to-many faults fired, m*n+m^2*n objects inserted)
- Modify objects (m*n objects fetched, m*n to-one faults fired, m*n
to-many faults fired, m*n+m^2*n objects faulted in, m*n objects
deleted, m*n objects inserted, m*n+m^2*n objects mutated)

The -hang option makes the app pause before quitting. This allows you to use pview or ps after the app finishes, rather than monitoring the app during its entire run.

The LeakTester source code can be downloaded from:

ftp://ftp.info.apple.com/Apple_Support_Area/Apple_Software_Updates/MultiCountry/Enterprise/EOF/examples/LeakTester.m

You'll need to drop the Movies EOmodel into the app before compiling.


The following results were obtained on Windows NT, using pview.exe to examine the image at the end of the run. This app has only been tested using EOF 2.2, the EOF version that ships with WebObjects 3.5. You might notice that the results aren't quite as deterministic as one might hope, but this is the raw untouched data we got.

Oracle...
Batch Runs Trials Virtual-Size
6 4 1 27980
6 4 10 27980
6 4 25 27980
10 10 10 27980
--
10 10 100 28740
10 10 10 28740


Sybase...
Batch Runs Trials Virtual-Size
6 4 10 32860
6 4 1 32792
6 4 25 32860
--
10 10 1 33520
10 10 10 33588
10 10 100 33588


Informix...
Batch Runs Trials Virtual-Size
10 10 10 25492
10 10 1 23444
6 4 10 23444
6 4 25 23444
6 4 5 23460
--
10 10 10 25508
10 10 1 23460
--
6 4 100 25508
10 10 (37+) 30352 [This test was aborted after 37 trials due to server failure.]
Published Date: Feb 18, 2012