Motr  M0
Functional Specification

Data Structures

See also
Network Benchmark

Subroutines

See also
Network Benchmark

Constructors and Destructors

Accessors and Invariants

Operational Interfaces

Command Usage

Kernel module options

  • node_role Node role. Mandatory option.
    • client Program will act as test client.
    • server Program will act as test server.
  • test_type Test type. Mandatory option.
    • ping Ping test will be executed.
    • bulk Bulk test will be executed.
  • count Number of test messages to exchange between test client and test server. Makes sense for test client only. Default value is 16.
  • size Size of bulk messages, bytes. Makes sense for bulk test only. Default value is 1048576 (1Mb). Standard suffixes (kKmMgG) can be added to the number.
  • target Test servers list for the test client and vice versa. Items in list are comma-separated. Mandatory option. Test clients list for server is used for preallocating endpoint structures.
  • console Console hostname. Mandatory option.

Recipes

Using bulk buffer network descriptors

Usage pattern for passive side:

<...>
for (bulk buffers) {
<add bulk buffer to passive bulk queue>
ctx, <buf_bulk_index>,
buf_ping_index, offset);
<check for len == 0>
offset += len;
}

Usage pattern for active side:

size_t desc_nr;
<...>
desc_nr = m0_net_test_network_bd_nr(ctx, buf_ping_index);
for (i = 0; i < desc_nr; ++i) {
ctx, <buf_bulk_index>,
buf_ping_index, offset);
<check for len == 0>
offset += len;
<add bulk buffer to active bulk queue>
}

Complex serialization

Usage pattern:

m0_bcount_t len_total;
len = serialize_first_part(...);
if (len == 0)
return 0;
len_total = net_test_len_accumulate(0, len);
len = serialize_second_part(...);
if (len == 0)
return 0;
len_total = net_test_len_accumulate(len_total, len);
...
for (i = 0; i < number_of_items && len_total != 0; ++i) {
len = serialize_item(i, ...);
len_total = net_test_len_accumulate(len_total, len);
}
if (len_total == 0)
return 0;
...
len = serialize_last_part(...);
len_total = net_test_len_accumulate(len_total, len);
return len_total;

Kernel module parameters example

Todo:
Outdated and not used now
node_role=client test_type=ping count=10 target=s1,s2,s3

Run ping test as test client with 10 test messages to servers s1, s2 and s3.

node_role=server test_type=bulk target=c1,m0 size=128k

Run bulk test as test server with 128kB (=131072 bytes) bulk message size and test clients c1 and m0.

See also
Motr Network Benchmark