= Details of Tmix = Tmix generates realistic TCP traffic by "replaying" a TCP/IP header trace collected from a real link. This page will give more details on Tmix, and how it generates traffic. == The a-b-t Model == A TCP/IP header trace is obtained from a real-world link, and is then "reverse compiled" into a higher-level representation. For every TCP/IP connection in the trace a connection vector is generated. The connection vector represents an entire single connection between "''a''", the connection initiator, and "''b''", the connection acceptor. The connection vector also stores the start time "''T''" of the connection. Rather than modeling the individual packets or TCP segments, Tmix instead uses inferences to characterize connections as a sequence of request-response exchanges between "''a''" and "''b''". Each request or response transfers one application-data unit (ADU), which is a generic term for the object or protocol element being transferred. Further, each exchange (request then response) is called an epoch, and includes the sizes of the ADUs transferred, and the requester side "think" or processing time, "''t''". [[Image(TmixImages:tmixConnection.png, 450, right)]] More formally, a simulation would consist of a set of ''n'' connection vectors ''C'',,1...''n'',,, starting at times ''T'',,1...''n'',,. Each connection vector includes a set of ''k'' epochs, ''C'',,''i'',,=<''E'',,1,,,''E'',,2,,,..., ''E'',,k,,>, where each epoch is defined by ''E,,i,,'' = (''a,,i,,'',''b,,i,,'',''t,,i,,''). Each epoch includes ''a'',,''i'',,, the size of the ''i ''^th^ ADU sent from the connection initiator to the connection acceptor, ''b,,i,,'', the size of the ''i ''^th^ ADU sent from the connection acceptor to the connection initiator, and ''t,,i,,'', the "think" or processing time between the receipt of the ''i ''^th^ "response" ADU and the transmission of the (''i''+1)^st^ "request". The figure to the right shows a connection that includes three epochs, with the important features of the a-b-t model labeled. Note that Tmix does not require the any information from application layer headers. == Workload Generation == At run-time Tmix "replays" the exchanges encoded in the set of connection vectors. Tmix is simultaneously run on two machines, each at the edge of a test network. One machine plays the role of initiator, while the other is the acceptor. For each connection vector a TCP connection is established from the initiator to the acceptor at time ''T,,i,,''. The initiator then performs socket writes to send ''a,,1,,'' bytes (the size of the ADU of epoch) of fake data. At the same time, Tmix on the acceptor reads the same number of bytes from it's associated socket. The roles then reverse with the acceptor sending a "response" of ''b,,1,,'' bytes back to the initiator, while it reads them. The initiator then sleeps for ''t,,i,,'' seconds before sending the next "request". The last epoch of a connection doesn't contain a "think" time, and when it is reached the connection is terminated.