{"id":664,"date":"2011-05-31T22:28:32","date_gmt":"2011-06-01T02:28:32","guid":{"rendered":"http:\/\/hstore.cs.brown.edu\/?page_id=664"},"modified":"2012-10-09T16:06:58","modified_gmt":"2012-10-09T20:06:58","slug":"trace-logs","status":"publish","type":"page","link":"https:\/\/hstore.cs.brown.edu\/documentation\/deployment\/trace-logs\/","title":{"rendered":"Transaction Trace Logs"},"content":{"rendered":"

\u00ab<\/B> Benchmark Client Configuration<\/a><\/div>
Running on Amazon EC2<\/a> \u00bb<\/B><\/div>
<\/div><\/p>\n

H-Store supports the ability to write all transaction executions to JSON-based trace files.<\/p>\n

Note that these logs are not used for recovery, but are rather for post-processing and other database design tools provided by H-Store.<\/p>\n

Command-line Arguments<\/h2>\n

When executing a benchmark, use the trace<\/tt> option to specify the file path where each HStoreSite will write their transaction logs. The site id of each HStoreSite instance will be appended to the value of trace<\/tt> option. For example, assume the target cluster below has four execution sites running on four different machines:<\/p>\n

ant hstore-benchmark<\/tt> -Dproject=$BENCHMARK -Dtrace=\/path\/to\/tpcc.log<\/pre>\n

Each HStoreSite will create a new file \/path\/to\/tpcc.log-X<\/tt> relative to base directory of where H-Store is deployed from (where X<\/tt> is the site id that produced the file).<\/p>\n

You can also configure H-Store to ignore certain transactions when creating the trace logs by changing the workload.ignore<\/tt> property in the benchmark property files.<\/p>\n

Combining Multiple Traces into a Single File<\/h2>\n

After executing a benchmark multiple times or on multiple machines, you may want to combine the multiple trace files into a single file. The workload-combine<\/tt> command can be used to do this. The workload<\/tt> option specifies the input files that you want to combine together, and the output<\/tt> command is where the combined files will be written to. You can use the wildcard character (*) for the input value.<\/p>\n

ant workload-combine<\/tt> -Dproject=$BENCHMARK -Dworkload=\/path\/to\/tpcc.log* -Doutput=tpcc.combined<\/pre>\n

JSON Format<\/h2>\n

The following is the JSON schema of the transaction and query traces generated by H-Store.<\/p>\n

\r\n<transaction<\/a>><\/b> = {\r\n   \"TxnId<\/a>\":     <integer>,      \/\/ Unique Transaction Identifier<\/i>\r\n   \"Name<\/a>\":      <string>,       \/\/ Stored Procedure Name<\/i>\r\n   \"Start<\/a>\":     <integer>,      \/\/ Transaction Start Time<\/i>\r\n   \"Stop<\/a>\":      <integer>,      \/\/ Transaction Stop Time<\/i>\r\n   \"Aborted<\/a>\":   <boolean>       \/\/ True if Transaction was Aborted<\/i>\r\n   \"Params<\/a>\":    [ <param><\/b>* ],   \/\/ Stored Procedure Input Parameters<\/i>\r\n   \"Queries<\/a>\":   [ <query><\/b>* ],   \/\/ Queries Executed in Transaction<\/i>\r\n   \"Output<\/a>\":    [ <output><\/b>* ],  \/\/ Optional final output for Transaction<\/i>\r\n}\r\n<query<\/a>><\/b> = {\r\n   \"Name<\/a>\":      <string>,       \/\/ Query Name<\/i>\r\n   \"Batch<\/a>\":     <integer>,      \/\/ Optional Batch Identifier (Starting at zero)<\/i>\r\n   \"Start<\/a>\":     <integer>,      \/\/ Query Start Time<\/i>\r\n   \"Stop<\/a>\":      <integer>,      \/\/ Query Stop Time<\/i>\r\n   \"Aborted<\/a>\":   <boolean>       \/\/ True if Query was Aborted<\/i>\r\n   \"Params<\/a>\":    [ <param><\/b>* ],   \/\/ Query Input Parameters<\/i>\r\n   \"Output<\/a>\":    [ <output><\/b>* ],  \/\/ Optional result for Query<\/i>\r\n}\r\n<output<\/a>><\/b> = {\r\n   \"Types<\/a>\":     [ <string><\/b>* ],     \/\/ List of output types for data columns<\/i>\r\n   \"Data<\/a>\":      [ [ <param><\/b>* ]* ], \/\/ List of data row lists<\/i>\r\n}\r\n<param><\/b> = [ <integer>|<string>|<timestamp>|<boolean> ]*\r\n<\/pre>\n

<\/a>
\nTransaction Record Fields<\/b><\/p>\n\n\n\n\n\n\n\n\n\n\n
Field<\/th>\nDescription<\/th>\n<\/tr>\n

<\/a><\/p>\n

TxnId<\/tt><\/td>\nA unique 64-bit transaction identifier. Must be globally unique if combining multiple trace records<\/td>\n<\/tr>\n

<\/a><\/p>\n

Name<\/tt><\/td>\nThe name of the stored procedure that was executed.<\/td>\n<\/tr>\n

<\/a><\/p>\n

Start<\/tt><\/td>\nThe time that this transaction first started executing (not when the request arrived), relative to the time that the DBMS started.<\/td>\n<\/tr>\n

<\/a><\/p>\n

Stop<\/tt><\/td>\nThe time that this transaction either committed or aborted, relative to the time that the DBMS started.<\/td>\n<\/tr>\n

<\/a><\/p>\n

Aborted<\/tt><\/td>\nIf the transaction invoked a user abort, then this field is true. Otherwise it is false.<\/td>\n<\/tr>\n

<\/a><\/p>\n

Params<\/tt><\/td>\nAn array of input parameters to the stored procedure invocation function. Each element in the array can be a scalar integer, string, timestamp, or boolean value, or another array of arbitrary length that contains scalar values. The values an embedded array must be of the same type.<\/td>\n<\/tr>\n

<\/a><\/p>\n

Queries<\/tt><\/td>\nAn arbitrary length list of Query<\/a> objects that were executed by the transaction.<\/td>\n<\/tr>\n

<\/a><\/p>\n

Output<\/tt><\/td>\n<\/td>\n<\/tr>\n<\/table>\n

<\/a>
\nQuery Record Fields<\/b><\/p>\n\n\n\n\n\n\n\n\n\n
Field<\/th>\nDescription<\/th>\n<\/tr>\n

<\/a><\/p>\n

Name<\/tt><\/td>\nThe name of the query that was executed.<\/td>\n<\/tr>\n

<\/a><\/p>\n

Batch<\/tt><\/td>\nThe batch number that this query invocation was a part of.<\/td>\n<\/tr>\n

<\/a><\/p>\n

Start<\/tt><\/td>\nThe time that this query invocation was dispatched for execution, relative to the time that the DBMS started.<\/td>\n<\/tr>\n

<\/a><\/p>\n

Stop<\/tt><\/td>\nThe time that this query returned the result to the transaction’s control code, relative to the time that the DBMS started.<\/td>\n<\/tr>\n

<\/a><\/p>\n

Aborted<\/tt><\/td>\nThis field will be true if the query was aborted.<\/td>\n<\/tr>\n

<\/a><\/p>\n

Params<\/tt><\/td>\nAn array of input parameters to the stored procedure invocation function. Each element in the array can be a scalar integer, string, timestamp, or boolean value.<\/td>\n<\/tr>\n

<\/a><\/p>\n

Output<\/tt><\/td>\nThe optional output results of this query. <\/td>\n<\/tr>\n<\/table>\n

Sample Workloads<\/h2>\n

Previously executed workload traces for H-Store’s built-in benchmarks are available from the supplemental research files repository<\/a>.<\/p>\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Benchmark<\/th>\n# of Transactions<\/th>\n# of Queries<\/th>\nAdditional Info<\/th>\n<\/tr>\n
TPC-C 32w (1)<\/a><\/td>\n69,195<\/td>\n1,854,464<\/td>\n32 warehouses<\/td>\n<\/tr>\n
TPC-C 32w (2)<\/a><\/td>\n69,194<\/td>\n1,862,672<\/td>\n32 warehouses<\/td>\n<\/tr>\n
TPC-C 100w (1)<\/a><\/td>\n98,000<\/td>\n2,620,670<\/td>\n100 warehouses<\/td>\n<\/tr>\n
TPC-C 100w (2)<\/a><\/td>\n97,999<\/td>\n2,631,586<\/td>\n100 warehouses<\/td>\n<\/tr>\n
TM1 (1)<\/a><\/td>\n379,882<\/td>\n468,556<\/td>\n–<\/td>\n<\/tr>\n
TM1 (2)<\/a><\/td>\n379,953<\/td>\n468561<\/td>\n–<\/td>\n<\/tr>\n
SEATS (1)<\/a><\/td>\n248,010<\/td>\n966,131<\/td>\n–<\/td>\n<\/tr>\n
SEATS (2)<\/a><\/td>\n248,010<\/td>\n966,131<\/td>\n–<\/td>\n<\/tr>\n
TPC-E<\/a><\/td>\n233,903<\/td>\n3,848,835<\/td>\n–<\/td>\n<\/tr>\n
AuctionMark (1)<\/a><\/td>\n150,073<\/td>\n696,750<\/td>\n–<\/td>\n<\/tr>\n
AuctionMark (2)<\/a><\/td>\n150,072<\/td>\n608,614<\/td>\n–<\/td>\n<\/tr>\n<\/table>\n

\u00ab<\/B> Benchmark Client Configuration<\/a><\/div>
Running on Amazon EC2<\/a> \u00bb<\/B><\/div>
<\/div><\/p>\n","protected":false},"excerpt":{"rendered":"

H-Store supports the ability to write all transaction executions to JSON-based trace files. Note that these logs are not used for recovery, but are rather for post-processing and other database design tools provided by H-Store. Command-line Arguments When executing a benchmark, use the trace option to specify the file path where each HStoreSite will write […]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":626,"menu_order":97,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/hstore.cs.brown.edu\/wp-json\/wp\/v2\/pages\/664"}],"collection":[{"href":"https:\/\/hstore.cs.brown.edu\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/hstore.cs.brown.edu\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/hstore.cs.brown.edu\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hstore.cs.brown.edu\/wp-json\/wp\/v2\/comments?post=664"}],"version-history":[{"count":40,"href":"https:\/\/hstore.cs.brown.edu\/wp-json\/wp\/v2\/pages\/664\/revisions"}],"predecessor-version":[{"id":1823,"href":"https:\/\/hstore.cs.brown.edu\/wp-json\/wp\/v2\/pages\/664\/revisions\/1823"}],"up":[{"embeddable":true,"href":"https:\/\/hstore.cs.brown.edu\/wp-json\/wp\/v2\/pages\/626"}],"wp:attachment":[{"href":"https:\/\/hstore.cs.brown.edu\/wp-json\/wp\/v2\/media?parent=664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}