From Ingres Community Wiki
Welcome to the Playback project
There are some problems with the native 32 bit Preprocessing binary. It is currently recommended to use the generic binary in the sub-folder "Preprocess-generic"
What Is It ?
this tool is designed to record the workload of an Ingres system as it happens - in a live, production environment - and then allow that workload to be played back at a later time on another system, with the goal of being able to test your system with a good representation of what your real-world production workload looks like.
It takes the output created by the DBMS Server Query Tracing and plays it back into an Ingres Installation. It does that meeting the following criteria:
- The playback can be simulated exactly as it happened in real or can be accelerated to be faster than real-time.
- The statements are guaranteed to be played back in the same order as they were originally recorded.
It is not guaranteed that the queries will achieve precisely the same results as they did in the original production run, because there may be subtle variations in record locking behaviour when playing back due to hardware or environmental differences.
Note: Dynamic Playback is an OpenSource community product and as such is not supported as part of your Ingres subscription. If you need support for this product then Ingres can provide expert consultants to assist with the product. Please see the 'Contact' section for more information.
Questions about Playback? Drop us a mail: firstname.lastname@example.org
Bugs and feature requests are collated within Community Bug Tracker
Note: Dynamic Playback is an OpenSource community product and as such is not supported as part of your Ingres subscription. If you need support for this product then Ingres can provide expert consultants to assist with the product. Please contact me for more information.
You can also ask any questions in the Forum
Download the latest binaries from Sourceforge.
If you need binaries for other platforms, please let me know.
A new revision of Playback is released according to demand. See CHANGELOG for up to date release notes.
The following platforms are supported:
- Linux: Mono 1.9 or higher
- Windows: .NET Framework 2.0
- Linux x86-64
- VMS will be supported when Ingres on VMS is ported to client side NPTL support
More Platforms might be supported in later versions. The development language is C with Embedded SQL and Mono compatible C# for the Preprocessing.
The features of the current stable version are:
- Parsing the output from SC930 and play it back using a multi threaded approach
- Play back in real time and accelerated time
- Play back as fast as possible with no delays between the statements
- Replicate standard SQL, DML and DDL
- Replicating Repeated SQL
- Replicating Cursor handling
- Printing Ingres error output to the console
- Print number of affected rows to the console
- Capture Load Statistics
- Synchronising all statements to ensure they run in the same order as they originally have. Feature is optional and needs to be switched on.
ToDo list (future versions)
- Create a feature-complete Unit Test
- Convert the Preprocessing to something mor platform independent
- Precalculate variable sleep times and use them with nanosleep() to reduce system load
- Use a socket/synchronising protocol to sync up multiple instances of Playback.
- Playback needs to simulate all the communication channels to the DBMS that were originally used (Local, Ingres/NET, DAS, ODBC...). This probably calls for multiple synced up executables in different programming languages.
- A GUI for Preprocessing?
- Use the Socket Communication feature for a Stats/Progress GUI for Playback?
- Intelligent session failure detection with automatic transaction restart
How to install from a binary package
There is no installation required. Just download the package from Sourceforge and unzip it. The run time requirements are
- Linux: Mono Framework 1.9 or higher
- Windows: .NET Framework 2.0
- An Ingres installation
How to install from source
If you need a binary for a particular platform, let me know, and I'll try to provide it. Alternatively you can compile it yourself like this:
Step 1: Get the code
Download a source package here.
Step 1a: Get the latest development code
If you want, you can also get the latest development code from our Subversion repository (should always at least compile, contains the latest bugfixes):
svn checkout http://code.actian.com/apps/playback/main
NOTE: To compile the development version, you will need GNU autoconf to create the configure script:
cd Playback autoconf
The source packages from Sourceforge already contain a configure script so this step is not necessary.
Step 2: Compile and install
If you want to compile the sources you need to have the following prerequisites:
- Mono 2.0 or .NET Framework 2.0
- SUS2 Compliant C compiler and libs
- GNU make or compatible (for Unix)
- MS Visual C++ 2005 (for Windows)
- Ingres ESQL/C Preprocessor
To build the package on Linux/Unix
- Use an account that has an Ingres Environment sourced
- You can check by typing:
To build just go to the project's root directory and type
If you only want to create a specific module, type:
There are no warnings when compiling on Linux using gcc (tested on Ubuntu 9.04 with gcc 4.3.3). Other compilers might issue warnings that will probably be harmless. Nevertheless if you encounter any warnings or errors, please let me know.
To build on Windows:
- Use the provided .sln file to build using Visual C++ Express 2008 or higher
- Is supported and should build using Visual C# Express 2008 or higher
Step 1: Getting session files from SC930
See DBMS Server Query Tracing for information about how to capture playback trace files.
Step 2: Preprocess
Go to the directory that contains your session files and run the Preprocessor:
This will generate one *.psf file per session.
Preprocessing can be used with the following command line switches:
- --path=/path/to/sessfiles A switch indicating the path to the session files. It will also be the output path of the *.psf files
- --dryrun If you specify this switch, no .psf files will be created. The tool will output additional information on the console.
- --filterdb=123456789 This will parse only sessions from the database with the ID 123456789. All other sessions will be ignored. If you want to find out, what IDs your databases have, go to your iidbdb and issue this statement: select db_id, name from iidatabase
- --dbid:123456789=myDatabase This is needed to put database names into the parsed session files. You can add as many --dbid switches as you need
NOTE: Setting aliases for DBIDs is important if you want to play back against multiple databases. If you don't use this switch you will only be able to play back against one database!
Step 3: Playing it back
Change to the directory that contains the *.psf files. Run the command
Here is a list of the command line options:
- -o<option> Runmode.
- -o0 runs the queries as fast as possible (no timings, no delays),
- -o1 runs them in real time simulation. (default)
- -v Verbose. Displays extra output
- -t<step> Step count. This is the number of simulated milliseconds, a simulated tick would jump ahead
- -s<delay> Step delay. This is the number of milliseconds that a simulated tick would take in real time.
- For example, -t10 -s100 would play back 10ms of the trace in 100ms of real time. The default is -t1000 -s1000.
- -d<dbname> Name of the database to connect to
- -u<username> User name to use for the connection. Default is ingres
Note: The database and user name here are only used when the session file contains no db or user information!
- -z Switch on synchronising. This forces the statements to be executed in the original order. The feature is disabled by default.
- -m Mock mode. This is useful if you want to test the tool and have no session files yet. It will run two concurrent sessions issuing very simple catalog queries. It won't break anything.
- -R Ignore repeated queries. Repeated queries are treated as ordinary non-repeated ones.
- -f Turn statistics writing off. The file playbackrun.sh will not be created
|Preprocessor Version||Platform / OS||MONO/VS.Net Version||Status|
|2.3.2||Solaris 10||2.8||In Progress|
|2.3.2||Windows||2003 .net 2.0||Success|
|Playback Version||Ingres Version||Platform / OS||Compiler||Status|
|2.1.12||2.6 (recording / playback) 9.2 (playback)||Tru64 / Solaris 10||Compact 2.29 / Sun Studio 5.29||Success|
|2.1.10||2.6/0604 (recording / playback) 9.2 (playback)||HP/UX 11.11/11.23||gcc 4.1.1||Success|
|2.3.2||2.6/0305 (recording) 9.2 (playback)||Solaris 10||gcc 3.4.6||In progress|
|2.3.2||2.6 and 9.2||Tru64 5.1B and RHEL 4||gcc 4.1.2||Issues|
|2.3.2||2.6 and 9.2||AIX i64.hpu r64.lnx||??||Success|
|2.4.0||9.2||RHEL 4||gcc 4.1.2||Success|
|2.4.2||9.2||RHEL 5||gcc 4.1.2||Success|
|2.4.3||9.2||RHEL 5||gcc 4.1.2||Success|
|2.4.3||9.3||RHEL 5||gcc 4.1.2||Success|