aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/vnf_generic
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-03-09 13:19:22 +0000
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-03-09 13:51:52 +0000
commitba811fc624003829bb972890d96aac4f5eaf97b5 (patch)
treea3dfdd08bd8a12efa95bf595f335ff9f6be2be98 /yardstick/network_services/vnf_generic
parentf753fb86cc26e08dca168c0827d28a7b6f022d1f (diff)
Make Sample VNF hugepages size configurable
The amount of hugepages claimed for a Sample VNF is always 16GB. This value is excesive for most of the Sample VNF applications (except for vPE). Making this parameter configurable we allow to spawn smaller VMs by using less hugepages (in case of StandAlone and OpenStack deployments). Because this parameter depends on the Scenario and the type of VNF executed, the parameter is located in: scenarios: {options: hugepages_gb} # number of GB of hugepages claimed PENDING: document this new parameter. A new userguide section should be created to document all "scenario" sections and parameters. JIRA: YARDSTICK-1061 Change-Id: I6f082e105289bd01781be18f2fecbe0ba2fdfdee Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Diffstat (limited to 'yardstick/network_services/vnf_generic')
-rw-r--r--yardstick/network_services/vnf_generic/vnf/sample_vnf.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py
index ad78774f0..c3c10e5a4 100644
--- a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py
+++ b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py
@@ -81,7 +81,6 @@ class DpdkVnfSetupEnvHelper(SetupEnvHelper):
APP_NAME = 'DpdkVnf'
FIND_NET_CMD = "find /sys/class/net -lname '*{}*' -printf '%f'"
NR_HUGEPAGES_PATH = '/proc/sys/vm/nr_hugepages'
- HUGEPAGES_KB = 1024 * 1024 * 16
@staticmethod
def _update_packet_type(ip_pipeline_cfg, traffic_options):
@@ -120,7 +119,8 @@ class DpdkVnfSetupEnvHelper(SetupEnvHelper):
def _setup_hugepages(self):
meminfo = utils.read_meminfo(self.ssh_helper)
hp_size_kb = int(meminfo['Hugepagesize'])
- nr_hugepages = int(abs(self.HUGEPAGES_KB / hp_size_kb))
+ hugepages_gb = self.scenario_helper.all_options.get('hugepages_gb', 16)
+ nr_hugepages = int(abs(hugepages_gb * 1024 * 1024 / hp_size_kb))
self.ssh_helper.execute('echo %s | sudo tee %s' %
(nr_hugepages, self.NR_HUGEPAGES_PATH))
hp = six.BytesIO()