mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-07-10 18:26:53 +00:00
Update
This commit is contained in:
parent
ce460e6b45
commit
b3b3df01ea
@ -52,7 +52,7 @@ export default function BasicSettingsPage() {
|
|||||||
</p>
|
</p>
|
||||||
<h2 className="text-2xl font-semibold mt-8 mb-4">Available Optimizations</h2>
|
<h2 className="text-2xl font-semibold mt-8 mb-4">Available Optimizations</h2>
|
||||||
|
|
||||||
<h3 className="text-xl font-semibold mt-16 mb-16 flex items-center">
|
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
|
||||||
<StepNumber number={1} />
|
<StepNumber number={1} />
|
||||||
Install Common System Utilities
|
Install Common System Utilities
|
||||||
</h3>
|
</h3>
|
||||||
@ -155,7 +155,7 @@ export default function BasicSettingsPage() {
|
|||||||
<strong>libguestfs-tools</strong>: A set of tools for accessing and modifying virtual machine disk images
|
<strong>libguestfs-tools</strong>: A set of tools for accessing and modifying virtual machine disk images
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p className="text-lg mb-2">This adjustment automates the following command:</p>
|
<p className="text-lg font-semibold mb-2">This adjustment automates the following command:</p>
|
||||||
<CopyableCode
|
<CopyableCode
|
||||||
code={`
|
code={`
|
||||||
# Update package lists
|
# Update package lists
|
||||||
@ -169,7 +169,7 @@ sudo apt-get install -y libguestfs-tools
|
|||||||
`}
|
`}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<h3 className="text-xl font-semibold mt-16 mb-16 flex items-center">
|
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
|
||||||
<StepNumber number={2} />
|
<StepNumber number={2} />
|
||||||
Skip Downloading Additional Languages
|
Skip Downloading Additional Languages
|
||||||
</h3>
|
</h3>
|
||||||
@ -183,7 +183,7 @@ sudo apt-get install -y libguestfs-tools
|
|||||||
improve the speed of package management operations. This is particularly useful in server environments where
|
improve the speed of package management operations. This is particularly useful in server environments where
|
||||||
multiple language support is often not required.
|
multiple language support is often not required.
|
||||||
</p>
|
</p>
|
||||||
<p className="text-lg mb-2">This adjustment automates the following command:</p>
|
<p className="text-lg font-semibold mb-2">This adjustment automates the following command:</p>
|
||||||
<CopyableCode
|
<CopyableCode
|
||||||
code={`
|
code={`
|
||||||
# Configure APT to skip downloading additional languages
|
# Configure APT to skip downloading additional languages
|
||||||
@ -191,7 +191,7 @@ echo 'Acquire::Languages "none";' | sudo tee /etc/apt/apt.conf.d/99-disable-tran
|
|||||||
`}
|
`}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<h3 className="text-xl font-semibold mt-16 mb-16 flex items-center">
|
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
|
||||||
<StepNumber number={3} />
|
<StepNumber number={3} />
|
||||||
Synchronize Time Automatically
|
Synchronize Time Automatically
|
||||||
</h3>
|
</h3>
|
||||||
@ -204,7 +204,7 @@ echo 'Acquire::Languages "none";' | sudo tee /etc/apt/apt.conf.d/99-disable-tran
|
|||||||
consistency, and proper functioning of time-sensitive applications. Automatic synchronization ensures your
|
consistency, and proper functioning of time-sensitive applications. Automatic synchronization ensures your
|
||||||
Proxmox VE system maintains the correct time without manual intervention.
|
Proxmox VE system maintains the correct time without manual intervention.
|
||||||
</p>
|
</p>
|
||||||
<p className="text-lg mb-2">This adjustment automates the following command:</p>
|
<p className="text-lg font-semibold mb-2">This adjustment automates the following command:</p>
|
||||||
<CopyableCode
|
<CopyableCode
|
||||||
code={`
|
code={`
|
||||||
# Note: To set timezone automatically based on IP, you can use:
|
# Note: To set timezone automatically based on IP, you can use:
|
||||||
@ -214,7 +214,7 @@ sudo timedatectl set-timezone "$TIMEZONE"
|
|||||||
`}
|
`}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<h3 className="text-xl font-semibold mt-16 mb-16 flex items-center">
|
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
|
||||||
<StepNumber number={4} />
|
<StepNumber number={4} />
|
||||||
Update and Upgrade System
|
Update and Upgrade System
|
||||||
</h3>
|
</h3>
|
||||||
@ -229,7 +229,7 @@ sudo timedatectl set-timezone "$TIMEZONE"
|
|||||||
performance. This optimization ensures you have the latest patches and features, while also configuring the
|
performance. This optimization ensures you have the latest patches and features, while also configuring the
|
||||||
correct repositories for Proxmox VE, enabling access to necessary updates and tools.
|
correct repositories for Proxmox VE, enabling access to necessary updates and tools.
|
||||||
</p>
|
</p>
|
||||||
<p className="text-lg mb-2">This adjustment automates the following command:</p>
|
<p className="text-lg font-semibold mb-2">This adjustment automates the following command:</p>
|
||||||
<CopyableCode
|
<CopyableCode
|
||||||
code={`
|
code={`
|
||||||
# Disable enterprise Proxmox repository
|
# Disable enterprise Proxmox repository
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { Metadata } from "next"
|
import type { Metadata } from "next"
|
||||||
import { Network } from 'lucide-react'
|
import { Network } from "lucide-react"
|
||||||
import CopyableCode from "@/components/CopyableCode"
|
import CopyableCode from "@/components/CopyableCode"
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
@ -30,6 +30,14 @@ export const metadata: Metadata = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function StepNumber({ number }: { number: number }) {
|
||||||
|
return (
|
||||||
|
<div className="inline-flex items-center justify-center w-8 h-8 mr-3 text-white bg-blue-500 rounded-full">
|
||||||
|
<span className="text-sm font-bold">{number}</span>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
export default function NetworkSettingsPage() {
|
export default function NetworkSettingsPage() {
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto px-4 py-8">
|
<div className="container mx-auto px-4 py-8">
|
||||||
@ -38,22 +46,29 @@ export default function NetworkSettingsPage() {
|
|||||||
<h1 className="text-3xl font-bold">Network Settings</h1>
|
<h1 className="text-3xl font-bold">Network Settings</h1>
|
||||||
</div>
|
</div>
|
||||||
<p className="mb-4">
|
<p className="mb-4">
|
||||||
The <strong>Network Settings</strong> category, focuses on optimizing network
|
The <strong>Network Settings</strong> category focuses on optimizing network performance and configuration for
|
||||||
performance and configuration for your Proxmox VE installation. These settings are crucial for ensuring efficient
|
your Proxmox VE installation. These settings are crucial for ensuring efficient network operations, which is
|
||||||
network operations, which is vital in a virtualized environment where multiple VMs and containers share network resources.
|
vital in a virtualized environment where multiple VMs and containers share network resources.
|
||||||
</p>
|
</p>
|
||||||
<h2 className="text-2xl font-semibold mt-8 mb-4">Available Optimizations</h2>
|
<h2 className="text-2xl font-semibold mt-8 mb-4">Available Optimizations</h2>
|
||||||
|
|
||||||
<section className="mb-8">
|
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
|
||||||
<h3 className="text-xl font-semibold mb-2">Apply Network Optimizations</h3>
|
<StepNumber number={1} />
|
||||||
<p className="mb-4">
|
Apply Network Optimizations
|
||||||
This optimization applies various network-related sysctl settings to improve network performance, security, and stability.
|
</h3>
|
||||||
</p>
|
<p className="mb-4">
|
||||||
<p className="mb-4">
|
This optimization applies various network-related sysctl settings to improve network performance, security, and
|
||||||
<strong>Why it's important:</strong> These optimizations can significantly improve network throughput, reduce latency, and enhance security. They adjust various kernel parameters related to networking, which is crucial in a virtualization environment where network performance directly impacts the performance of VMs and containers.
|
stability.
|
||||||
</p>
|
</p>
|
||||||
<h4 className="text-lg font-semibold mb-2">To apply this setting manually, run:</h4>
|
<p className="mb-4">
|
||||||
<CopyableCode code={`cat <<EOF | sudo tee /etc/sysctl.d/99-network-performance.conf
|
<strong>Why it's beneficial:</strong> These optimizations can significantly improve network throughput, reduce
|
||||||
|
latency, and enhance security. They adjust various kernel parameters related to networking, which is crucial in
|
||||||
|
a virtualization environment where network performance directly impacts the performance of VMs and containers.
|
||||||
|
</p>
|
||||||
|
<p className="text-lg font-semibold mb-2">This adjustment automates the following commands:</p>
|
||||||
|
<CopyableCode
|
||||||
|
code={`
|
||||||
|
cat <<EOF | sudo tee /etc/sysctl.d/99-network-performance.conf
|
||||||
net.core.netdev_max_backlog=8192
|
net.core.netdev_max_backlog=8192
|
||||||
net.core.optmem_max=8192
|
net.core.optmem_max=8192
|
||||||
net.core.rmem_max=16777216
|
net.core.rmem_max=16777216
|
||||||
@ -100,65 +115,91 @@ net.netfilter.nf_conntrack_tcp_timeout_established = 28800
|
|||||||
net.unix.max_dgram_qlen = 4096
|
net.unix.max_dgram_qlen = 4096
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
sudo sysctl -p /etc/sysctl.d/99-network-performance.conf`} />
|
sudo sysctl -p /etc/sysctl.d/99-network-performance.conf
|
||||||
</section>
|
`}
|
||||||
|
/>
|
||||||
|
|
||||||
<section className="mb-8">
|
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
|
||||||
<h3 className="text-xl font-semibold mb-2">Enable TCP BBR and Fast Open</h3>
|
<StepNumber number={2} />
|
||||||
<p className="mb-4">
|
Enable TCP BBR and Fast Open
|
||||||
This optimization enables Google's TCP BBR congestion control algorithm and TCP Fast Open.
|
</h3>
|
||||||
</p>
|
<p className="mb-4">This optimization enables Google's TCP BBR congestion control algorithm and TCP Fast Open.</p>
|
||||||
<p className="mb-4">
|
<p className="mb-4">
|
||||||
<strong>Why it's important:</strong> TCP BBR can significantly improve network throughput and reduce latency, especially on long-distance or congested networks. TCP Fast Open reduces connection establishment time, improving the speed of short-lived connections. These optimizations are particularly beneficial in virtualized environments where network performance is crucial for overall system responsiveness.
|
<strong>Why it's beneficial:</strong> TCP BBR can significantly improve network throughput and reduce latency,
|
||||||
</p>
|
especially on long-distance or congested networks. TCP Fast Open reduces connection establishment time,
|
||||||
<h4 className="text-lg font-semibold mb-2">To apply this setting manually, run:</h4>
|
improving the speed of short-lived connections. These optimizations are particularly beneficial in virtualized
|
||||||
<CopyableCode code={`echo "net.core.default_qdisc = fq" | sudo tee -a /etc/sysctl.d/99-tcp-bbr.conf
|
environments where network performance is crucial for overall system responsiveness.
|
||||||
|
</p>
|
||||||
|
<p className="text-lg font-semibold mb-2">This adjustment automates the following commands:</p>
|
||||||
|
<CopyableCode
|
||||||
|
code={`
|
||||||
|
echo "net.core.default_qdisc = fq" | sudo tee -a /etc/sysctl.d/99-tcp-bbr.conf
|
||||||
echo "net.ipv4.tcp_congestion_control = bbr" | sudo tee -a /etc/sysctl.d/99-tcp-bbr.conf
|
echo "net.ipv4.tcp_congestion_control = bbr" | sudo tee -a /etc/sysctl.d/99-tcp-bbr.conf
|
||||||
echo "net.ipv4.tcp_fastopen = 3" | sudo tee -a /etc/sysctl.d/99-tcp-fastopen.conf
|
echo "net.ipv4.tcp_fastopen = 3" | sudo tee -a /etc/sysctl.d/99-tcp-fastopen.conf
|
||||||
|
|
||||||
sudo modprobe tcp_bbr
|
sudo modprobe tcp_bbr
|
||||||
sudo sysctl -p /etc/sysctl.d/99-tcp-bbr.conf
|
sudo sysctl -p /etc/sysctl.d/99-tcp-bbr.conf
|
||||||
sudo sysctl -p /etc/sysctl.d/99-tcp-fastopen.conf`} />
|
sudo sysctl -p /etc/sysctl.d/99-tcp-fastopen.conf
|
||||||
</section>
|
`}
|
||||||
|
/>
|
||||||
|
|
||||||
<section className="mb-8">
|
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
|
||||||
<h3 className="text-xl font-semibold mb-2">Force APT to Use IPv4</h3>
|
<StepNumber number={3} />
|
||||||
<p className="mb-4">
|
Force APT to Use IPv4
|
||||||
This optimization configures APT (Advanced Package Tool) to use IPv4 exclusively.
|
</h3>
|
||||||
</p>
|
<p className="mb-4">This optimization configures APT (Advanced Package Tool) to use IPv4 exclusively.</p>
|
||||||
<p className="mb-4">
|
<p className="mb-4">
|
||||||
<strong>Why it's important:</strong> Forcing APT to use IPv4 can resolve issues in environments where IPv6 is not properly configured or is causing slowdowns. This ensures more reliable package management operations, which is crucial for maintaining and updating your Proxmox VE system. It's particularly useful in networks where IPv6 connectivity might be unreliable or not fully supported.
|
<strong>Why it's beneficial:</strong> Forcing APT to use IPv4 can resolve issues in environments where IPv6 is
|
||||||
</p>
|
not properly configured or is causing slowdowns. This ensures more reliable package management operations, which
|
||||||
<h4 className="text-lg font-semibold mb-2">To apply this setting manually, run:</h4>
|
is crucial for maintaining and updating your Proxmox VE system. It's particularly useful in networks where IPv6
|
||||||
<CopyableCode code={`echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4`} />
|
connectivity might be unreliable or not fully supported.
|
||||||
</section>
|
</p>
|
||||||
|
<p className="text-lg font-semibold mb-2">This adjustment automates the following commands:</p>
|
||||||
|
<CopyableCode
|
||||||
|
code={`
|
||||||
|
echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4
|
||||||
|
`}
|
||||||
|
/>
|
||||||
|
|
||||||
<section className="mb-8">
|
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
|
||||||
<h3 className="text-xl font-semibold mb-2">Install Open vSwitch</h3>
|
<StepNumber number={4} />
|
||||||
<p className="mb-4">
|
Install Open vSwitch
|
||||||
This optimization installs Open vSwitch, a production quality, multilayer virtual switch.
|
</h3>
|
||||||
</p>
|
<p className="mb-4">This optimization installs Open vSwitch, a production quality, multilayer virtual switch.</p>
|
||||||
<p className="mb-4">
|
<p className="mb-4">
|
||||||
<strong>Why it's important:</strong> Open vSwitch provides advanced networking capabilities for virtualized environments. It allows for more flexible and powerful network configurations, including support for VLAN tagging and trunking, advanced traffic shaping, and Quality of Service (QoS) capabilities. This is particularly beneficial for complex virtualization setups where fine-grained control over network traffic is required.
|
<strong>Why it's beneficial:</strong> Open vSwitch provides advanced networking capabilities for virtualized
|
||||||
</p>
|
environments. It allows for more flexible and powerful network configurations, including support for VLAN
|
||||||
<h4 className="text-lg font-semibold mb-2">To apply this setting manually, run:</h4>
|
tagging and trunking, advanced traffic shaping, and Quality of Service (QoS) capabilities. This is particularly
|
||||||
<CopyableCode code={`sudo apt-get update
|
beneficial for complex virtualization setups where fine-grained control over network traffic is required.
|
||||||
|
</p>
|
||||||
|
<p className="text-lg font-semibold mb-2">This adjustment automates the following commands:</p>
|
||||||
|
<CopyableCode
|
||||||
|
code={`
|
||||||
|
sudo apt-get update
|
||||||
sudo apt-get install -y openvswitch-switch
|
sudo apt-get install -y openvswitch-switch
|
||||||
|
|
||||||
# Verify installation
|
# Verify installation
|
||||||
sudo ovs-vsctl --version`} />
|
sudo ovs-vsctl --version
|
||||||
</section>
|
`}
|
||||||
|
/>
|
||||||
|
|
||||||
<section className="mb-8">
|
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
|
||||||
<h3 className="text-xl font-semibold mb-2">Optimize Network Interface Settings</h3>
|
<StepNumber number={5} />
|
||||||
<p className="mb-4">
|
Optimize Network Interface Settings
|
||||||
This optimization adjusts settings for network interfaces to improve performance and reliability.
|
</h3>
|
||||||
</p>
|
<p className="mb-4">
|
||||||
<p className="mb-4">
|
This optimization adjusts settings for network interfaces to improve performance and reliability.
|
||||||
<strong>Why it's important:</strong> Proper configuration of network interfaces can significantly improve network performance, reduce latency, and increase stability. This is particularly important in virtualized environments where multiple VMs and containers share network resources. Optimizations like increasing the TX queue length can help prevent packet drops under high load.
|
</p>
|
||||||
</p>
|
<p className="mb-4">
|
||||||
<h4 className="text-lg font-semibold mb-2">To apply this setting manually, run:</h4>
|
<strong>Why it's beneficial:</strong> Proper configuration of network interfaces can significantly improve
|
||||||
<CopyableCode code={`# Replace eth0 with your actual interface name
|
network performance, reduce latency, and increase stability. This is particularly important in virtualized
|
||||||
|
environments where multiple VMs and containers share network resources. Optimizations like increasing the TX
|
||||||
|
queue length can help prevent packet drops under high load.
|
||||||
|
</p>
|
||||||
|
<p className="text-lg font-semibold mb-2">This adjustment automates the following commands:</p>
|
||||||
|
<CopyableCode
|
||||||
|
code={`
|
||||||
|
# Replace eth0 with your actual interface name
|
||||||
sudo ip link set eth0 txqueuelen 10000
|
sudo ip link set eth0 txqueuelen 10000
|
||||||
|
|
||||||
# Make the change persistent
|
# Make the change persistent
|
||||||
@ -167,17 +208,19 @@ echo 'ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth0", RUN+="/sbin/ip link set e
|
|||||||
# Enable TCP timestamps
|
# Enable TCP timestamps
|
||||||
echo 'net.ipv4.tcp_timestamps = 1' | sudo tee -a /etc/sysctl.d/99-network-performance.conf
|
echo 'net.ipv4.tcp_timestamps = 1' | sudo tee -a /etc/sysctl.d/99-network-performance.conf
|
||||||
|
|
||||||
sudo sysctl -p /etc/sysctl.d/99-network-performance.conf`} />
|
sudo sysctl -p /etc/sysctl.d/99-network-performance.conf
|
||||||
</section>
|
`}
|
||||||
|
/>
|
||||||
|
|
||||||
<section className="mt-12 p-4 bg-blue-100 rounded-md">
|
<section className="mt-12 p-4 bg-blue-100 rounded-md">
|
||||||
<h2 className="text-xl font-semibold mb-2">Automatic Application</h2>
|
<h2 className="text-xl font-semibold mb-2">Automatic Application</h2>
|
||||||
<p>
|
<p>
|
||||||
All of these optimizations are automatically applied when selected in the Network section section. This automation ensures that these beneficial settings are applied
|
All of these optimizations are automatically applied when selected in the Network section. This automation
|
||||||
consistently and correctly, saving time and reducing the potential for human error during manual
|
ensures that these beneficial settings are applied consistently and correctly, saving time and reducing the
|
||||||
configuration.
|
potential for human error during manual configuration.
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ export default function SystemSettingsPage() {
|
|||||||
updates. In a virtualization environment where multiple VMs might be running, minimizing host downtime is
|
updates. In a virtualization environment where multiple VMs might be running, minimizing host downtime is
|
||||||
crucial for maintaining high availability and reducing disruption to services.
|
crucial for maintaining high availability and reducing disruption to services.
|
||||||
</p>
|
</p>
|
||||||
<p className="text-lg mb-2">This adjustment automates the following commands:</p>
|
<p className="text-lg font-semibold mb-2">This adjustment automates the following commands:</p>
|
||||||
<CopyableCode
|
<CopyableCode
|
||||||
code={`
|
code={`
|
||||||
sudo apt-get install -y kexec-tools
|
sudo apt-get install -y kexec-tools
|
||||||
@ -88,7 +88,7 @@ echo "alias reboot-quick='systemctl kexec'" >> ~/.bash_profile
|
|||||||
on its own. This is particularly crucial in remote or lights-out data center environments where immediate
|
on its own. This is particularly crucial in remote or lights-out data center environments where immediate
|
||||||
physical access might not be possible.
|
physical access might not be possible.
|
||||||
</p>
|
</p>
|
||||||
<p className="text-lg mb-2">This adjustment automates the following commands:</p>
|
<p className="text-lg font-semibold mb-2">This adjustment automates the following commands:</p>
|
||||||
<CopyableCode
|
<CopyableCode
|
||||||
code={`
|
code={`
|
||||||
echo "kernel.panic = 10" | sudo tee /etc/sysctl.d/99-kernelpanic.conf
|
echo "kernel.panic = 10" | sudo tee /etc/sysctl.d/99-kernelpanic.conf
|
||||||
@ -112,7 +112,7 @@ sudo sysctl -p /etc/sysctl.d/99-kernelpanic.conf
|
|||||||
concurrent connections and file operations, which is crucial for busy servers hosting multiple VMs or
|
concurrent connections and file operations, which is crucial for busy servers hosting multiple VMs or
|
||||||
containers.
|
containers.
|
||||||
</p>
|
</p>
|
||||||
<p className="text-lg mb-2">This adjustment automates the following commands:</p>
|
<p className="text-lg font-semibold mb-2">This adjustment automates the following commands:</p>
|
||||||
<CopyableCode
|
<CopyableCode
|
||||||
code={`
|
code={`
|
||||||
echo "fs.inotify.max_user_watches = 1048576" | sudo tee /etc/sysctl.d/99-maxwatches.conf
|
echo "fs.inotify.max_user_watches = 1048576" | sudo tee /etc/sysctl.d/99-maxwatches.conf
|
||||||
@ -135,7 +135,7 @@ sudo sysctl -p
|
|||||||
space is often at a premium. Additionally, optimized logging reduces I/O operations, potentially improving
|
space is often at a premium. Additionally, optimized logging reduces I/O operations, potentially improving
|
||||||
overall system performance.
|
overall system performance.
|
||||||
</p>
|
</p>
|
||||||
<p className="text-lg mb-2">This adjustment automates the following commands:</p>
|
<p className="text-lg font-semibold mb-2">This adjustment automates the following commands:</p>
|
||||||
<CopyableCode
|
<CopyableCode
|
||||||
code={`
|
code={`
|
||||||
echo "SystemMaxUse=64M" | sudo tee -a /etc/systemd/journald.conf
|
echo "SystemMaxUse=64M" | sudo tee -a /etc/systemd/journald.conf
|
||||||
@ -156,7 +156,7 @@ sudo systemctl restart systemd-journald
|
|||||||
memory allocation efficiency, and enhance overall system responsiveness. This is particularly beneficial for
|
memory allocation efficiency, and enhance overall system responsiveness. This is particularly beneficial for
|
||||||
hosts running memory-intensive workloads or a high number of VMs.
|
hosts running memory-intensive workloads or a high number of VMs.
|
||||||
</p>
|
</p>
|
||||||
<p className="text-lg mb-2">This adjustment automates the following commands:</p>
|
<p className="text-lg font-semibold mb-2">This adjustment automates the following commands:</p>
|
||||||
<CopyableCode
|
<CopyableCode
|
||||||
code={`
|
code={`
|
||||||
echo "vm.swappiness = 10" | sudo tee /etc/sysctl.d/99-memory.conf
|
echo "vm.swappiness = 10" | sudo tee /etc/sysctl.d/99-memory.conf
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { Metadata } from "next"
|
import type { Metadata } from "next"
|
||||||
import { Box } from 'lucide-react'
|
import { Box } from "lucide-react"
|
||||||
import CopyableCode from "@/components/CopyableCode"
|
import CopyableCode from "@/components/CopyableCode"
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
@ -30,6 +30,14 @@ export const metadata: Metadata = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function StepNumber({ number }: { number: number }) {
|
||||||
|
return (
|
||||||
|
<div className="inline-flex items-center justify-center w-8 h-8 mr-3 text-white bg-blue-500 rounded-full">
|
||||||
|
<span className="text-sm font-bold">{number}</span>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
export default function VirtualizationSettingsPage() {
|
export default function VirtualizationSettingsPage() {
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto px-4 py-8">
|
<div className="container mx-auto px-4 py-8">
|
||||||
@ -38,22 +46,30 @@ export default function VirtualizationSettingsPage() {
|
|||||||
<h1 className="text-3xl font-bold">Virtualization Settings</h1>
|
<h1 className="text-3xl font-bold">Virtualization Settings</h1>
|
||||||
</div>
|
</div>
|
||||||
<p className="mb-4">
|
<p className="mb-4">
|
||||||
The <strong>Virtualization Settings</strong> category focuses on optimizing your
|
The <strong>Virtualization Settings</strong> category focuses on optimizing your Proxmox VE installation for
|
||||||
Proxmox VE installation for enhanced virtualization performance, compatibility, and functionality. These settings
|
enhanced virtualization performance, compatibility, and functionality. These settings are crucial for creating a
|
||||||
are crucial for creating a robust and efficient virtualization environment.
|
robust and efficient virtualization environment.
|
||||||
</p>
|
</p>
|
||||||
<h2 className="text-2xl font-semibold mt-8 mb-4">Available Optimizations</h2>
|
<h2 className="text-2xl font-semibold mt-8 mb-4">Available Optimizations</h2>
|
||||||
|
|
||||||
<section className="mb-8">
|
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
|
||||||
<h3 className="text-xl font-semibold mb-2">Enable VFIO IOMMU Support</h3>
|
<StepNumber number={1} />
|
||||||
<p className="mb-4">
|
Enable VFIO IOMMU Support
|
||||||
This optimization enables IOMMU (Input-Output Memory Management Unit) and configures VFIO (Virtual Function I/O) for PCI passthrough, allowing direct assignment of PCI devices to virtual machines.
|
</h3>
|
||||||
</p>
|
<p className="mb-4">
|
||||||
<p className="mb-4">
|
This optimization enables IOMMU (Input-Output Memory Management Unit) and configures VFIO (Virtual Function I/O)
|
||||||
<strong>Why it's important:</strong> IOMMU and VFIO support enables near-native performance for PCI devices (like GPUs or network cards) in virtual machines. This is crucial for high-performance virtualization scenarios, such as GPU-accelerated workloads or network-intensive applications. It allows VMs to directly access hardware, bypassing the hypervisor, which significantly improves performance and reduces latency.
|
for PCI passthrough, allowing direct assignment of PCI devices to virtual machines.
|
||||||
</p>
|
</p>
|
||||||
<h4 className="text-lg font-semibold mb-2">To apply this setting manually, run:</h4>
|
<p className="mb-4">
|
||||||
<CopyableCode code={`# For Intel CPUs
|
<strong>Why it's beneficial:</strong> IOMMU and VFIO support enables near-native performance for PCI devices
|
||||||
|
(like GPUs or network cards) in virtual machines. This is crucial for high-performance virtualization scenarios,
|
||||||
|
such as GPU-accelerated workloads or network-intensive applications. It allows VMs to directly access hardware,
|
||||||
|
bypassing the hypervisor, which significantly improves performance and reduces latency.
|
||||||
|
</p>
|
||||||
|
<p className="text-lg font-semibold mb-2">This adjustment automates the following commands:</p>
|
||||||
|
<CopyableCode
|
||||||
|
code={`
|
||||||
|
# For Intel CPUs
|
||||||
echo "intel_iommu=on" | sudo tee -a /etc/default/grub
|
echo "intel_iommu=on" | sudo tee -a /etc/default/grub
|
||||||
# For AMD CPUs
|
# For AMD CPUs
|
||||||
echo "amd_iommu=on" | sudo tee -a /etc/default/grub
|
echo "amd_iommu=on" | sudo tee -a /etc/default/grub
|
||||||
@ -61,84 +77,121 @@ echo "amd_iommu=on" | sudo tee -a /etc/default/grub
|
|||||||
echo "vfio vfio_iommu_type1 vfio_pci vfio_virqfd" | sudo tee -a /etc/modules
|
echo "vfio vfio_iommu_type1 vfio_pci vfio_virqfd" | sudo tee -a /etc/modules
|
||||||
|
|
||||||
sudo update-grub
|
sudo update-grub
|
||||||
sudo update-initramfs -u -k all`} />
|
sudo update-initramfs -u -k all
|
||||||
</section>
|
`}
|
||||||
|
/>
|
||||||
|
|
||||||
<section className="mb-8">
|
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
|
||||||
<h3 className="text-xl font-semibold mb-2">Install Relevant Guest Agent</h3>
|
<StepNumber number={2} />
|
||||||
<p className="mb-4">
|
Install Relevant Guest Agent
|
||||||
This optimization detects the virtualization environment and installs the appropriate guest agent for improved integration between the host and guest systems.
|
</h3>
|
||||||
</p>
|
<p className="mb-4">
|
||||||
<p className="mb-4">
|
This optimization detects the virtualization environment and installs the appropriate guest agent for improved
|
||||||
<strong>Why it's important:</strong> Guest agents improve communication and integration between the host and guest systems. They enable features like graceful shutdown of virtual machines, file sharing between host and guest, better performance monitoring, and enhanced resource allocation. This leads to more efficient management of VMs and improved overall system performance.
|
integration between the host and guest systems.
|
||||||
</p>
|
</p>
|
||||||
<h4 className="text-lg font-semibold mb-2">To apply this setting manually, run:</h4>
|
<p className="mb-4">
|
||||||
<CopyableCode code={`# For QEMU/KVM VMs
|
<strong>Why it's beneficial:</strong> Guest agents improve communication and integration between the host and
|
||||||
|
guest systems. They enable features like graceful shutdown of virtual machines, file sharing between host and
|
||||||
|
guest, better performance monitoring, and enhanced resource allocation. This leads to more efficient management
|
||||||
|
of VMs and improved overall system performance.
|
||||||
|
</p>
|
||||||
|
<p className="text-lg mb-2">This adjustment automates the following commands:</p>
|
||||||
|
<CopyableCode
|
||||||
|
code={`
|
||||||
|
# For QEMU/KVM VMs
|
||||||
sudo apt-get install -y qemu-guest-agent
|
sudo apt-get install -y qemu-guest-agent
|
||||||
|
|
||||||
# For VMware VMs
|
# For VMware VMs
|
||||||
sudo apt-get install -y open-vm-tools
|
sudo apt-get install -y open-vm-tools
|
||||||
|
|
||||||
# For VirtualBox VMs
|
# For VirtualBox VMs
|
||||||
sudo apt-get install -y virtualbox-guest-utils`} />
|
sudo apt-get install -y virtualbox-guest-utils
|
||||||
</section>
|
`}
|
||||||
|
/>
|
||||||
|
|
||||||
<section className="mb-8">
|
<h3 className="text-xl font-semibold mt-20 mb-4 flex items-center">
|
||||||
<h3 className="text-xl font-semibold mb-2">Configure KSM (Kernel Samepage Merging)</h3>
|
<StepNumber number={3} />
|
||||||
<p className="mb-4">
|
Configure KSM (Kernel Samepage Merging)
|
||||||
This optimization installs and configures the KSM control daemon, which helps optimize memory usage in virtualized environments by sharing identical memory pages between multiple virtual machines.
|
</h3>
|
||||||
</p>
|
<p className="mb-4">
|
||||||
<p className="mb-4">
|
This optimization installs and configures the KSM control daemon, which helps optimize memory usage in
|
||||||
<strong>Why it's important:</strong> KSM can significantly reduce memory usage in environments with many similar VMs, allowing for higher VM density on a single host. This is particularly beneficial for scenarios where many VMs run similar operating systems or applications. By reducing overall memory usage, KSM can improve system performance and allow for more efficient resource utilization.
|
virtualized environments by sharing identical memory pages between multiple virtual machines.
|
||||||
</p>
|
</p>
|
||||||
<h4 className="text-lg font-semibold mb-2">To apply this setting manually, run:</h4>
|
<p className="mb-4">
|
||||||
<CopyableCode code={`sudo apt-get install -y ksm-control-daemon
|
<strong>Why it's beneficial:</strong> KSM can significantly reduce memory usage in environments with many
|
||||||
|
similar VMs, allowing for higher VM density on a single host. This is particularly beneficial for scenarios
|
||||||
|
where many VMs run similar operating systems or applications. By reducing overall memory usage, KSM can improve
|
||||||
|
system performance and allow for more efficient resource utilization.
|
||||||
|
</p>
|
||||||
|
<p className="text-lg font-semibold mb-2">This adjustment automates the following commands:</p>
|
||||||
|
<CopyableCode
|
||||||
|
code={`
|
||||||
|
sudo apt-get install -y ksm-control-daemon
|
||||||
|
|
||||||
echo "KSM_ENABLED=1" | sudo tee -a /etc/default/ksm
|
echo "KSM_ENABLED=1" | sudo tee -a /etc/default/ksm
|
||||||
echo "KSM_SLEEP_MSEC=100" | sudo tee -a /etc/default/ksm
|
echo "KSM_SLEEP_MSEC=100" | sudo tee -a /etc/default/ksm
|
||||||
|
|
||||||
sudo systemctl enable ksm
|
sudo systemctl enable ksm
|
||||||
sudo systemctl start ksm`} />
|
sudo systemctl start ksm
|
||||||
</section>
|
`}
|
||||||
|
/>
|
||||||
|
|
||||||
<section className="mb-8">
|
<h3 className="text-xl font-semibold mt-20 mb-4 flex items-center">
|
||||||
<h3 className="text-xl font-semibold mb-2">Optimize CPU Governor</h3>
|
<StepNumber number={4} />
|
||||||
<p className="mb-4">
|
Optimize CPU Governor
|
||||||
This setting configures the CPU governor to optimize performance for virtualization workloads.
|
</h3>
|
||||||
</p>
|
<p className="mb-4">
|
||||||
<p className="mb-4">
|
This setting configures the CPU governor to optimize performance for virtualization workloads.
|
||||||
<strong>Why it's important:</strong> The CPU governor controls how the processor scales its frequency based on system load. For virtualization environments, setting the governor to 'performance' ensures that the CPU always runs at its maximum frequency, providing consistent performance for VMs. This is crucial for workloads that require predictable and high CPU performance.
|
</p>
|
||||||
</p>
|
<p className="mb-4">
|
||||||
<h4 className="text-lg font-semibold mb-2">To apply this setting manually, run:</h4>
|
<strong>Why it's beneficial:</strong> The CPU governor controls how the processor scales its frequency based on
|
||||||
<CopyableCode code={`sudo apt-get install -y cpufrequtils
|
system load. For virtualization environments, setting the governor to 'performance' ensures that the CPU always
|
||||||
|
runs at its maximum frequency, providing consistent performance for VMs. This is crucial for workloads that
|
||||||
|
require predictable and high CPU performance.
|
||||||
|
</p>
|
||||||
|
<p className="text-lg mb-2">This adjustment automates the following commands:</p>
|
||||||
|
<CopyableCode
|
||||||
|
code={`
|
||||||
|
sudo apt-get install -y cpufrequtils
|
||||||
echo 'GOVERNOR="performance"' | sudo tee /etc/default/cpufrequtils
|
echo 'GOVERNOR="performance"' | sudo tee /etc/default/cpufrequtils
|
||||||
sudo systemctl restart cpufrequtils`} />
|
sudo systemctl restart cpufrequtils
|
||||||
</section>
|
`}
|
||||||
|
/>
|
||||||
|
|
||||||
<section className="mb-8">
|
<h3 className="text-xl font-semibold mt-20 mb-4 flex items-center">
|
||||||
<h3 className="text-xl font-semibold mb-2">Enable Huge Pages Support</h3>
|
<StepNumber number={5} />
|
||||||
<p className="mb-4">
|
Enable Huge Pages Support
|
||||||
This optimization enables and configures huge pages support, which can improve memory management efficiency for large-memory VMs.
|
</h3>
|
||||||
</p>
|
<p className="mb-4">
|
||||||
<p className="mb-4">
|
This optimization enables and configures huge pages support, which can improve memory management efficiency for
|
||||||
<strong>Why it's important:</strong> Huge pages reduce the overhead of Translation Lookaside Buffer (TLB) lookups, which can significantly improve performance for memory-intensive applications running in VMs. This is particularly beneficial for databases, in-memory caches, and other applications that manage large amounts of memory.
|
large-memory VMs.
|
||||||
</p>
|
</p>
|
||||||
<h4 className="text-lg font-semibold mb-2">To apply this setting manually, run:</h4>
|
<p className="mb-4">
|
||||||
<CopyableCode code={`echo "vm.nr_hugepages = 1024" | sudo tee -a /etc/sysctl.conf
|
<strong>Why it's beneficial:</strong> Huge pages reduce the overhead of Translation Lookaside Buffer (TLB)
|
||||||
|
lookups, which can significantly improve performance for memory-intensive applications running in VMs. This is
|
||||||
|
particularly beneficial for databases, in-memory caches, and other applications that manage large amounts of
|
||||||
|
memory.
|
||||||
|
</p>
|
||||||
|
<p className="text-lg font-semibold mb-2">This adjustment automates the following commands:</p>
|
||||||
|
<CopyableCode
|
||||||
|
code={`
|
||||||
|
echo "vm.nr_hugepages = 1024" | sudo tee -a /etc/sysctl.conf
|
||||||
sudo sysctl -p
|
sudo sysctl -p
|
||||||
|
|
||||||
echo "hugetlbfs /dev/hugepages hugetlbfs defaults 0 0" | sudo tee -a /etc/fstab
|
echo "hugetlbfs /dev/hugepages hugetlbfs defaults 0 0" | sudo tee -a /etc/fstab
|
||||||
sudo mount -a`} />
|
sudo mount -a
|
||||||
</section>
|
`}
|
||||||
|
/>
|
||||||
|
|
||||||
<section className="mt-12 p-4 bg-blue-100 rounded-md">
|
<section className="mt-12 p-4 bg-blue-100 rounded-md">
|
||||||
<h2 className="text-xl font-semibold mb-2">Automatic Application</h2>
|
<h2 className="text-xl font-semibold mb-2">Automatic Application</h2>
|
||||||
<p>
|
<p>
|
||||||
All of these optimizations are automatically applied when selected in the Virtualization section. This automation ensures that these beneficial settings are applied
|
All of these optimizations are automatically applied when selected in the Virtualization section. This
|
||||||
consistently and correctly, saving time and reducing the potential for human error during manual
|
automation ensures that these beneficial settings are applied consistently and correctly, saving time and
|
||||||
configuration.
|
reducing the potential for human error during manual configuration.
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user