Cluster_RW

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_p in main.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, and 0x80 indicating classes T1, T2, ..., T7, and T8, respectively. See schema.mco for 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() with min_key, max_key, and key_step.

SEQ_DESC: performs _cursor_prev() with min_key, max_key, and key_step.

After completion the application prints out the number and rate of operations per thread, per node, and total.

How to Run

In a console window run:

    cluster_rw 2 0

Then in a second console window run:

    cluster_rw 2 1

But it is more instructive to run one instance in your development environment debugger, stepping through the code.

Related Topics Link IconRelated Topics