This sample demonstrates how to tune read-write workload on a per-thread basis. For each thread, the following parameters are specified to tune performance (see
thr_pinmain.c):node_id: the node on which the thread will run.
write_percent: the ratio of write/read operations.
table_mask: an integer bit mask indicating which of the eight tables (classes) to write/read, with values
0x1,0x2, ...,0x40, and0x80indicating classesT1,T2, ...,T7, andT8, respectively. Seeschema.mcofor table definitions.trans_len: the number of operations to perform in each transaction.
priority: the transaction priority.
navigation: the method of navigation to use.
SEARCH: performs
_find()to access objects.SEQ_ASC: performs
_cursor_next()withmin_key,max_key, andkey_step.SEQ_DESC: performs
_cursor_prev()withmin_key,max_key, andkey_step.After completion the application prints out the number and rate of operations per thread, per node, and total.
In a console window run:
cluster_rw 2 0Then in a second console window run:
cluster_rw 2 1But it is more instructive to run one instance in your development environment debugger, stepping through the code.