diff options
author | Serhiy Pshyk <serhiyx.pshyk@intel.com> | 2018-10-04 10:21:33 +0100 |
---|---|---|
committer | Abhijit Sinha <abhijit.sinha@intel.com> | 2018-10-27 18:42:17 +0000 |
commit | 7c7a14132588f99c6291da9037dc61d0d8ea935a (patch) | |
tree | 3720e4b07c3490559b282417e3f1d8b74b5e2a04 /yardstick/benchmark | |
parent | 820b81753dc50ccd8762806f2d5c8398c319c4a0 (diff) |
Setup hugepages on SA host(sriov, ovs_dpdk)
JIRA: YARDSTICK-1461
Change-Id: Ia1f5026eee989672aac57775ec9dd182df658fa4
Signed-off-by: Serhiy Pshyk <serhiyx.pshyk@intel.com>
Diffstat (limited to 'yardstick/benchmark')
-rw-r--r-- | yardstick/benchmark/contexts/standalone/ovs_dpdk.py | 7 | ||||
-rw-r--r-- | yardstick/benchmark/contexts/standalone/sriov.py | 4 |
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 3ad1097b0..d5f649c7f 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 @@ -235,7 +236,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) @@ -390,6 +390,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) |