aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark
diff options
context:
space:
mode:
authorAbhijit Sinha <abhijit.sinha@intel.com>2018-11-07 17:48:44 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-11-07 17:48:44 +0000
commitb66cff80900ad2b14c96dd7100104318f0754f05 (patch)
tree23a7b9735f0d7fc7f955d47288214e6386f720fb /yardstick/benchmark
parent372b3225b1ea632a2d889f10a0d853bc2224209c (diff)
parent7c7a14132588f99c6291da9037dc61d0d8ea935a (diff)
Merge "Setup hugepages on SA host(sriov, ovs_dpdk)"
Diffstat (limited to 'yardstick/benchmark')
-rw-r--r--yardstick/benchmark/contexts/standalone/ovs_dpdk.py7
-rw-r--r--yardstick/benchmark/contexts/standalone/sriov.py4
2 files changed, 10 insertions, 1 deletions
diff --git a/yardstick/benchmark/contexts/standalone/ovs_dpdk.py b/yardstick/benchmark/contexts/standalone/ovs_dpdk.py
index c2707fd9a..42a275455 100644
--- a/yardstick/benchmark/contexts/standalone/ovs_dpdk.py
+++ b/yardstick/benchmark/contexts/standalone/ovs_dpdk.py
@@ -24,6 +24,7 @@ from yardstick.benchmark import contexts
from yardstick.benchmark.contexts import base
from yardstick.benchmark.contexts.standalone import model
from yardstick.common import exceptions
+from yardstick.common import utils as common_utils
from yardstick.network_services import utils
from yardstick.network_services.utils import get_nsb_option
@@ -242,7 +243,6 @@ class OvsDpdkContext(base.Context):
def check_ovs_dpdk_env(self):
self.cleanup_ovs_dpdk_env()
- self._check_hugepages()
version = self.ovs_properties.get("version", {})
ovs_ver = version.get("ovs", self.DEFAULT_OVS)
@@ -398,6 +398,11 @@ class OvsDpdkContext(base.Context):
self.configure_nics_for_ovs_dpdk()
+ hp_total_mb = int(self.vm_flavor.get('ram', '4096')) * len(self.servers)
+ common_utils.setup_hugepages(self.connection, hp_total_mb * 1024)
+
+ self._check_hugepages()
+
for index, (key, vnf) in enumerate(collections.OrderedDict(
self.servers).items()):
cfg = '/tmp/vm_ovs_%d.xml' % index
diff --git a/yardstick/benchmark/contexts/standalone/sriov.py b/yardstick/benchmark/contexts/standalone/sriov.py
index f1b67a2da..e037dd85a 100644
--- a/yardstick/benchmark/contexts/standalone/sriov.py
+++ b/yardstick/benchmark/contexts/standalone/sriov.py
@@ -21,6 +21,7 @@ from yardstick import ssh
from yardstick.benchmark import contexts
from yardstick.benchmark.contexts import base
from yardstick.benchmark.contexts.standalone import model
+from yardstick.common import utils
from yardstick.network_services.utils import get_nsb_option
from yardstick.network_services.utils import PciAddress
@@ -222,6 +223,9 @@ class SriovContext(base.Context):
# 1 : modprobe host_driver with num_vfs
self.configure_nics_for_sriov()
+ hp_total_mb = int(self.vm_flavor.get('ram', '4096')) * len(self.servers)
+ utils.setup_hugepages(self.connection, hp_total_mb * 1024)
+
for index, (key, vnf) in enumerate(collections.OrderedDict(
self.servers).items()):
cfg = '/tmp/vm_sriov_%s.xml' % str(index)