bc8921d109fb690a65e350495e29ce76baeec09a
[nfvbench.git] / nfvbench / cfg.default.yaml
1 #
2 # NFVbench default configuration file
3 #
4 # This configuration file is ALWAYS loaded by NFVbench and should never be modified by users.
5 # To specify your own property values, always define them in a separate config file
6 # and pass that file to the script using -c or --config <file>
7 # Property values in that config file will override the default values in the current file
8 #
9 ---
10 # IMPORTANT CUSTOMIZATION NOTES
11 # There are roughly 2 types of NFVbench config based on the OpenStack encaps used:
12 # - VLAN (OVS, OVS-DPDK, ML2/VPP)
13 # Many of the fields to customize are relevant to only 1 of the 2 encaps
14 # These will be clearly labeled "VxLAN only" or "VLAN only"
15 # Fields that are not applicable will not be used by NFVbench and can be left empty
16 #
17 # All fields are applicable to all encaps/traffic generators unless explicitly marked otherwise.
18 # Fields that can be over-ridden at the command line are marked with the corresponding
19 # option, e.g. "--interval"
20
21
22 # Forwarder to use in nfvbenchvm image. Available options: ['vpp', 'testpmd']
23 vm_forwarder: testpmd
24
25 # By default (empty) NFVBench will try to locate a VM image file
26 # from the package root directory named "nfvbench-<version>.qcow2" and
27 # upload that file. The image name will be "nfvbench-<version>"
28 # This can be overridden by specifying here a pathname of a file
29 # that follows the same naming convention.
30 # In most cases, this field should be left empty as the packaging should
31 # include the proper VM image file
32 vm_image_file:
33
34 # Name of the flavor to use for the loopback VMs
35 #
36 # If the provided name is an exact match to a flavor name known by OpenStack
37 # (as shown from 'nova flavor-list'), that flavor will be reused.
38 # Otherwise, a new flavor will be created with attributes listed below.
39 flavor_type: 'nfvbench.medium'
40
41 # Custom flavor attributes
42 flavor:
43   # Number of vCPUs for the flavor
44   vcpus: 2
45   # Memory for the flavor in MB
46   ram: 4096
47   # Size of local disk in GB
48   disk: 0
49   # metadata are supported and can be added if needed, optional
50   # note that if your openstack does not have NUMA optimization
51   # (cpu pinning and huge pages)
52   # you must comment out extra_specs completely otherwise
53   # loopback VM creation will fail
54   extra_specs:
55       "hw:cpu_policy": dedicated
56       "hw:mem_page_size": large
57
58 # Name of the availability zone to use for the test VMs
59 # Must be one of the zones listed by 'nova availability-zone-list'
60 # If the selected zone contains only 1 compute node and PVVP inter-node flow is selected,
61 # application will use intra-node PVVP flow.
62 # List of compute nodes can be specified, must be in given availability zone if not empty
63 #availability_zone: 'nova'
64 availability_zone:
65 compute_nodes:
66
67
68 # Credentials for SSH connection to TOR switches.
69 tor:
70     # Leave type empty or switch list empty to skip TOR switches configuration.
71     # Preferably use 'no_tor_access' to achieve the same behavior.
72     # (skipping TOR config will require the user to pre-stitch the traffic generator interfaces
73     # to the service chain under test, needed only if configured in access mode)
74     type:
75     # Switches are only needed if type is not empty.
76     # You can configure 0, 1 or 2 switches
77     # no switch: in this case NFVbench will not attempt to ssh to the switch
78     #            and stitching of traffic must be done externally
79     # 1 switch: this assumes that both traffic generator interfaces are wired to the same switch
80     # 2 switches: this is the recommended setting wuth redundant switches, in this case each
81     #             traffic generator interface must be wired to a different switch
82     switches:
83         - host:
84           username:
85           password:
86           port:
87
88 # Skip TOR switch configuration and retrieving of stats
89 # Can be overriden by --no-tor-access
90 no_tor_access: false
91
92 # Skip vswitch configuration and retrieving of stats
93 # Can be overriden by --no-vswitch-access
94 no_vswitch_access: false
95
96 # Type of service chain to run, possible options are PVP, PVVP and EXT
97 # PVP - port to VM to port
98 # PVVP - port to VM to VM to port
99 # EXT - external chain used only for running traffic and checking traffic generator counters,
100 #       all other parts of chain must be configured manually
101 # Can be overriden by --service-chain
102 service_chain: 'PVP'
103
104 # Total number of service chains, every chain has own traffic stream
105 # Can be overriden by --service-chain-count
106 service_chain_count: 1
107
108 # Total number of traffic flows for all chains and directions generated by the traffic generator.
109 # Minimum is '2 * service_chain_count', it is automatically adjusted if too small
110 # value was configured. Must be even.
111 # Every flow has packets with different IPs in headers
112 # Can be overriden by --flow-count
113 flow_count: 10000
114
115 # Used by PVVP chain to spawn VMs on different compute nodes
116 # Can be overriden by --inter-node
117 inter_node: false
118
119 # set to true if service chains should use SRIOV
120 # This requires SRIOV to be available on compute nodes
121 sriov: false
122
123 # Skip interfaces config on EXT service chain
124 # Can be overriden by --no-int-config
125 no_int_config: false
126
127 # Resources created by NFVbench will not be removed
128 # Can be overriden by --no-cleanup
129 no_cleanup: false
130
131 # Configuration for traffic generator
132 traffic_generator:
133     # Name of the traffic generator, only for informational purposes
134     host_name: 'nfvbench_tg'
135     # this is the default traffic generator profile to use
136     # the name must be defined under generator_profile
137     # you can override the traffic generator to use using the
138     # -g or --traffic-gen option at the command line
139     default_profile: trex-local
140
141     # IP addresses for L3 traffic.
142     # All of the IPs are used as base for IP sequence computed based on chain or flow count.
143     #
144     # `ip_addrs` base IPs used as src and dst in packet header, quantity depends on flow count
145     # `ip_addrs_step`: step for generating IP sequence. Use "random" for random patterns, default is 0.0.0.1.
146     # `tg_gateway_ip_addrs` base IPs for traffic generator ports, quantity depends on chain count
147     # `tg_gateway_ip_addrs__step`: step for generating traffic generator gateway sequences. default is 0.0.0.1
148     # `gateway_ip_addrs`: base IPs of router gateways on both networks, quantity depends on chain count
149     # `gateway_ip_addrs_step`: step for generating router gateway sequences. default is 0.0.0.1
150     # `udp_src_port`: the source port for sending UDP traffic, default is picked by TRex (53)
151     # `udp_dst_port`: the destination port for sending UDP traffic, default is picked by TRex (53)
152     ip_addrs: ['10.0.0.0/8', '20.0.0.0/8']
153     ip_addrs_step: 0.0.0.1
154     tg_gateway_ip_addrs: ['1.1.0.100', '2.2.0.100']
155     tg_gateway_ip_addrs_step: 0.0.0.1
156     gateway_ip_addrs: ['1.1.0.2', '2.2.0.2']
157     gateway_ip_addrs_step: 0.0.0.1
158     udp_src_port:
159     udp_dst_port:
160
161     # Traffic Generator Profiles
162     # In case you have multiple testbeds or traffic generators,
163     # you can define one traffic generator profile per testbed/traffic generator.
164     #
165     # Generator profiles are listed in the following format:
166     # `name`: Traffic generator profile name (use a unique name, no space or special character)
167     # `tool`: Traffic generator tool to be used (currently supported is `TRex`).
168     # `ip`: IP address of the traffic generator.
169     # `cores`: Specify the number of cores for TRex traffic generator. ONLY applies to trex-local.
170     # `software_mode`: Advice TRex to use software mode which provides the best compability. But
171     #                  note that TRex will not use any hardware acceleration technology under
172     #                  software mode, therefore the performance of TRex will be significantly
173     #                  lower. ONLY applies to trex-local.
174     # `interfaces`: Configuration of traffic generator interfaces.
175     # `interfaces.port`: The port of the traffic generator to be used (leave as 0 and 1 resp.)
176     # `interfaces.switch_port`: Leave empty (reserved for advanced use cases)
177     # `interfaces.pci`: The PCI address of the intel NIC interface associated to this port
178     # `intf_speed`: The speed of the interfaces used by the traffic generator (per direction).
179     #
180     generator_profile:
181         - name: trex-local
182           tool: TRex
183           ip: 127.0.0.1
184           cores: 3
185           software_mode: false
186           interfaces:
187             - port: 0
188               switch_port:
189               pci:
190             - port: 1
191               switch_port:
192               pci:
193           intf_speed: 10Gbps
194
195 # -----------------------------------------------------------------------------
196 # These variables are not likely to be changed
197
198 # The openrc file
199 openrc_file:
200
201 # Number of seconds to wait for VMs to pass traffic in both directions
202 check_traffic_time_sec: 200
203
204 # General retry count
205 generic_retry_count: 100
206
207 # General poll period
208 generic_poll_sec: 2
209
210 # name of the loop VM
211 loop_vm_name: 'nfvbench-loop-vm'
212
213 # Default names, subnets and CIDRs for PVP/PVVP networks
214 # If a network with given name already exists it will be reused.
215 # - PVP only uses left and right
216 # - PVVP uses left, middle and right
217 # - for EXT chains, this structure is not relevant - refer to external_networks
218 # Otherwise a new internal network will be created with that name, subnet and CIDR.
219
220 # segmentation_id can be set to enforce a specific VLAN id - by default (empty) the VLAN id 
221 #                 will be assigned by Neutron.
222 #                 Must be unique for each network
223 # physical_network can be set to pick a specific phsyical network - by default (empty) the
224 #                   default physical network will be picked
225 # In the case of SR-IOV, both physical_network and segmentation ID must be provided
226 # For example to setup PVP using 2 different SR-IOV ports, you must put the appropriate physnet
227 # names under left.physical_network and right.physical_network.
228 # Example of override configuration to force PVP to run on 2 SRIOV ports (phys_sriov0 and phys_sriov1)
229 # using VLAN ID 2000 and 2001:
230 # internal_networks:
231 #    left:
232 #        segmentation_id: 2000
233 #        physical_network: phys_sriov0
234 #    right:
235 #        segmentation_id: 2001
236 #        physical_network: phys_sriov1
237
238 internal_networks:
239     left:
240         name: 'nfvbench-net0'
241         subnet: 'nfvbench-subnet0'
242         cidr: '192.168.1.0/24'
243         network_type: 'vlan'
244         segmentation_id:
245         physical_network:
246     right:
247         name: 'nfvbench-net1'
248         subnet: 'nfvbench-subnet1'
249         cidr: '192.168.2.0/24'
250         network_type: 'vlan'
251         segmentation_id:
252         physical_network:
253     middle:
254         name: 'nfvbench-net2'
255         subnet: 'nfvbench-subnet2'
256         cidr: '192.168.3.0/24'
257         network_type: 'vlan'
258         segmentation_id:
259         physical_network:
260
261 # In the scenario of PVVP + SRIOV, there is choice of how the traffic will be
262 # handled in the middle network. The default (false) will use vswitch, while
263 # SRIOV can be used by toggling below setting.
264 use_sriov_middle_net: false
265
266 # EXT chain only. Names of edge networks which will be used to send traffic via traffic generator.
267 external_networks:
268     left: 'nfvbench-net0'
269     right: 'nfvbench-net1'
270
271 # Use 'true' to enable VLAN tagging of packets generated and sent by the traffic generator
272 # Leave empty you do not want the traffic generator to insert the VLAN tag. This is 
273 # needed for example if VLAN tagging is enabled on switch (trunk mode) or if you want to hook directly to a NIC
274 # By default is set to true (which is the nominal use case with TOR and trunk mode to Trex)
275 vlan_tagging: true
276
277 # Specify only when you want to override VLAN IDs used for tagging with own values (exactly 2).
278 # Default behavior of VLAN tagging is to retrieve VLAN IDs from OpenStack networks provided above.
279 # In case of VxLAN this setting is ignored and only vtep_vlan from traffic generator profile is used.
280 # Example: [1998, 1999]
281 vlans: []
282
283 # Used only with EXT chain. MAC addresses of traffic generator ports are used as destination
284 # if 'no_arp' is set to 'true'. Otherwise ARP requests are sent to find out destination MAC addresses.
285 no_arp: false
286
287 # Traffic Profiles
288 # You can add here more profiles as needed
289 # `l2frame_size` can be specified in any none zero integer value to represent the size in bytes
290 # of the L2 frame, or "IMIX" to represent the standard 3-packet size mixed sequence (IMIX1).
291 traffic_profile:
292     - name: traffic_profile_64B
293       l2frame_size: ['64']
294     - name: traffic_profile_IMIX
295       l2frame_size: ['IMIX']
296     - name: traffic_profile_1518B
297       l2frame_size: ['1518']
298     - name: traffic_profile_3sizes
299       l2frame_size: ['64', 'IMIX', '1518']
300
301 # Traffic Configuration
302 # bidirectional: to have traffic generated from both direction, set bidirectional to true
303 # profile: must be one of the profiles defined in traffic_profile
304 # The traffic profile can be overriden with the options --frame-size and --uni-dir
305 traffic:
306     bidirectional: true
307     profile: traffic_profile_64B
308
309 # Check config and connectivity only - do not generate traffic
310 # Can be overriden by --no-traffic
311 no_traffic: false
312
313 # Do not reset tx/rx counters prior to running
314 # Can be overriden by --no-reset
315 no_reset: false
316
317 # Test configuration
318
319 # The rate pps for traffic going in reverse direction in case of unidirectional flow. Default to 1.
320 unidir_reverse_traffic_pps: 1
321
322 # The rate specifies if NFVbench should determine the NDR/PDR
323 #  or if NFVbench should just generate traffic at a given fixed rate
324 # for a given duration (called "single run" mode)
325 # Supported rate format:
326 # NDR/PDR test: `ndr`, `pdr`, `ndr_pdr` (default)
327 # Or for single run mode:
328 # Packet per second: pps (e.g. `50pps`)
329 # Bits per second: bps, kbps, Mbps, etc (e.g. `1Gbps`, `1000bps`)
330 # Load percentage: % (e.g. `50%`)
331 # Can be overridden by --rate
332 rate: ndr_pdr
333
334 # Default run duration (single run at given rate only)
335 # Can be overridden by --duration
336 duration_sec: 60
337
338 # Interval between intermediate reports when interval reporting is enabled
339 # Can be overridden by --interval
340 interval_sec: 10
341
342 # NDR / PDR configuration
343 measurement:
344     # Drop rates represent the ratio of dropped packet to the total number of packets sent.
345     # Values provided here are percentages. A value of 0.01 means that at most 0.01% of all
346     # packets sent are dropped (or 1 packet every 10,000 packets sent)
347
348     # No Drop Rate in percentage; Default to 0.001%
349     NDR: 0.001
350     # Partial Drop Rate in percentage; NDR should always be less than PDR
351     PDR: 0.1
352     # The accuracy of NDR and PDR as a percnetage of line rate; The exact NDR
353     # or PDR should be within `load_epsilon` line rate % from the one calculated.
354     # For example, with a value 0.1, and a line rate of 10Gbps, the accuracy
355     # of NDR and PDR will be within 0.1% Of 10Gbps or 10Mbps.
356     # The lower the value the more iterations and the longer it will take to find the NDR/PDR.
357     # In practice, due to the precision of the traffic generator it is not recommended to
358     # set it to lower than 0.1
359     load_epsilon: 0.1
360
361 # Location where to store results in a JSON format. Must be container specific path.
362 # Can be overriden by --json
363 json:
364
365 # Location where to store results in the NFVbench standard JSON format:
366 # <service-chain-type>-<service-chain-count>-<flow-count>-<packet-sizes>.json
367 # Example: PVP-1-10-64-IMIX.json
368 # Must be container specific path.
369 # Can be overriden by --std-json
370 std_json:
371
372 # Prints debug messages (verbose mode)
373 # Can be overriden by --debug
374 debug: false
375
376 # Set to a valid path name if logging to file is to be enabled
377 # Defaults to disabled
378 log_file:
379
380 # When enabled, all results and/or logs will be sent to a fluentd servers at the requested IPs and ports
381 # A list of one or more fluentd servers identified by their IPs and  port numbers should be given.
382 # For each recipient it is possible to enable both sending logs and performance
383 # results, or enable either logs or performance results. For enabling logs or results logging_tag or
384 # result_tag should be set.
385
386 fluentd:
387       # by default (logging_tag is empty) nfvbench log messages are not sent to fluentd
388       # to enable logging to fluents, specify a valid fluentd tag name to be used for the
389       # log records
390     - logging_tag:
391
392       # by default (result_tag is empty) nfvbench results are not sent to fluentd
393       # to enable sending nfvbench results to fluentd, specify a valid fluentd tag name
394       # to be used for the results records, which is different than logging_tag
395       result_tag:
396
397       # IP address of the server, defaults to loopback
398       ip: 127.0.0.1
399
400       # port # to use, by default, use the default fluentd forward port
401       port: 24224
402
403       # by default (logging_tag is empty) nfvbench log messages are not sent to fluentd
404       # to enable logging to fluents, specify a valid fluentd tag name to be used for the
405       # log records
406
407 # Module and class name of factory which will be used to provide classes dynamically for other components.
408 factory_module: 'nfvbench.factory'
409 factory_class: 'BasicFactory'
410
411 # Custom label added for every perf record generated during this run.
412 # Can be overriden by --user-label
413 user_label: