This commit is contained in:
MacRimi 2025-03-01 21:37:43 +01:00
parent 1583434cfe
commit f806c0f8a3
2 changed files with 168 additions and 88 deletions

View File

@ -106,42 +106,110 @@ sudo apt-get install -y zfsutils-linux proxmox-backup-restore-image chrony
<h2 className="text-2xl font-semibold mt-8 mb-4">Available Optimizations</h2>
<Steps>
<Steps.Step title="Install Common System Utilities">
<p>This optimization installs a set of common system utilities that are useful for system administration and troubleshooting.</p>
<p className="mt-2"><strong>Why it's beneficial:</strong> Having these utilities pre-installed saves time when managing your Proxmox VE system. They provide essential tools for monitoring system performance, managing files, and troubleshooting issues, enhancing your ability to maintain and optimize your virtualization environment.</p>
<h4 className="text-lg font-semibold mt-4 mb-2">To apply this optimization manually, run these commands:</h4>
<CopyableCode code={installUtilitiesCode} />
</Steps.Step>
<Steps.Step title="Skip Downloading Additional Languages">
<p>This optimization configures APT to skip downloading additional language packages, which can save disk space and speed up package operations.</p>
<p className="mt-2"><strong>Why it's beneficial:</strong> By skipping unnecessary language packages, you can reduce disk usage and improve the speed of package management operations. This is particularly useful in server environments where multiple language support is often not required.</p>
<h4 className="text-lg font-semibold mt-4 mb-2">To apply this optimization manually, run this command:</h4>
<CopyableCode code={skipLanguagesCode} />
</Steps.Step>
<Steps.Step title="Synchronize Time Automatically">
<p>This optimization configures the system to automatically synchronize its time, ensuring accurate timekeeping.</p>
<p className="mt-2"><strong>Why it's beneficial:</strong> Accurate timekeeping is crucial for many system operations, log consistency, and proper functioning of time-sensitive applications. Automatic synchronization ensures your Proxmox VE system maintains the correct time without manual intervention.</p>
<h4 className="text-lg font-semibold mt-4 mb-2">To apply this optimization manually, run these commands:</h4>
<CopyableCode code={timeSyncCode} />
</Steps.Step>
<Steps.Step title="Update and Upgrade System">
<p>This optimization updates the system's package lists, upgrades installed packages, and configures Proxmox repositories.</p>
<p className="mt-2"><strong>Why it's beneficial:</strong> Keeping your system up-to-date is essential for security, stability, and 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.</p>
<p className="mt-2">The additional steps help in:</p>
<ul className="list-disc pl-6 space-y-1 mt-2">
<li>Disabling enterprise repositories to avoid conflicts</li>
<li>Enabling free and testing repositories for broader package access</li>
<li>Properly configuring Debian repositories for a stable system</li>
<li>Suppressing non-free firmware warnings for a cleaner update experience</li>
</ul>
<h4 className="text-lg font-semibold mt-4 mb-2">To apply this optimization manually, run these commands:</h4>
<CopyableCode code={updateUpgradeCode} />
</Steps.Step>
<Steps.Step title="Install Common System Utilities" />
<Steps.Step title="Skip Downloading Additional Languages" />
<Steps.Step title="Synchronize Time Automatically" />
<Steps.Step title="Update and Upgrade System" />
</Steps>
<section className="mb-8 mt-8">
<h3 className="text-xl font-semibold mb-2">Install Common System Utilities</h3>
<p className="mb-4">
This optimization installs a set of common system utilities that are useful for system administration and
troubleshooting.
</p>
<p className="mb-4">
<strong>Why it's beneficial:</strong> Having these utilities pre-installed saves time when managing your
Proxmox VE system. They provide essential tools for monitoring system performance, managing files, and
troubleshooting issues, enhancing your ability to maintain and optimize your virtualization environment.
</p>
<h4 className="text-lg font-semibold mb-2">Utilities installed:</h4>
<ul className="list-disc pl-5 mb-4">
<li><strong>axel</strong>: A light command-line download accelerator</li>
<li><strong>curl</strong>: A tool for transferring data using various protocols</li>
<li><strong>dialog</strong>: A tool for creating TUI interfaces</li>
<li><strong>dnsutils</strong>: DNS utilities including dig and nslookup</li>
<li><strong>dos2unix</strong>: Text file format converter</li>
<li><strong>gnupg-agent</strong>: GNU privacy guard - password agent</li>
<li><strong>grc</strong>: Generic colouriser for everything</li>
<li><strong>htop</strong>: An interactive process viewer</li>
<li><strong>btop</strong>: A resource monitor that shows usage and stats for processor, memory, disks, network and processes</li>
<li><strong>iftop</strong>: A tool to display bandwidth usage on an interface</li>
<li><strong>iotop</strong>: A tool to display I/O usage by processes</li>
<li><strong>iperf3</strong>: A tool for active measurements of the maximum achievable bandwidth on IP networks</li>
<li><strong>ipset</strong>: A tool to manage IP sets in the Linux kernel</li>
<li><strong>iptraf-ng</strong>: An interactive colorful IP LAN monitor</li>
<li><strong>mlocate</strong>: A tool to find files by name quickly</li>
<li><strong>msr-tools</strong>: Tools for accessing CPU model-specific registers</li>
<li><strong>nano</strong>: A small, friendly text editor</li>
<li><strong>net-tools</strong>: A collection of programs that form the base set of the NET-3 networking distribution for the Linux operating system</li>
<li><strong>omping</strong>: An open multicast ping tool</li>
<li><strong>software-properties-common</strong>: Provides an abstraction of the used apt repositories</li>
<li><strong>sshpass</strong>: A tool for non-interactive ssh password authentication</li>
<li><strong>tmux</strong>: A terminal multiplexer</li>
<li><strong>unzip</strong>: A tool for extracting and viewing files in .zip archives</li>
<li><strong>vim</strong> and <strong>vim-nox</strong>: A highly configurable text editor</li>
<li><strong>wget</strong>: A utility for non-interactive download of files from the Web</li>
<li><strong>whois</strong>: A client for the whois directory service</li>
<li><strong>zip</strong>: A compression and file packaging utility</li>
<li><strong>libguestfs-tools</strong>: A set of tools for accessing and modifying virtual machine disk images</li>
</ul>
<h4 className="text-lg font-semibold mb-2">To apply this optimization manually, run these commands:</h4>
<CopyableCode code={installUtilitiesCode} />
</section>
<section className="mb-8">
<h3 className="text-xl font-semibold mb-2">Skip Downloading Additional Languages</h3>
<p className="mb-4">
This optimization configures APT to skip downloading additional language packages, which can save disk space
and speed up package operations.
</p>
<p className="mb-4">
<strong>Why it's beneficial:</strong> By skipping unnecessary language packages, you can reduce disk usage and
improve the speed of package management operations. This is particularly useful in server environments where
multiple language support is often not required.
</p>
<h4 className="text-lg font-semibold mb-2">To apply this optimization manually, run this command:</h4>
<CopyableCode code={skipLanguagesCode} />
</section>
<section className="mb-8">
<h3 className="text-xl font-semibold mb-2">Synchronize Time Automatically</h3>
<p className="mb-4">
This optimization configures the system to automatically synchronize its time, ensuring accurate timekeeping.
</p>
<p className="mb-4">
<strong>Why it's beneficial:</strong> Accurate timekeeping is crucial for many system operations, log
consistency, and proper functioning of time-sensitive applications. Automatic synchronization ensures your
Proxmox VE system maintains the correct time without manual intervention.
</p>
<h4 className="text-lg font-semibold mb-2">To apply this optimization manually, run these commands:</h4>
<CopyableCode code={timeSyncCode} />
</section>
<section className="mb-8">
<h3 className="text-xl font-semibold mb-2">Update and Upgrade System</h3>
<p className="mb-4">
This optimization updates the system's package lists, upgrades installed packages, and configures Proxmox
repositories. It also includes additional steps to properly set up Debian repositories and disable certain
warnings.
</p>
<p className="mb-4">
<strong>Why it's beneficial:</strong> Keeping your system up-to-date is essential for security, stability, and
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. The additional steps help
in:
</p>
<ul className="list-disc pl-5 mb-4">
<li>Disabling enterprise repositories to avoid conflicts</li>
<li>Enabling free and testing repositories for broader package access</li>
<li>Properly configuring Debian repositories for a stable system</li>
<li>Suppressing non-free firmware warnings for a cleaner update experience</li>
</ul>
<h4 className="text-lg font-semibold mb-2">To apply this optimization manually, run these commands:</h4>
<CopyableCode code={updateUpgradeCode} />
</section>
<section className="mt-12 p-4 bg-blue-100 rounded-md">
<h2 className="text-xl font-semibold mb-2">Automatic Application</h2>
<p>

View File

@ -46,70 +46,82 @@ export default function SystemSettingsPage() {
<h2 className="text-2xl font-semibold mt-8 mb-4">Available Optimizations</h2>
<Steps>
<Steps.Step title="Enable Fast Reboots">
<p>
This optimization enables <code>kexec</code>, a mechanism that allows the system to boot directly into a new kernel from an existing running kernel, bypassing the BIOS/firmware and bootloader stages.
</p>
<p className="mt-2">
<strong>Why it's important:</strong> Fast reboots significantly reduce system downtime during maintenance or 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.
</p>
<h4 className="text-lg font-semibold mt-4 mb-2">To apply this setting manually, run:</h4>
<CopyableCode code={`sudo apt-get install -y kexec-tools
<Steps.Step title="Enable Fast Reboots" />
<Steps.Step title="Configure Kernel Panic Behavior" />
<Steps.Step title="Increase System Limits" />
<Steps.Step title="Optimize Journald" />
<Steps.Step title="Optimize Memory Management" />
</Steps>
<section className="mb-8 mt-8">
<h3 className="text-xl font-semibold mb-2">Enable Fast Reboots</h3>
<p className="mb-4">
This optimization enables <code>kexec</code>, a mechanism that allows the system to boot directly into a new kernel from an existing running kernel, bypassing the BIOS/firmware and bootloader stages.
</p>
<p className="mb-4">
<strong>Why it's important:</strong> Fast reboots significantly reduce system downtime during maintenance or 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.
</p>
<h4 className="text-lg font-semibold mb-2">To apply this setting manually, run:</h4>
<CopyableCode code={`sudo apt-get install -y kexec-tools
sudo systemctl enable kexec-pve.service
echo "alias reboot-quick='systemctl kexec'" >> ~/.bash_profile`} />
</Steps.Step>
</section>
<Steps.Step title="Configure Kernel Panic Behavior">
<p>
This setting configures the system to automatically reboot after a kernel panic occurs, rather than hanging indefinitely.
</p>
<p className="mt-2">
<strong>Why it's important:</strong> Automatic reboots after kernel panics help maintain system availability. Instead of requiring manual intervention, which could lead to extended downtime, the system attempts to recover on its own. This is particularly crucial in remote or lights-out data center environments where immediate physical access might not be possible.
</p>
<h4 className="text-lg font-semibold mt-4 mb-2">To apply this setting manually, run:</h4>
<CopyableCode code={`echo "kernel.panic = 10" | sudo tee /etc/sysctl.d/99-kernelpanic.conf
<section className="mb-8">
<h3 className="text-xl font-semibold mb-2">Configure Kernel Panic Behavior</h3>
<p className="mb-4">
This setting configures the system to automatically reboot after a kernel panic occurs, rather than hanging indefinitely.
</p>
<p className="mb-4">
<strong>Why it's important:</strong> Automatic reboots after kernel panics help maintain system availability. Instead of requiring manual intervention, which could lead to extended downtime, the system attempts to recover on its own. This is particularly crucial in remote or lights-out data center environments where immediate physical access might not be possible.
</p>
<h4 className="text-lg font-semibold mb-2">To apply this setting manually, run:</h4>
<CopyableCode code={`echo "kernel.panic = 10" | sudo tee /etc/sysctl.d/99-kernelpanic.conf
echo "kernel.panic_on_oops = 1" | sudo tee -a /etc/sysctl.d/99-kernelpanic.conf
sudo sysctl -p /etc/sysctl.d/99-kernelpanic.conf`} />
</Steps.Step>
<Steps.Step title="Increase System Limits">
<p>
This optimization increases various system limits, including the maximum number of file watches and open file descriptors.
</p>
<p className="mt-2">
<strong>Why it's important:</strong> Higher system limits allow for better resource utilization, especially in high-density virtualization environments. Increased file watch limits improve performance for applications that monitor many files (like backup systems or development environments). Higher open file limits allow more concurrent connections and file operations, which is crucial for busy servers hosting multiple VMs or containers.
</p>
<h4 className="text-lg font-semibold mt-4 mb-2">To apply this setting manually, run:</h4>
<CopyableCode code={`echo "fs.inotify.max_user_watches = 1048576" | sudo tee /etc/sysctl.d/99-maxwatches.conf
</section>
<section className="mb-8">
<h3 className="text-xl font-semibold mb-2">Increase System Limits</h3>
<p className="mb-4">
This optimization increases various system limits, including the maximum number of file watches and open file descriptors.
</p>
<p className="mb-4">
<strong>Why it's important:</strong> Higher system limits allow for better resource utilization, especially in high-density virtualization environments. Increased file watch limits improve performance for applications that monitor many files (like backup systems or development environments). Higher open file limits allow more concurrent connections and file operations, which is crucial for busy servers hosting multiple VMs or containers.
</p>
<h4 className="text-lg font-semibold mb-2">To apply this setting manually, run:</h4>
<CopyableCode code={`echo "fs.inotify.max_user_watches = 1048576" | sudo tee /etc/sysctl.d/99-maxwatches.conf
echo "* soft nofile 1048576" | sudo tee /etc/security/limits.d/99-limits.conf
sudo sysctl -p`} />
</Steps.Step>
<Steps.Step title="Optimize Journald">
<p>
This setting configures systemd's journald logging service to limit its disk usage and optimize performance.
</p>
<p className="mt-2">
<strong>Why it's important:</strong> Proper log management is crucial for system health and troubleshooting. By limiting the maximum size of the journal, you prevent logs from consuming excessive disk space, which could potentially fill up the system partition. This is especially important in virtualization environments where disk space is often at a premium. Additionally, optimized logging reduces I/O operations, potentially improving overall system performance.
</p>
<h4 className="text-lg font-semibold mt-4 mb-2">To apply this setting manually, run:</h4>
<CopyableCode code={`echo "SystemMaxUse=64M" | sudo tee -a /etc/systemd/journald.conf
</section>
<section className="mb-8">
<h3 className="text-xl font-semibold mb-2">Optimize Journald</h3>
<p className="mb-4">
This setting configures systemd's journald logging service to limit its disk usage and optimize performance.
</p>
<p className="mb-4">
<strong>Why it's important:</strong> Proper log management is crucial for system health and troubleshooting. By limiting the maximum size of the journal, you prevent logs from consuming excessive disk space, which could potentially fill up the system partition. This is especially important in virtualization environments where disk space is often at a premium. Additionally, optimized logging reduces I/O operations, potentially improving overall system performance.
</p>
<h4 className="text-lg font-semibold mb-2">To apply this setting manually, run:</h4>
<CopyableCode code={`echo "SystemMaxUse=64M" | sudo tee -a /etc/systemd/journald.conf
sudo systemctl restart systemd-journald`} />
</Steps.Step>
<Steps.Step title="Optimize Memory Management">
<p>
This optimization adjusts various memory-related kernel parameters to improve system performance and stability.
</p>
<p className="mt-2">
<strong>Why it's important:</strong> Proper memory management is critical in virtualization environments where multiple VMs compete for resources. These optimizations can help prevent out-of-memory situations, improve memory allocation efficiency, and enhance overall system responsiveness. This is particularly beneficial for hosts running memory-intensive workloads or a high number of VMs.
</p>
<h4 className="text-lg font-semibold mt-4 mb-2">To apply this setting manually, run:</h4>
<CopyableCode code={`echo "vm.swappiness = 10" | sudo tee /etc/sysctl.d/99-memory.conf
</section>
<section className="mb-8">
<h3 className="text-xl font-semibold mb-2">Optimize Memory Management</h3>
<p className="mb-4">
This optimization adjusts various memory-related kernel parameters to improve system performance and stability.
</p>
<p className="mb-4">
<strong>Why it's important:</strong> Proper memory management is critical in virtualization environments where multiple VMs compete for resources. These optimizations can help prevent out-of-memory situations, improve memory allocation efficiency, and enhance overall system responsiveness. This is particularly beneficial for hosts running memory-intensive workloads or a high number of VMs.
</p>
<h4 className="text-lg font-semibold mb-2">To apply this setting manually, run:</h4>
<CopyableCode code={`echo "vm.swappiness = 10" |
sudo tee /etc/sysctl.d/99-memory.conf
echo "vm.vfs_cache_pressure = 50" | sudo tee -a /etc/sysctl.d/99-memory.conf
sudo sysctl -p /etc/sysctl.d/99-memory.conf`} />
</Steps.Step>
</Steps>
</section>
<section className="mt-12 p-4 bg-blue-100 rounded-md">
<h2 className="text-xl font-semibold mb-2">Automatic Application</h2>