3.4 Selecting Host Ethernet Interface 3.6 Troubleshooting
Ethernet Networking Technology Guide  /  3 Connecting to a Real Network  / 

3.5 Performance

When using other connection types than port forwarding, Simics has to prevent the simulated network from being flooded with packets from the real network. In practice, the simulated machine is not always able to handle the amount of traffic it receives, and Simics cannot buffer all incoming packets. This is especially a problem when the simulation is stopped.

Flooding is prevented by limiting the amount of traffic that is allowed to enter the simulated network per simulated second. This amount is determined by the tx_bandwidth and tx_packet_rate attributes of the real network object created for the connection, typically named real_net0. The unit of the tx_bandwidth attribute is bits per simulated second, and the unit of the tx_packet_rate attribute is packets per simulated second. Either can be set to unlimited by setting them to 0, but this is not recommended unless a very limited amount of data is to be received. The default is to allow 10 megabits per simulated second and an unlimited number of packets.

In addition to allowing the selected rate of traffic into the simulated network, Simics buffers traffic for an additional 0.1 seconds of simulated time, to avoid dropping packets during a short peak in the traffic. If more packets arrive once this buffer is full, Simics will drop them.

To get better performance out of the connection to the real network, modify the value of the tx_bandwidth and tx_packet_rate attributes until satisfied. A good strategy is to set the tx_bandwidth attribute to the amount of traffic that the simulated machine is expected to handle per simulated second, and then try to increase the tx_packet_rate from about 5000 and see at what packet rate the best performance is achieved.

For example, this will set the limit to 100 megabits and 10000 packets per simulated second:

simics> @conf.real_net0.tx_bandwidth = 100000000
simics> @conf.real_net0.tx_packet_rate = 10000
3.4 Selecting Host Ethernet Interface 3.6 Troubleshooting