Whamcloud - gitweb
LU-14736 utils: update leak-finder.pl for new format
[fs/lustre-release.git] / lustre / tests / iabf / README
1 Usage: [IABF_OPTIONS...] iabf [INIT] --- A --- B --- [FINI] ---
2
3 Initialize, run tasks A and B with various overlaps, and Finalize.
4
5 Command lines for INIT, A, B, and FINI are terminated by ---.
6 If INIT or FINI is empty then it will be skipped.
7 If INIT or FINI fail then we exit immediately with status 1.
8
9 For delay = $IABF_DELAY_BEGIN_NS; delay < $IABF_DELAY_END_NS; delay += $IABF_DELAY_STEP_NS
10   Run initializer (INIT).
11   In parallel: Fork, delay *, and exec processes A and B.
12     If delay is negative then delay A by abs(delay) ns.
13     Otherwise delay B by delay ns.
14   Wait for A and B to terminate.
15   Run finilizer (FINI).
16
17 To autotune IABF_DELAY_*, omit any or all of these variables and set
18 IABF_STEP_COUNT to the desired number of iterations and iabf will run
19 tasks A and B $IABF_AUTOTUNE_COUNT (16) times to determine their
20 expected elapsed runtimes. It will then choose IABF_DELAY_BEGIN_NS and
21 IABF_DELAY_ED_NS to try to arrange as much overlap coverage as
22 possible:
23
24      AAAAAAAAAA         delay(A) is approx elapsed(B)
25 BBBBB                   delay(B) == 0
26
27    AAAAAAAAAA           delay(A) < elapsed(B)
28 BBBBB                   delay(B) == 0
29
30 AAAAAAAAAA              delay(A) == 0
31 BBBBB                   delay(B) == 0
32
33 AAAAAAAAAA              delay(A) == 0
34     BBBBB               delay(B) < elapsed(A)
35
36 AAAAAAAAAA              delay(A) == 0
37          BBBBB          delay(B) is approx elapsed(A)
38
39 ENVIRONMENT VARIABLES:
40   IABF_DELAY_BEGIN_NS=N
41   IABF_DELAY_END_NS=N
42   IABF_DELAY_STEP_NS=N
43   IABF_AFFINITY='0 1 7'         run task A on CPU 0, task B on CPU 1, main task on CPU 7.
44   IABF_AUTOTUNE_COUNT=COUNT     set autotune count
45   IABF_DEBUG=[01]
46   IABF_STEP_COUNT=COUNT         set number of steps when autotuning
47
48 EXAMPLES:
49
50 IABF_DELAY_BEGIN_NS=000000000 IABF_DELAY_END_NS=200000000 IABF_DELAY_STEP_NS=100000 \
51 iabf rm -f /mnt/lustre/f0 ---  \
52      dd if=/dev/zero of=/mnt/lustre/f0 bs=1M count=16 conv=notrunc --- \
53      truncate /mnt/lustre2/f0 $(( 5 *  1048576)) --- \
54      ---
55
56 IABF_STEP_COUNT=4096 \
57 IABF_AFFINITY='0 1 2' \
58 iabf dd if=/dev/zero of=/mnt/lustre/f0 bs=1M count=128 --- \
59      dd if=/mnt/lustre2/f0 of=/dev/null bs=1M --- \
60      truncate /mnt/lustre/f0 $((5 << 20)) --- \
61      rm /mnt/lustre/f0 ---
62
63 TODO
64 * Start with a coarse step value (10ms or something) and refine.
65 * Add options to stop on failure of A and/or B.
66