How Testimony stores recorded data
When a recording is running, Testimony is capturing information about dialog steps, batch jobs, etc. The data Testimony captures includes inputs, outputs and technical information required to enable Testimony to playback. In order to avoid (especially online) performance degradation while a recording is running, this data is initially stored in shared memory on the application server. (Writes to shared memory typically take 1-3 microseconds, whereas writes to the DB take 7-10 milliseconds.) A Testimony batch job (which is automatically started when you start the recording) then periodically checks each application server and writes the data saved in memory to Testimony tables on the database.
Bypassing the shared memory
There may occasionally be situations where, in between one execution of the batch job and the next, the shared memory area into which Testimony stores its data fills up. Since this memory area is part of shared memory (and so is used by other SAP processes), if Testimony detects that this has happened it bypasses the shared memory and, until the memory is cleared down by the next execution of the batch job, writes directly to the database. However, while this is happening there may be a small performance impact on transactions that are being recorded (as the DB write time is effectively added to the overall response time of the transactions). In order to ensure that this situation does not persist for too long, Testimony will automatically abort the recording if the number of direct DB writes (i.e., writes of Testimony data that bypass the buffer), exceeds a certain number within one minute. This value is configurable via the General Parameter ALLOWED_DB_WRITES.
In the image above (accessed in the Testimony transaction by choosing Configuration —> General Parameters) you can see that the value for ALLOWED_DB_WRITES has been changed to 10,000 from its default of 1,000.
Clearing the shared memory via the batch job
As mentioned above, a batch job is automatically started when you begin a recording to save the data stored in shared memory to the DB. When it does this, it also deletes the data from the shared memory area in order to free up memory.
By default, the batch job checks each application server every minute. It is often useful – especially in busy systems – to change the frequency of this job to run continuously. When this is done, it will constantly monitor the shared memory on each application server (using a round-robin approach so it saves the data for each application server in turn).
To change the frequency of the batch job go to Recording —> Job Manager in the Testimony transaction on the Central System.
Here you can see that the “Business transactions DB storage” job has the default frequency of “Every 1 minute(s)”.
To change this, highlight the row and click on the change button. Then go to the Execution tab and delete the number 1 from the Periodicity field.
Click on Save and the periodicity of the job will be changed so that it constantly monitors and clears down the shared memory.
Post your comment on this topic.