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: on which node the thread will run
write_percent: the ratio of write/read operations
table_mask: an integer bit mask indicating which of the 8 tables (classes) to write/read (with a values
0x1,0x2,..,0x40,0x80to indicate classesT1,T2,..,T7,T8etc. Seeschema.mcofor table definitions.)trans_len: 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_keyandkey_stepSEQ_DESC: performs
_cursor_prev()withmin_key,max_keyandkey_stepAfter 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.