Upload
kenny-netman
View
172
Download
4
Embed Size (px)
Citation preview
Importance of Linux System Fundamental In Technical Documentation Reading
by netman<[email protected]>
August 2016
The Sample Document
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/pdf/Virtualization_Tuning_and_Optimization_Guide/Red_Hat_Enterprise_Linux-7-Virtualization_Tuning_and_Optimization_Guide-en-US.pdf
Command line & Quoting
Improper line ending
perf kvm --host --guest --guestmodules=guest-modules report -i \ perf.data.kvm --force > analyze
Should be:
perf kvm --host --guest --guestmodules=guest-modules report -i perf.data.kvm \ --force > analyze
Or:
Configuration of sysctl
echo “net.ipv4.conf.all.arp_filter=1” >> /etc/sysctl.conf sysctl -p
It means:
Kernel module management
echo “options vhost_net experimental_zcopytx=1” \ > /etc/modprode.d/vhost_net.conf modprobe –r vhost_net modprobe vhost_net
Actually you should do:
Configuration file path
You have to know about:
• The guest xml path: /etc/libvirt/qemu/guest_name.xml OR • The command to edit guest xml: virsh edit guest_name
Substitute to a number!
Using systemd
Using echo command to change /sys settings will be lost after reboot!
Solutions:
• Put the commands into /etc/rc.local OR • Create a systemd script : vi /etc/systemd/system/set_transparent_hugepages.service [Unit] Description=Disable transparent hugepages After=multi-user.target [Service] ExecStart=/usr/bin/bash -c 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' [Install] WantedBy=graphical.target systemctl enable set_transparent_hugepages.service
Grub configuration
It’s talking about modifying kernel options in GRUB:
vi /etc/default/grub GRUB_CMDLINE_LINUX=“… default_hugepagesz=1G hugepagesz=1G hugepages=4 hugepagesz=2M hugepages=1024" grub2-mkconfig -o /boot/grub2/grub.cfg