-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vm-under-test: Adjust disk image to realtime #35
Conversation
ea9ccbf
to
61a5cbc
Compare
looks like the
@matosatti Is that necessary to reboot to image before running it? |
596e51b
to
a5a6124
Compare
@RamLavi could you please share the results from manually running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR @RamLavi
Please see the inline comments.
@@ -21,3 +21,5 @@ set -e | |||
|
|||
systemctl disable NetworkManager-wait-online | |||
systemctl disable sshd | |||
systemctl disable irqbalance | |||
systemctl stop irqbalance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don`t think there is a point in stopping this service, because when the VM will later boot - it will be disabled because of the previous command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I run the VMI on the sshd - the service is active - so I'm not so sure.
@@ -27,4 +27,4 @@ systemctl stop irqbalance | |||
dnf --enablerepo=rt install -y tuned-profiles-realtime | |||
dnf --enablerepo=nfv install -y tuned-profiles-nfv-guest | |||
|
|||
grubby --args="default_hugepagesz=1GB hugepagesz=1G hugepages=1" --update-kernel=$(grubby --default-kernel) | |||
grubby --args="iommu=pt intel_iommu=on default_hugepagesz=1GB hugepagesz=1G hugepages=1" --update-kernel=$(grubby --default-kernel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is how Nini configured it. it is supposed to make thing more optimized on intel nodes that support this..
These packages are needed in order to run oslat. Signed-off-by: Ram Lavi <ralavi@redhat.com>
Adding the -e flag in order to know if script failed during the container-disk build. Signed-off-by: Ram Lavi <ralavi@redhat.com>
a5a6124
to
b696eaa
Compare
After applying tuned-adm profile realtime-virtual-host? Yes. |
you mean realtime-virtual-guest, right? |
b696eaa
to
c096df2
Compare
disable irqbalance service before starting to use tuned since tuned also manages the system IRQs and that might collide with irqbalance. Signed-off-by: Ram Lavi <ralavi@redhat.com>
ec65d05
to
6d3e662
Compare
manually checking the image:
I think this hits all the marks. @matosatti @orelmisan can you take a look? |
passed CI on CNV4.14 cluster:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the changes @RamLavi
@@ -26,4 +26,4 @@ systemctl disable irqbalance | |||
dnf --enablerepo=rt install -y tuned-profiles-realtime | |||
dnf --enablerepo=nfv install -y tuned-profiles-nfv-guest | |||
|
|||
grubby --args="default_hugepagesz=1GB hugepagesz=1G hugepages=1" --update-kernel=ALL | |||
grubby --args="iommu=pt intel_iommu=on default_hugepagesz=1GB hugepagesz=1G hugepages=1" --update-kernel=ALL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matosatti is this setting necessary in our case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After an offline meeting, we have decided to drop it for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONE
echo isolate_managed_irq=Y >> /etc/tuned/realtime-virtual-guest-variables.conf | ||
tuned-adm profile realtime-virtual-guest | ||
|
||
reboot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to avoid this reboot here?
I'm afraid that it will mess with the checkup's detection of when the VM had completed booting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless we reboot manually on the checkup - then I'm afraid not.
@@ -27,3 +27,6 @@ dnf --enablerepo=rt install -y tuned-profiles-realtime | |||
dnf --enablerepo=nfv install -y tuned-profiles-nfv-guest | |||
|
|||
grubby --args="iommu=pt intel_iommu=on default_hugepagesz=1GB hugepagesz=1G hugepages=1" --update-kernel=ALL | |||
|
|||
swapoff -a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this command redundant if the swap is removed from /etc/fstab
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no. I tried
@@ -22,6 +22,8 @@ set -e | |||
mkdir /mnt/huge | |||
mount /mnt/huge --source nodev -t hugetlbfs -o pagesize=1GB | |||
|
|||
systemctl mask "$(systemctl --type swap | grep '.swap' | awk '{print $1}')" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this command needed if the swap is removed from /etc/fstab
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
vms/vm-under-test/scripts/first-boot
Outdated
mkdir /mnt/huge | ||
mount /mnt/huge --source nodev -t hugetlbfs -o pagesize=1GB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After an offline meeting, we have decided to drop huge pages for now.
PR #38 drops it from the VMI spec as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONE
6d3e662
to
3915f5d
Compare
virt-builder does not seem to support enabling repos, so this is instead done on the customize script. Signed-off-by: Ram Lavi <ralavi@redhat.com>
The tuned-adm command needs a reboot in order to take effect. In order to reboot during the virt-builder operation - the command is done in a first-boot script. Signed-off-by: Ram Lavi <ralavi@redhat.com>
Disabling swap space since it will introduce potential latency. In order to permanently disable [0], this commit is: - using the swapoff command. - commenting the swap entries on /etc/fstab. - masking the swap service with systemctl (done during the first-boot) [0] https://askubuntu.com/questions/440326/how-can-i-turn-off-swap-permanently/984777#984777 Signed-off-by: Ram Lavi <ralavi@redhat.com>
3915f5d
to
c688998
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
We should strive to remove the reboot from the first-boot script in a follow-up.
This PR is introducing the required configurations for realtime.