cisco-system-traffic-generator / trex-core

trex-core site
https://trex-tgn.cisco.com/
Other
1.32k stars 464 forks source link

what is the purpose of defining ipg and rtt per cap when they're all the same #137

Open mcallaghan-sandvine opened 6 years ago

mcallaghan-sandvine commented 6 years ago

As per: https://trex-tgn.cisco.com/trex/doc/trex_manual.html#_global_traffic_yaml_section

  cap_ipg    : true                            3
  cap_ipg_min    : 30                          4
  cap_override_ipg    : 200                    5

  | true (default) indicates that the IPG is taken from the cap file (also  taking into account cap_ipg_min and cap_override_ipg if they exist).  false indicates that IPG is taken from per template section.
  | The following two options can set the min ipg in microseconds: (if (pkt_ipg<cap_ipg_min) { pkt_ipg=cap_override_ipg} )

and, https://trex-tgn.cisco.com/trex/doc/trex_manual.html#_per_template_section

       ipg : 10000         3
       rtt : 10000         4

  | If the global section of the YAML file includes cap_ipg    : false, this line sets the inter-packet gap in microseconds.
  | Should be set to the same value as ipg (microseconds).

-- My confusion lies in the traffic profiles shipped by default. Why do many of them explicitly say cap_ipg true, and then proceed to have the SAME values in all template definitions? example:

$ egrep "name|ipg|rtt" avl/sfr_branch_profile_delay_10.yaml 
  cap_ipg    : true
  #cap_ipg_min    : 30
  #cap_override_ipg    : 200
     - name: avl/delay_10_http_get_0.pcap
       ipg : 10000
       rtt : 10000
     - name: avl/delay_10_http_post_0.pcap
       ipg : 10000
       rtt : 10000
     - name: avl/delay_10_https_0.pcap
       ipg : 10000
       rtt : 10000
     - name: avl/delay_10_http_browsing_0.pcap
       ipg : 10000
       rtt : 10000
     - name: avl/delay_10_exchange_0.pcap
       ipg : 10000
       rtt : 10000
     - name: avl/delay_10_mail_pop_0.pcap
       ipg : 10000
       rtt : 10000
     - name: avl/delay_10_mail_pop_1.pcap
       ipg : 10000
       rtt : 10000
     - name: avl/delay_10_mail_pop_2.pcap
       ipg : 10000
       rtt : 10000
     - name: avl/delay_10_oracle_0.pcap
       ipg : 10000
       rtt : 10000
     - name: avl/delay_10_rtp_160k_full.pcap
       ipg : 10000
       rtt : 10000
     - name: avl/delay_10_rtp_250k_full.pcap
       ipg : 10000
       rtt : 10000
     - name: avl/delay_10_smtp_0.pcap
       ipg : 10000
       rtt : 10000
     - name: avl/delay_10_smtp_1.pcap
       ipg : 10000
       rtt : 10000
     - name: avl/delay_10_smtp_2.pcap
       ipg : 10000
       rtt : 10000
     - name: avl/delay_10_video_call_0.pcap
       ipg : 10000
       rtt : 10000
     - name: avl/delay_10_sip_video_call_full.pcap
       ipg : 10000
       rtt : 10000
     - name: avl/delay_10_citrix_0.pcap
       ipg : 10000
       rtt : 10000
     - name: avl/delay_10_dns_0.pcap
       ipg : 10000
       rtt : 10000

In summary:

  1. why should shipped profiles say "use ipg from cap files", but then include all same values in template sections
  2. why does rtt need to be set to the same value as ipg in the template section? (what does it do)
mcallaghan-sandvine commented 6 years ago

Just tested it.

I have a simplified file like:

- duration : 9999
  generator :
          distribution : "seq"
          clients_start : "4.0.0.1"
          clients_end   : "4.0.0.255"
          servers_start : "5.0.0.1"
          servers_end   : "5.0.20.255"
  cap_ipg    : true
  cap_info :
     - name: FOO.cap
       cps : 4628

try to run it, exploded

yaml-cpp: error at line 11, column 8: key not found: ipg

(why is it required?)

mcallaghan-sandvine commented 6 years ago

Also of note, as per #143, the defaults of 10ms are apparently for a reason (see that ticket for the issues if user tries to set it lower than 10ms).

hhaim commented 6 years ago

let's take an example of pcap file

pkt_id C/S side description 0 C SYN 1 S SYN-ACK 2 C ACK 3 C GET

RTT is used as delay between packets 0-1, 1-2 IPG is used as delay betwean packets 2-3

mcallaghan-sandvine commented 6 years ago

Yes thank you - that is confirmation that I understand it correctly (but only after experimentation)

Let's please re-open this issue/ticket; there are issues to fix here.

  1. User should not be required to supply rtt/ipg if they've set pcap_ipg to true.
  2. There's a lot of template/docs things to fix/improve here.
hhaim commented 6 years ago

understood. will reopen

On Tue, Oct 2, 2018 at 3:54 PM Matt Callaghan notifications@github.com wrote:

Please re-open, there are issues to fix here.

User should not be required to supply rtt/ipg if they've set pcap_ipg to true.

Plus there's a lot of template/docs things to fix/improve here.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/cisco-system-traffic-generator/trex-core/issues/137#issuecomment-426262182, or mute the thread https://github.com/notifications/unsubscribe-auth/AMbjvQcOwLfb1X-WeQ2dlBocLIOOKnmiks5ug2H9gaJpZM4V-jr4 .

-- Hanoh Sent from my iPhone