As stated in the documentation uperf is a file based network micro benchmark utility. The goal of this document is to provide a developer with an overview of the file layout, control flow, and data structures. In addition to this document is the design_notes file which lays out additional information.
- strand - uperf abstraction for process or pthread
- flowop - the smallest unit of work specified in a XML configuration file, including
connect
,read
,write
, anddisconnect
. - transaction - wrapper around one or more flowops
- group - a set of transaction that can be executed by one or more threads
- client - acts a client in the client server model, also responsible for stats collection and transmitting the work to be done to the server.
- server - a simple daemon that receives packets from the client, keeps track of the stats of the run, and transmits stats back to the client.
A brief description of the purpose of the files
Functions and structures that are common to the client and server
Functions used when needing to sleep or spin wait.
A wrapper around the transactions that are specified by the user.
Structures and enums that define the results and error generated by flowops.
Layer that sits on top of all protocols to facilitate open,send,close operations.
Structures and functions covering the last message from the server to the client. The purpose of the message is to transmit the collected statistics from the run to the client.
Functions that handle the sending and receiving of the groups, transactions, and flowops.
Uses sys/systeminfo.h
, and sysinfo
function. By default looks for BU_cpu_clk_unhalted
and FR_retired_x86_instr_w_excp_intr
.
Provides 6 message types, ERROR
,QUIT
,ABORT
,INFO
,DEBUG
,WARN
. Logs to stdout by default.
On Linux, this parses /proc/net/dev
.
Utility functions to convert numbers to be human readable.
Parses the XML based configuration file
Window width aware printer for run time and summary stats
Abstraction layer that sits on top of supported protocols, allowing de-coupling of protocol implementations and the uperf benchmark harness.
Functions that will execute a supplied callback at the rate given in the function declaration.
Functions and data structures covering statistics and data collection. Collection is done in shared memory.
Abstraction layer meant to abstract threads and processes so they can both be controlled via these functions.
Functions and structures to ensure that all strands complete a transaction before moving onto the next transaction
As seen in the design notes
- barriers
- global error
- slave list
- name
- port
- control connection
- Workorder
- strand_state_summary
- per-strand structures
- array of stat_t
- per_strand state
- slave list
- connection array
- strand_id
- buffer
- hardware counter structure
As seen in the design notes
- Update
flowop_type_t
in flowops.h - Update flowops[] to add new flowop
- Update
opp_flowopspp[]
- Implement the flowop stub in
flowops_library.c
- Update
flowop_get_execute_func()
inflowops_library.c
- Update the protocol structure to add the new flowop
- Implement the flowop for each protocol
- Parse workload profile
- For each unique remote host
- handshake start
- workorder transfer
- send port numbers (for ex if master has to do accept())
- get port numbers (used when master needs to connect())
- get confirmation that all remote strands started
- handshake end
- Create per strand data structures
- Init barriers
- Create strands
- send handshake_end message to slave
- open begin_run barrier
- Wait for strands to finish
- Statistics gathering/reporting
- Wait for connection, fork to handle it.
- Communicate with master
- handshake_begin
- get workorder
- get ports
- byteswap if necessary
- create per thread data structures
- create strands with handle to workorder
- Wait for handshake_end msg from master
- Reply with confirmation that strands have started
- Open begin_run barrier
- Wait for strands to finish