diff options
Diffstat (limited to 'yardstick/benchmark/contexts/standalone')
-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 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) |