T-Rex: 2.82, core pin, 8 workers 84/28184/6
authorpmikus <pmikus@cisco.com>
Thu, 6 Aug 2020 08:45:49 +0000 (08:45 +0000)
committerVratko Polak <vrpolak@cisco.com>
Mon, 24 Aug 2020 10:46:16 +0000 (12:46 +0200)
+ Bump T-Rex version. We need new features for ASTF test.
+ Apply core pining. Results in a more stable performance.
+ Tweak the number of T-Rex workers.
 + We need an even value to achieve ymmetric performance with pinning.
 + Value 8 was selected as a best compromise.

This is a combination of 3 commits.
This is the 1st commit message:

T-Rex: 2.82

This is the commit message #2:

Change Trex to CORE_MASK_PIN mode to improve performance

https://trex-tgn.cisco.com/trex/doc/trex_stateless.html#_core_masking_per_interface
Above link have below explaination,

"When the profile is symmetric, performance can be improved by pinning half of
the cores to port 0, and half of the cores to port 1, thus avoiding cache
trashing and bouncing."

The reason to change this is that to run CSIT with 100G NIC often failed with
"TRex stateless runtime error timeout", it caused by Trex can not send enough
traffic within the fixed duration.

by change to CORE_MASK_PIN mode fix the issue.

Not editing ASTF, as that supports different options.

This is the commit message #3:

Experiment: Vary number of TRex workers

With CORE_MASK_PIN, we can get more predictable time distribution.
Decided to use 8 workers, that gives good results
both for high end (RDMA-core l2patch) and low end (vhost) tests.

Change-Id: I5c61127799e0624464e960fcb980ad1c4058e744
Signed-off-by: pmikus <pmikus@cisco.com>
Signed-off-by: Yulong Pei <yulong.pei@intel.com>
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
GPL/tools/trex/trex_astf_assert.py
GPL/tools/trex/trex_astf_profile.py
GPL/tools/trex/trex_astf_stop.py
GPL/tools/trex/trex_stl_assert.py
GPL/tools/trex/trex_stl_profile.py
GPL/tools/trex/trex_stl_stop.py
GPL/traffic_profiles/trex/profile_trex_astf_base_class.py
resources/libraries/python/Constants.py
resources/tools/presentation/conf.py
resources/tools/testbed-setup/ansible/roles/trex/defaults/main.yaml
resources/tools/testbed-setup/ansible/roles/trex/tasks/main.yaml

index 0e148f0..d6d74bc 100644 (file)
@@ -28,7 +28,7 @@ Functionality:
 import sys
 
 sys.path.insert(
 import sys
 
 sys.path.insert(
-    0, u"/opt/trex-core-2.73/scripts/automation/trex_control_plane/interactive/"
+    0, u"/opt/trex-core-2.82/scripts/automation/trex_control_plane/interactive/"
 )
 from trex.astf.api import *
 
 )
 from trex.astf.api import *
 
index 2bdb8d3..0542486 100644 (file)
@@ -24,7 +24,7 @@ import sys
 import time
 
 sys.path.insert(
 import time
 
 sys.path.insert(
-    0, u"/opt/trex-core-2.73/scripts/automation/trex_control_plane/interactive/"
+    0, u"/opt/trex-core-2.82/scripts/automation/trex_control_plane/interactive/"
 )
 from trex.astf.api import *
 
 )
 from trex.astf.api import *
 
index c216e53..655bdf1 100644 (file)
@@ -34,7 +34,7 @@ import sys
 from collections import OrderedDict  # Needed to parse xstats representation.
 
 sys.path.insert(
 from collections import OrderedDict  # Needed to parse xstats representation.
 
 sys.path.insert(
-    0, u"/opt/trex-core-2.73/scripts/automation/trex_control_plane/interactive/"
+    0, u"/opt/trex-core-2.82/scripts/automation/trex_control_plane/interactive/"
 )
 from trex.astf.api import *
 
 )
 from trex.astf.api import *
 
index 835d009..7c7e921 100644 (file)
@@ -28,7 +28,7 @@ Functionality:
 import sys
 
 sys.path.insert(
 import sys
 
 sys.path.insert(
-    0, u"/opt/trex-core-2.73/scripts/automation/trex_control_plane/interactive/"
+    0, u"/opt/trex-core-2.82/scripts/automation/trex_control_plane/interactive/"
 )
 from trex.stl.api import *
 
 )
 from trex.stl.api import *
 
index 64b8342..ac09b8d 100644 (file)
@@ -24,7 +24,7 @@ import sys
 import time
 
 sys.path.insert(
 import time
 
 sys.path.insert(
-    0, u"/opt/trex-core-2.73/scripts/automation/trex_control_plane/interactive/"
+    0, u"/opt/trex-core-2.82/scripts/automation/trex_control_plane/interactive/"
 )
 from trex.stl.api import *
 
 )
 from trex.stl.api import *
 
@@ -169,7 +169,8 @@ def simple_burst(
 
             # Choose rate and start traffic:
             client.start(
 
             # Choose rate and start traffic:
             client.start(
-                ports=ports, mult=rate, duration=warmup_time, force=force
+                ports=ports, mult=rate, duration=warmup_time, force=force,
+                core_mask=STLClient.CORE_MASK_PIN
             )
 
             # Block until done:
             )
 
             # Block until done:
@@ -202,7 +203,10 @@ def simple_burst(
         lost_b = 0
 
         # Choose rate and start traffic:
         lost_b = 0
 
         # Choose rate and start traffic:
-        client.start(ports=ports, mult=rate, duration=duration, force=force)
+        client.start(
+            ports=ports, mult=rate, duration=duration, force=force,
+            core_mask=STLClient.CORE_MASK_PIN
+        )
 
         if async_start:
             # For async stop, we need to export the current snapshot.
 
         if async_start:
             # For async stop, we need to export the current snapshot.
index 28a9de9..dcdae7c 100644 (file)
@@ -34,7 +34,7 @@ import sys
 from collections import OrderedDict  # Needed to parse xstats representation.
 
 sys.path.insert(
 from collections import OrderedDict  # Needed to parse xstats representation.
 
 sys.path.insert(
-    0, u"/opt/trex-core-2.73/scripts/automation/trex_control_plane/interactive/"
+    0, u"/opt/trex-core-2.82/scripts/automation/trex_control_plane/interactive/"
 )
 from trex.stl.api import *
 
 )
 from trex.stl.api import *
 
index b013e8a..913a447 100644 (file)
@@ -123,7 +123,7 @@ class TrafficProfileBaseClass:
         """
         self.framesize = kwargs[u"framesize"]
         self._pcap_dir = kwargs.get(
         """
         self.framesize = kwargs[u"framesize"]
         self._pcap_dir = kwargs.get(
-            u"pcap_dir",u"/opt/trex-core-2.73/scripts/avl"
+            u"pcap_dir",u"/opt/trex-core-2.82/scripts/avl"
         )
 
         return self.create_profile()
         )
 
         return self.create_profile()
index 97bd63b..6e44d39 100644 (file)
@@ -185,7 +185,7 @@ class Constants:
     DOCKER_SUT_IMAGE_UBUNTU_ARM = u"snergster/csit-arm-sut:latest"
 
     # TRex install directory
     DOCKER_SUT_IMAGE_UBUNTU_ARM = u"snergster/csit-arm-sut:latest"
 
     # TRex install directory
-    TREX_INSTALL_DIR = u"/opt/trex-core-2.73"
+    TREX_INSTALL_DIR = u"/opt/trex-core-2.82"
 
     # TODO: Find the right way how to use it in trex profiles
     # TRex pcap files directory
 
     # TODO: Find the right way how to use it in trex profiles
     # TRex pcap files directory
@@ -195,7 +195,7 @@ class Constants:
     TREX_LIMIT_MEMORY = get_int_from_env(u"TREX_LIMIT_MEMORY", 8192)
 
     # TRex number of cores
     TREX_LIMIT_MEMORY = get_int_from_env(u"TREX_LIMIT_MEMORY", 8192)
 
     # TRex number of cores
-    TREX_CORE_COUNT = get_int_from_env(u"TREX_CORE_COUNT", 7)
+    TREX_CORE_COUNT = get_int_from_env(u"TREX_CORE_COUNT", 8)
 
     # Trex force start regardless ports state
     TREX_SEND_FORCE = get_pessimistic_bool_from_env(u"TREX_SEND_FORCE")
 
     # Trex force start regardless ports state
     TREX_SEND_FORCE = get_pessimistic_bool_from_env(u"TREX_SEND_FORCE")
index 0d89448..aa0e7e4 100644 (file)
@@ -108,7 +108,7 @@ rst_epilog = u"""
            dpdkrelease=u'20.02',
            dpdk_prev_release=u'19.08',
            sdpdkrelease=u'2002',
            dpdkrelease=u'20.02',
            dpdk_prev_release=u'19.08',
            sdpdkrelease=u'2002',
-           trex_version=u'v2.73',
+           trex_version=u'v2.82',
            vpp_release_commit_id=u'fce396738f865293f0a023bc7f172086f81da456')
 
 # The language for content autogenerated by Sphinx. Refer to documentation
            vpp_release_commit_id=u'fce396738f865293f0a023bc7f172086f81da456')
 
 # The language for content autogenerated by Sphinx. Refer to documentation
index 79a77bc..77d0aaa 100644 (file)
@@ -30,3 +30,4 @@ trex_url: "https://github.com/cisco-system-traffic-generator/trex-core/archive/"
 trex_version:
   - "2.54"
   - "2.73"
 trex_version:
   - "2.54"
   - "2.73"
+  - "2.82"
index 0e139a2..4e67151 100644 (file)
@@ -69,7 +69,7 @@
     - install-trex
 
 - name: T-Rex - Compile Release III
     - install-trex
 
 - name: T-Rex - Compile Release III
-  command: "make"
+  command: "make -j 16"
   args:
       chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/scripts/ko/src"
   loop: "{{ trex_version }}"
   args:
       chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/scripts/ko/src"
   loop: "{{ trex_version }}"