tpcc: enable setting percentage of workload #747
-
I am using HammerDB to run TPCC against my oracle container and I'd like to run insert only workload. However, I found the percentage of each workload type seems to be not configurable. Ideally, we support such syntax in the tcl file: # Set workload to only perform NEW_ORDER transactions (insert only)
diset tpcc driver timed
diset tpcc keyandthink false
diset tpcc neword 100 ;# Set 100% of the workload to NEW_ORDER (insert operations)
diset tpcc payment 0 ;# 0% for payment (update)
diset tpcc orderstat 0 ;# 0% for order status (select)
diset tpcc delivery 0 ;# 0% for delivery (update)
diset tpcc slev 0 ;# 0% for stock level (select) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This would not be practical change, although it is a common question so converted to a discussion topic. We have seen it before, where users run benchmarks derived from TPC-C and change the transaction mix. For example, having a higher mix of delivery (eg 80%) that does mostly deletes. However, in this scenario, the available data is soon deleted and the query to identify the rows to delete returns 'no rows found'. The user then observes high CPU on all the threads/virtual users and draws conclusions about the system performance, when in fact it is not exercising the database at all, just running empty queries. (But the user sees CPU running at 100% and incorrectly thinks that this is measuring database performance). The transaction mix is intentional so we are doing a balanced mix of selects, inserts, updates and deletes. Having said this, HammerDB is intentionally scripted, and allows experts who are fully able to diagnose system performance to change the transaction mix if they wish. At the end of the script, the variable choice is set to a number from 1 to 23. So if for example you only wanted to run a new order transaction then the following would do this. (However, expect your database to grow more rapidly than with the normal transaction mix. You can change the choice value to achieve any transaction mix.
With this understood, it is also worth pointing out that if you want to run a 100% insert only workload then a schema build does exactly that, 100% inserts. Again the build is a script so you can modify it as you wish, such as creating indexes before you load the tables. Also, as you are using Oracle HammerDB includes the feature to trace Oracle workloads and then replay them as described here https://www.hammerdb.com/docs/ch14s01.html So e.g. create a logon trigger (as sysdba)
then do a build with 1 VU and 1 WH and in your trace directory is a file such as follows:
Load that into HammerDB and convert it (button at the far left side on the bottom of the menu). Note it will take a while (there are a lot of potential enhancements for this #718) When it is complete, you can see the converted trace in a form that HammerDB can re-run against the database. So e.g. you can grab the section on inserting into a table and have a template to build your own insert test.
Finally, don't forget the oracle metrics, this will give you a breakdown of the statistics for the insert based workload and the related wait events. Especially if you are changing the transaction mix, this will then help you make sure that the workload you are running is sensible (and not VUs running empty queries at 100% CPU). So no, we don't want to allow changing the transaction mix by default, however it is straightforward for experts to do and there are a number of options for creating bespoke insert based tests and analysing them. |
Beta Was this translation helpful? Give feedback.
This would not be practical change, although it is a common question so converted to a discussion topic.
We have seen it before, where users run benchmarks derived from TPC-C and change the transaction mix. For example, having a higher mix of delivery (eg 80%) that does mostly deletes.
However, in this scenario, the available data is soon deleted and the query to identify the rows to delete returns 'no rows found'. The user then observes high CPU on all the threads/virtual users and draws conclusions about the system performance, when in fact it is not exercising the database at all, just running empty queries. (But the user sees CPU running at 100% and incorrectly thinks that this is mea…