Separate cpu for host os from workload. Change-Id: I5b274a6324fe2fa47c09df82c01e3b95dadb5e53 Epic: PROD-8959tags/2017.4
echo 7 > /sys/class/net/eth1/device/sriov_numvfs; sleep 2; ifup -a | echo 7 > /sys/class/net/eth1/device/sriov_numvfs; sleep 2; ifup -a | ||||
exit 0 | exit 0 | ||||
Isolate CPU options | |||||
~~~~~~~~~~~~~~~~~~~ | |||||
Remove the specified CPUs, as defined by the cpu_number values, from the general kernel | |||||
SMP balancing and scheduler algroithms. The only way to move a process onto or off an | |||||
"isolated" CPU is via the CPU affinity syscalls. cpu_number begins at 0, so the | |||||
maximum value is 1 less than the number of CPUs on the system. | |||||
.. code-block:: yaml | |||||
linux: | |||||
system: | |||||
kernel: | |||||
isolcpu: 1,2,3,4,5,6,7 # isolate first cpu 0 | |||||
Repositories | Repositories | ||||
~~~~~~~~~~~~ | ~~~~~~~~~~~~ |
{%- if system.kernel is defined %} | {%- if system.kernel is defined %} | ||||
{%- if system.kernel.isolcpu is defined %} | |||||
include: | |||||
- linux.system.grub | |||||
/etc/default/grub.d/90-isolcpu.cfg: | |||||
file.managed: | |||||
- contents: 'GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT isolcpu={{ system.kernel.isolcpu }}"' | |||||
- require: | |||||
- file: grub_d_directory | |||||
- watch_in: | |||||
- cmd: grub_update | |||||
{%- endif %} | |||||
{%- if system.kernel.version is defined %} | {%- if system.kernel.version is defined %} | ||||
linux_kernel_package: | linux_kernel_package: |
prompt: | prompt: | ||||
default: "test01.local$" | default: "test01.local$" | ||||
kernel: | kernel: | ||||
sriov: True | |||||
isolcpu: 1,2,3,4 | |||||
hugepages: | hugepages: | ||||
large: | large: | ||||
default: true | default: true |