• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1IOshark is a repeatable application workload storage benchmark. You
2can find more documentation on IOshark at :
3https://docs.google.com/a/google.com/document/d/1Bhq7iNPVc_JzwRrkmZqcPjMvWgpHX0r3Ncq-ZsRNOBA/edit?usp=sharing
4
5The short summary of what IOshark is : IOshark has 2 components, one
6is a strace+ftrace compiler that takes straces and select ftraces fed
7into it and compiles this into bytecodes (stored in *.wl files). The
8compiler runs on a Linux host. The second component (which runs on the
9device) is the tester that takes as input the bytecode files (*.wl
10files) and executes them on the device.
11
12How to Run :
13----------
14- First collect straces and compile these into bytecodes. The wrapper
15script provided (collect-straces.sh) collects straces, ships them to
16the host where the script runs, compiles and packages up the bytecode
17files into a wl.tar file.
18- Ship the wl.tar file and the iostark_bench binaries to the target
19device (on /data/local/tmp say). Explode the tarfile.
20- Run the tester. "ioshark_bench *.wl" runs the test with default
21options. Supported ioshark_bench options :
22-b : Explicitly specify a blockdev (to get IO stats from from
23/proc/diskstats).
24-d : Preserve the delays between successive filesystem syscalls as
25seen in the original straces.
26-n <N> : Run for N iterations
27-t <N> : Limit to N threads. By default (without this option), IOshark
28will launch as many threads as there are input files, so 1 thread/file.
29-v : verbose. Chatty mode.
30-s : One line summary.
31-q : Don't create the files in read-only partitions like /system and
32/vendor. Instead do reads on those files.
33
34FILE FORMAT :
35-----------
36
37Each IOshark workload file is composed of the following
38
39Header
40File State : Table of File Entries. Each entry describes a file
41File Op : Table of File Operations. One entry describes one operation
42
43Each of the above is described below :
44
45Note : Everything is in Big Endian byte order.
46
47Header {
48       /* IOshark version number */
49       u_int64_t	ioshark_version;
50       /* Total number of files used in this IOshark workload file */
51       u_int64_t	num_files;
52       /* Total number of IO operations in this IOshark workload file */
53       u_int64_t       num_io_operations;
54}
55
56File State {
57       u_int64_t	fileno;
58       u_int64_t	size;
59       u_int64_t 	global_filename_ix;
60}
61
62File Op {
63	/* delta us between previous file op and this */
64	u_int64_t		delta_us;
65#define file_op			file_op_union.file_op_u
66	union {
67		enum file_op		file_op_u;
68		int32_t			enum_size;
69	} file_op_union;
70	u_int64_t		fileno;
71	union {
72		struct lseek_args {
73#define lseek_offset	u.lseek_a.offset
74#define lseek_action	u.lseek_a.action
75			u_int64_t	offset;
76			int32_t		action;
77		} lseek_a;
78		struct prw_args {
79#define prw_offset	u.prw_a.offset
80#define prw_len		u.prw_a.len
81			u_int64_t	offset;
82			u_int64_t	len;
83		} prw_a;
84#define rw_len		u.rw_a.len
85		struct rw_args {
86			u_int64_t	len;
87		} rw_a;
88#define mmap_offset	u.mmap_a.offset
89#define mmap_len	u.mmap_a.len
90#define mmap_prot	u.mmap_a.prot
91		struct mmap_args {
92			u_int64_t	offset;
93			u_int64_t	len;
94			int32_t		prot;
95	} mmap_a;
96#define open_flags	u.open_a.flags
97#define open_mode	u.open_a.mode
98		struct open_args {
99			int32_t		flags;
100			int32_t		mode;
101		} open_a;
102	} u;
103
104}
105