<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.manjaro.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Megavolt</id>
	<title>Manjaro - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.manjaro.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Megavolt"/>
	<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php/Special:Contributions/Megavolt"/>
	<updated>2026-04-04T04:25:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Main_Page/de&amp;diff=54189</id>
		<title>Main Page/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Main_Page/de&amp;diff=54189"/>
		<updated>2025-02-15T14:42:05Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Manjaro Logo--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center style=&amp;quot;background-color:#455A64; border-radius:5px; box-shadow:0 3px 6px rgba(0,0,0,0.04),0 3px 6px rgba(0,0,0,0.0575);&amp;quot;&amp;gt;[[File:Block-logo.png|center|100px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;languages/&amp;gt;&lt;br /&gt;
==Erste Schritte==&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-grid&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;home-overview&amp;quot; class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Übersicht&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Manjaro|Überblick über Manjaro]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Verschiedene Artikel, um all deine Fragen zu beantworten.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Using Manjaro for Beginners|Manjaro benutzen]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Neu bei Manjaro? Starte hier für eine Einführung!&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Using Manjaro for Windows users|Ich komme von Windows]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Klicke hier, wenn Du ein Windows Benutzer bist, der Linux oder Manjaro ausprobiert!&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;home-support&amp;quot; class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Online und Unterstützung&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Manjaro Online|Manjaro Online]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Unser Forum, Twitter, Reddit, und Facebook-Konten.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt; [https://manjaro.org/enterprise Unterstützung für Unternehmen]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt; Kontaktiere uns bezüglich verschiedener Unterstützungsdienstleistungen für Dein Geschäft.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt; [https://gitlab.manjaro.org Quellcode]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt; Softwarequellen und Entwicklung.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;home-getman&amp;quot; class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Manjaro holen&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Download Manjaro|Manjaro herunterladen]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Wo das neueste und beste Manjaro Release zu finden ist.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Check a Downloaded ISO Image For Errors|Ein heruntergeladenes ISO-Image auf Fehler überprüfen]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Überprüfe dein heruntergeladenes Manjaro auf Fehler in Linux und Windows.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Burn an ISO File|Eine ISO Datei brennen]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Brenne Manjaro auf eine CD/DVD oder auf einen USB-Stick in Linux oder Windows.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Installation Guides|Manjaro Installieren]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Installations- und Partitionierung-Anleitungen für Anfänger und erfahrene Benutzer.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
==Anpassung und Konfiguration==&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-grid&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Hochfahren / Startvorgang&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/BIOS and UEFI|BIOS und UEFI]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Wie man die Virtualisierung aktiviert, Manjaro auf Systemen mit Windows 10 laufen lässt und mehr!&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Display Managers / Login Screens|Display Managers / Login Screens]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Installieren oder konfigurieren von MDM, GDM, SDDM, LXDM, and SLiM und wie man dieses umgeht.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Fstab - Use SystemD automount|Fstab - Use SystemD automount]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;SystemD und /etc/fstab Optionen für die Geräte-Einbindung.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Make GRUB menu &amp;amp; boot-up/down fonts bigger|Größere Schrift für GRUB, das Hochfahren, und das Herunterfahren]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Wie man die Schriftgröße beim Hochfahren, Herunterfahren und in GRUB erhöht.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt; &amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Plymouth|Plymouth boot splash]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt; &amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;Configure or remove plymouth boot splash.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;DEs / WMs&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Basic Tips for conky|Conky - Basic Tips]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Conky kann eine Menge nützlicher Informationen auf dem Schreibtisch anzeigen.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Desktop Environments|Desktop Environments and Window Managers]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Installiere populäre Desktops und übernehme eine ganze Reihe von spezifischen Konfigurationen.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Set all Qt app's to use GTK+ font &amp;amp; theme settings|Stelle alle QT-Apps so ein, sodass diese GTK+ Schriften und Themen-Enstellungen verwenden.]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Stelle sicher, dass QT-Apps zu den GTK+ Themen der Desktop-Umgebung/Fenster-Manager passen.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Set all Java apps to use GTK+ font &amp;amp; theme settings|Stelle alle Java-Apps so ein, sodass diese GTK+ Schriften und Themen-Einstellungen verwenden.]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Stelle sicher, dass Java-Apps zu den GTK+ Themen der Desktop-Umgebung/Fenster-Manager passen.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Software Verwaltung&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Repositories and Servers|Repositorien und Server]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Repositorien wechseln, die schnellsten Spiegelserver finden usw.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Pacman|Pacman]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Anleitung zur Verwendung des '''Pac'''kage '''Man'''agers und mehr.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Graphical Software Managers|Grafische Software-Manager]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Es gibt eine Reihe benutzerfreundlicher Software-Manager.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Arch User Repository|Arch User Repository]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Erfahren und verwenden Sie das AUR.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Flatpak|Flatpak]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Erweitern Sie Ihre Softwarebibliothek mit Flatpaks&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Snap|Snap]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Snaps auf Manjaro installieren und verwalten&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Software Applications|Programme]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Eine Sammlung von Tipps und Konfigurationen für viele Anwendungen.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Hardware / MSM&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Manjaro Settings Manager|Manjaro Settings Manager]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;MSM kann Sprache, Benutzerkonto, Kernel, Uhrzeit und Datum, Grafikkartentreiber und mehr einstellen.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Manjaro Hardware Detection|Manjaro Hardware Detection]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Kernel und Treiber.(mhwd)&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Configure Graphics Cards|Grafikkarte konfigurieren]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;View, install, remove, or reinstall GPU drivers and much more.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Power Management|Power Management]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Stromsparen und Schlafzustand konfigurieren&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Printing|Drucken]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Drucken aktivieren und Drucker hinzufügen.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Wacom Tablet And Pen|Wacom Tablet und Stift]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Tablets und Stifte konfigurieren.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Manjaro-ARM|Manjaro-ARM]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Tipps speziell für ARM-Systeme&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Netzwerk / Internet&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Internet Browsers|Internet Browser]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Sicherheit, Anpassung und Konfiguration.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Firewalls and Security|Firewalls und Sicherheit]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Firewalls und Sicherheit in Manjaro&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Sync dynamic IP with openDNS service via ddclient|Dynamische IP mit openDNS-Dienst]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Lösung zum Aktualisieren der dynamischen IP für den OpenDNS-Dienst.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Keyboard and Mouse Sharing|Keyboard und Maus Teilen]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Benutze Maus und Tastatur für mehrere Computer und Betriebssysteme.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Networking|Netzwerke]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Verwaltung von Netzwerken&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Samba in Ihrem Dateimanager verwenden|Samba im Dateimanager verwenden]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;So richten Sie eine Samba-Freigabe in Ihrem Netzwerk ein.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Sharing files with Python|Sharing files with Python]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;Using Python's built-in network capabilities to share files.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Using autofs (automount) with NFS|Using autofs (automount) with NFS]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;One of the many ways to mount shares.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;System / Sonstige&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Manjaro Polkit Rules|Manjaro Polkit-Regeln]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Die von Manjaro implementierten Policykit-Regeln&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Add a Storage Partition &amp;amp; Modify your System to Suit|Speicherpartition hinzufügen und einrichten]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Wie man eine Partition verkleinert und hinzufügt so dass Manjaro weiß, wo und was sie ist.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Aliases in .bashrc|Aliase in der .bashrc]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Verknüpfungen für Ihr Terminal.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Developer Tools|Entwicklungswerkzeuge]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Werkzeugsatz, der von Manjaro-Entwicklern und fortgeschrittenen Benutzern verwendet wird.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[File Systems|Dateisysteme]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Informationen zu verschiedenen Dateisystemen, wie sie funktionieren und wie man sie verwendet.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Swap|Auslagerungsspeicher verwalten]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Alles über den Auslagerungsspeicher&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Limit the size of .log files &amp;amp; the journal|Systemd Journal &amp;amp; Logdateien]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Verwalte das Journal von Systemd, die /var/log/*log-Dateien von syslog-ng, und begrenze deren Größe.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Linux Security|Linux Sicherheit]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Informationen zu root- und Superuser-Passwörtern.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[How to mount Windows (NTFS) filesystem due to hibernation|Windows NTFS mounten trotz Ruhezustand (hibernation)]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Lösungen &amp;amp; Workarounds für verschiedene Windows-Versionen.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Keyboard_Shortcuts|Eigene Tastaturkürzel]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Benutzerdefinierte Tastaturbelegung festlegen.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Viewing and editing configuration files|Konfigurationsdateien anzeigen und bearbeiten]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Wie man Dateien in jeder Manjaro-Edition anzeigt und bearbeitet.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fehlerbehebung==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-grid&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Hochfahren / Startvorgang&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Restore the GRUB Bootloader|GRUB wiederherstellen]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Manjaro bootet nicht? Vielleicht ist es besser zu reparieren als neu zu installieren!&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Preserve Manjaro Bootloader|Manjaro Bootloader schützen]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Verhindere, dass Manjaros GRUB überschrieben wird.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Kernel Fails to Load (pata_acpi error)|Kernel lädt nicht / &amp;quot;Unable to Find Device&amp;quot; Error]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Lösung für ein Problem, das bestimmte Computer betrifft, die JMicron-Chips verwenden.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Software Verwaltung&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[pacman troubleshooting|Pacman-Fehlerbehebung]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Fehlerbehebung allgemeiner Probleme im Zusammenhang mit pacman&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt; &amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Downgrading packages|Downgrade Packages]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt; &amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;If required, downgrading packages is possible.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Hardware&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Did X.server recognise your monitor correctly?|Hat X.server Ihren Monitor richtig erkannt?]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Ein kurzer Test im Terminal&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[ALSA|Advanced Linux Sound Architecture (ALSA)]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Fehlerbehebung allgemeiner Probleme im Zusammenhang mit ALSA&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt; &amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Western Digital Green - Drive Fix - Linux|Fix for WD Green Drives]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt; &amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;Western Digital Green drives have a peculiar problem.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Mehr==&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-grid&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[//www.mediawiki.org/wiki/Hilfe:Inhalt Benutzerhandbuch]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Anleitung zum erweitern des Wiki&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Basic Submission Rules|Grundlegende Einreichungsregeln]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Wie man ein Konto erstellt und was man tun oder nicht tun sollte als Wiki-Mitwirkende.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Contributing|Beitragen]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Der Ausgangspunkt für diejenigen, die bereit sind, zum Wiki beizutragen.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[https://wiki.manjaro.org/index.php?title=Category:Contents_Page{{#translation:}} Inhalt]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Für eine Seite mit einer Liste aller Wiki-Leitfäden und -Tutorials in alphabetischer Reihenfolge&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- to early now [[Category:Top level{{#translation:}}]] --&amp;gt;&lt;br /&gt;
[[Category:Top level{{#translation:}}]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Main_Page/de&amp;diff=54188</id>
		<title>Main Page/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Main_Page/de&amp;diff=54188"/>
		<updated>2025-02-15T14:41:44Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Manjaro Logo--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center style=&amp;quot;background-color:#455A64; border-radius:5px; box-shadow:0 3px 6px rgba(0,0,0,0.04),0 3px 6px rgba(0,0,0,0.0575);&amp;quot;&amp;gt;[[File:Block-logo.png|center|100px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;languages/&amp;gt;&lt;br /&gt;
==Erste Schritte==&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-grid&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;home-overview&amp;quot; class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Übersicht&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Manjaro|Überblick über Manjaro]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Verschiedene Artikel, um all deine Fragen zu beantworten.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Using Manjaro for Beginners|Manjaro benutzen]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Neu bei Manjaro? Starte hier für eine Einführung!&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Using Manjaro for Windows users|Ich komme von Windows]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Klicke hier, wenn Du ein Windows Benutzer bist, der Linux oder Manjaro ausprobiert!&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;home-support&amp;quot; class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Online und Unterstützung&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Manjaro Online|Manjaro Online]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Unser Forum, Twitter, Reddit, und Facebook-Konten.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt; [https://manjaro.org/enterprise Unterstützung für Unternehmen]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt; Kontaktiere uns bezüglich verschiedener Unterstützungsdienstleistungen für Dein Geschäft.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt; [https://gitlab.manjaro.org Quellcode]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt; Softwarequellen und Entwicklung.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;home-getman&amp;quot; class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Manjaro holen&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Download Manjaro|Manjaro herunterladen]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Wo das neueste und beste Manjaro Release zu finden ist.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Check a Downloaded ISO Image For Errors|Ein heruntergeladenes ISO-Image auf Fehler überprüfen]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Überprüfe dein heruntergeladenes Manjaro auf Fehler in Linux und Windows.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Burn an ISO File|Eine ISO Datei brennen]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Brenne Manjaro auf eine CD/DVD oder auf einen USB-Stick in Linux oder Windows.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Installation Guides|Manjaro Installieren]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Installations- und Partitionierung-Anleitungen für Anfänger und erfahrene Benutzer.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
==Anpassung und Konfiguration==&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-grid&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Hochfahren / Startvorgang&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/BIOS and UEFI|BIOS und UEFI]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Wie man die Virtualisierung aktiviert, Manjaro auf Systemen mit Windows 10 laufen lässt und mehr!&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Display Managers / Login Screens|Display Managers / Login Screens]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Installieren oder konfigurieren von MDM, GDM, SDDM, LXDM, and SLiM und wie man dieses umgeht.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Fstab - Use SystemD automount|Fstab - Use SystemD automount]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;SystemD und /etc/fstab Optionen für die Geräte-Einbindung.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Make GRUB menu &amp;amp; boot-up/down fonts bigger|Größere Schrift für GRUB, das Hochfahren, und das Herunterfahren]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Wie man die Schriftgröße beim Hochfahren, Herunterfahren und in GRUB erhöht.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt; &amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Plymouth|Plymouth boot splash]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt; &amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;Configure or remove plymouth boot splash.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;DEs / WMs&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Basic Tips for conky|Conky - Basic Tips]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Conky kann eine Menge nützlicher Informationen auf dem Schreibtisch anzeigen.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Desktop Environments|Desktop Environments and Window Managers]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Installiere populäre Desktops und übernehme eine ganze Reihe von spezifischen Konfigurationen.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Set all Qt app's to use GTK+ font &amp;amp; theme settings|Stelle alle QT-Apps so ein, sodass diese GTK+ Schriften und Themen-Enstellungen verwenden.]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Stelle sicher, dass QT-Apps zu den GTK+ Themen der Desktop-Umgebung/Fenster-Manager passen.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[[Special:MyLanguage/Set all Java apps to use GTK+ font &amp;amp; theme settings|Stelle alle Java-Apps so ein, sodass diese GTK+ Schriften und Themen-Einstellungen verwenden.]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Stelle sicher, dass Java-Apps zu den GTK+ Themen der Desktop-Umgebung/Fenster-Manager passen.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Software Verwaltung&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Repositories and Servers|Repositorien und Server]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Repositorien wechseln, die schnellsten Spiegelserver finden usw.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Pacman|Pacman]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Anleitung zur Verwendung des '''Pac'''kage '''Man'''agers und mehr.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Graphical Software Managers|Grafische Software-Manager]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Es gibt eine Reihe benutzerfreundlicher Software-Manager.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Arch User Repository|Arch User Repository]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Erfahren und verwenden Sie das AUR.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Flatpak|Flatpak]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Erweitern Sie Ihre Softwarebibliothek mit Flatpaks&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Snap|Snap]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Snaps auf Manjaro installieren und verwalten&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Software Applications|Programme]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Eine Sammlung von Tipps und Konfigurationen für viele Anwendungen.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Hardware / MSM&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Manjaro Settings Manager|Manjaro Settings Manager]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;MSM kann Sprache, Benutzerkonto, Kernel, Uhrzeit und Datum, Grafikkartentreiber und mehr einstellen.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Manjaro Hardware Detection|Manjaro Hardware Detection]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Kernel und Treiber.(mhwd)&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Configure Graphics Cards|Grafikkarte konfigurieren]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;View, install, remove, or reinstall GPU drivers and much more.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Power Management|Power Management]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Stromsparen und Schlafzustand konfigurieren&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Printing|Drucken]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Drucken aktivieren und Drucker hinzufügen.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Wacom Tablet And Pen|Wacom Tablet und Stift]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Tablets und Stifte konfigurieren.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Manjaro-ARM|Manjaro-ARM]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Tipps speziell für ARM-Systeme&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Netzwerk / Internet&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Internet Browsers|Internet Browser]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Sicherheit, Anpassung und Konfiguration.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Firewalls and Security|Firewalls und Sicherheit]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Firewalls und Sicherheit in Manjaro&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Sync dynamic IP with openDNS service via ddclient|Dynamische IP mit openDNS-Dienst]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Lösung zum Aktualisieren der dynamischen IP für den OpenDNS-Dienst.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Keyboard and Mouse Sharing|Keyboard und Maus Teilen]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Benutze Maus und Tastatur für mehrere Computer und Betriebssysteme.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Networking|Netzwerke]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Verwaltung von Netzwerken&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Samba in Ihrem Dateimanager verwenden|Samba im Dateimanager verwenden]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;So richten Sie eine Samba-Freigabe in Ihrem Netzwerk ein.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Sharing files with Python|Sharing files with Python]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;Using Python's built-in network capabilities to share files.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Using autofs (automount) with NFS|Using autofs (automount) with NFS]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;One of the many ways to mount shares.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;System / Sonstige&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Manjaro Polkit Rules|Manjaro Polkit-Regeln]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Die von Manjaro implementierten Policykit-Regeln&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Add a Storage Partition &amp;amp; Modify your System to Suit|Speicherpartition hinzufügen und einrichten]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Wie man eine Partition verkleinert und hinzufügt so dass Manjaro weiß, wo und was sie ist.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Aliases in .bashrc|Aliase in der .bashrc]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Verknüpfungen für Ihr Terminal.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Developer Tools|Entwicklungswerkzeuge]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Werkzeugsatz, der von Manjaro-Entwicklern und fortgeschrittenen Benutzern verwendet wird.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[File Systems|Dateisysteme]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Informationen zu verschiedenen Dateisystemen, wie sie funktionieren und wie man sie verwendet.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Swap|Auslagerungsspeicher verwalten]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Alles über den Auslagerungsspeicher&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Limit the size of .log files &amp;amp; the journal|Systemd Journal &amp;amp; Logdateien]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Verwalte das Journal von Systemd, die /var/log/*log-Dateien von syslog-ng, und begrenze deren Größe.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Linux Security|Linux Sicherheit]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Informationen zu root- und Superuser-Passwörtern.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[How to mount Windows (NTFS) filesystem due to hibernation|Windows NTFS mounten trotz Ruhezustand (hibernation)]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Lösungen &amp;amp; Workarounds für verschiedene Windows-Versionen.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Keyboard_Shortcuts|Eigene Tastaturkürzel]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Benutzerdefinierte Tastaturbelegung festlegen.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Viewing and editing configuration files|Konfigurationsdateien anzeigen und bearbeiten]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Wie man Dateien in jeder Manjaro-Edition anzeigt und bearbeitet.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fehlerbehebung==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-grid&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Hochfahren / Startvorgang&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Restore the GRUB Bootloader|GRUB wiederherstellen]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Manjaro bootet nicht? Vielleicht ist es besser zu reparieren als neu zu installieren!&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Preserve Manjaro Bootloader|Manjaro Bootloader schützen]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Verhindere, dass Manjaros GRUB überschrieben wird.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Kernel Fails to Load (pata_acpi error)|Kernel lädt nicht / &amp;quot;Unable to Find Device&amp;quot; Error]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Lösung für ein Problem, das bestimmte Computer betrifft, die JMicron-Chips verwenden.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Software Verwaltung&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[pacman troubleshooting|Pacman-Fehlerbehebung]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Fehlerbehebung allgemeiner Probleme im Zusammenhang mit pacman&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt; &amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Downgrading packages|Downgrade Packages]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt; &amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;If required, downgrading packages is possible.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;h3 class=&amp;quot;home-card-header&amp;quot;&amp;gt;Hardware&amp;lt;/h3&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Did X.server recognise your monitor correctly?|Hat X.server Ihren Monitor richtig erkannt?]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Ein kurzer Test im Terminal&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[ALSA|Advanced Linux Sound Architecture (ALSA)]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Fehlerbehebung allgemeiner Probleme im Zusammenhang mit ALSA&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt; &amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;[[Special:MyLanguage/Western Digital Green - Drive Fix - Linux|Fix for WD Green Drives]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt; &amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot; class=&amp;quot;mw-content-ltr&amp;quot;&amp;gt;Western Digital Green drives have a peculiar problem.&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Mehr==&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-grid&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card home-card-col2 home-card-row3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[//www.mediawiki.org/wiki/Hilfe:Inhalt Benutzerhandbuch]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Anleitung zum erweitern des Wiki&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Basic Submission Rules|Grundlegende Einreichungsregeln]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Wie man ein Konto erstellt und was man tun oder nicht tun sollte als Wiki-Mitwirkende.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;[[Contributing|Beitragen]]&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;Der Ausgangspunkt für diejenigen, die bereit sind, zum Wiki beizutragen.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-link-button&amp;quot;&amp;gt;[https://wiki.manjaro.org/index.php?title=Category:Contents_Page{{#translation:}} Inhalt]&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;home-card-label&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;mw-translate-fuzzy&amp;quot;&amp;gt;Für eine Seite mit einer Liste aller Wiki-Leitfäden und -Tutorials in alphabetischer Reihenfolge&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- to early now [[Category:Top level{{#translation:}}]] --&amp;gt;&lt;br /&gt;
[[Category:Top level{{#translation:}}]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=User:Megavolt/bootloaders&amp;diff=36146</id>
		<title>User:Megavolt/bootloaders</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=User:Megavolt/bootloaders&amp;diff=36146"/>
		<updated>2022-09-13T07:42:02Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
In order to load the operating system a boot loader is needed. There is not only one boot loader, but many of them which have its benefits and disadvantages.&lt;br /&gt;
&lt;br /&gt;
It depends on the computer which boot loader can or should be used. In general there are 2 system: UEFI/EFI and BIOS, while UEFI/EFI has commonly also a legacy mode which is fully compatible with a pure BIOS.&lt;br /&gt;
&lt;br /&gt;
=== BIOS/Legacy ===&lt;br /&gt;
* [[grub]]&lt;br /&gt;
*[[syslinux]]&lt;br /&gt;
&lt;br /&gt;
=== EFI ===&lt;br /&gt;
* [[grub]]&lt;br /&gt;
*[[systemd-boot]]&lt;br /&gt;
* [[rEFInd]]&lt;br /&gt;
&lt;br /&gt;
=== Identify the system ===&lt;br /&gt;
Indicators for EFI:&lt;br /&gt;
&lt;br /&gt;
* When you start the computer and you commonly type F8 (or any other key combination) to choose a boot media, you will see 2 different entries of the same media, flagged with either [UEFI] and/or [legacy].&lt;br /&gt;
* Your local Disk has a small vfat (fat16/32) partition (100-300MB).&lt;br /&gt;
* Your local Disk has a GPT partition table.&lt;br /&gt;
&lt;br /&gt;
If all of these indicators are not valid to your computer, then it is most likely be a pure BIOS.&lt;br /&gt;
&lt;br /&gt;
==== BIOS ====&lt;br /&gt;
Old computers have commonly only a pure BIOS.&lt;br /&gt;
&lt;br /&gt;
* Your disk has commonly a MBR/MS-DOS partition table.&lt;br /&gt;
* There is only one Master Boot Record for each disk. Which means only one BootLoader can be targeted.&lt;br /&gt;
* If you have installed Manjaro along with Windows or another Linux Distribution on the same Disk, then the last installed OS will commonly overwrite the MBR and take itself as the boot target.&lt;br /&gt;
* If you have installed 2 Operating-Systems on 2 separate Disks, then you are able to set the boot priority at the BIOS settings, so that it boots the first disk first, if it fails, it boots the second one etc.&lt;br /&gt;
&lt;br /&gt;
==== EFI ====&lt;br /&gt;
Newer computers have commonly an UEFI. It has also a legacy mode, which is fully compatible with a pure BIOS.&lt;br /&gt;
&lt;br /&gt;
* You disk has commonly a GPT partition table, but it also support MBR/MS-DOS in legacy mode.&lt;br /&gt;
* The UEFI has a builtin Bootloader which boots efi files.&lt;br /&gt;
* efi files are stored on a partition formatted with vfat (fat16/32) and flagged with &amp;quot;boot&amp;quot; or &amp;quot;esp&amp;quot; or &amp;quot;boot,esp&amp;quot;&lt;br /&gt;
* efi files contain at bare minimum, just like MBR, information about which partition should be booted, but there is no limitation of one MBR per Disk, so you create as many efi partitions and efi files as you like &lt;br /&gt;
* In your UEFI settings you can set the boot priority just like on a pure BIOS.&lt;br /&gt;
* It is possible to use/add a MBR-like behavior in legacy mode on a GPT partition table to be able to boot on both modes. Normally you need to add a 8-10MB non-formatted partition flagged with bios_grub.&lt;br /&gt;
&lt;br /&gt;
== Further Information ==&lt;br /&gt;
&lt;br /&gt;
* How to create a Manjaro Installation Media&lt;br /&gt;
* How to boot a Manjaro Installation Media&lt;br /&gt;
* How to check in which mode Manjaro has been booted.&lt;br /&gt;
&lt;br /&gt;
=== Load Manjaro Installation Media === &lt;br /&gt;
&lt;br /&gt;
In order to boot with a Manjaro Installation Media  [[Burn_an_ISO_File|you need to create it]], if not done yet.&lt;br /&gt;
{{BoxSecondary|System Boot Override|To override system boot order the vendor has a dedicated key. Most laptop keyboard has multiple use for the function keys and the primary function may be reversed. In such case a  key must be used with the function key. If you don't know consult your system documentation. Manjaro ISO default usernames and passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Identify partitions ==== &lt;br /&gt;
To identify your partitions and their designated use you need to run a partition manager. Depending on environment there is various tools. GTK based ISO offers GpartEd, QT based ISO offers KParted and common to all is the CLI tools.&lt;br /&gt;
{{UserCmd|command=lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME}}&lt;br /&gt;
More comprehensive information can be found using {{ic|fdisk}} (requires superuser) and you can limit the probed device e.g. ''/dev/sda'' or ''/dev/nvme0n1''&lt;br /&gt;
{{UserCmd|command=sudo fdisk -l /dev/sda}}&lt;br /&gt;
The clues to look for is ''mbr'' vs. ''gpt'' and the presence of a small partition - usually the first - formatted with the ''vfat'' filesystem followed by a larger partition formatted as ''ext4''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Important|This document and the content should '''never''' be used as a copy/paste resource. The remainder of this document will use pseudo names and partition numbering. Devices will be referred as '''/dev/sdy''' and partitions referred as '''/dev/sdyA''' and you will have to subtitute those with the real values from your system.}}&lt;br /&gt;
&lt;br /&gt;
==Use root context== &lt;br /&gt;
When you have loaded the live ISO - depending on environment - open a terminal and switch to ''root'' context. Use above mentioned root:password combination.&lt;br /&gt;
{{UserCmd|command=su}}&lt;br /&gt;
&lt;br /&gt;
==Chroot environment== &lt;br /&gt;
Chroot is a method to restrict various tasks to a restricted area e.g. package installation and other system maintenance tasks. Follow the [https://wiki.archlinux.org/index.php/Change_Root link] to read more about chroot on the Arch wiki.&lt;br /&gt;
===Identify system partitions===&lt;br /&gt;
From the above we assume you have identified the relevant partitions on your system and this document will refer the partitions as follows. Partitions not needed for this kind of maintenance has intentionally been left out (e.g. ''home'', ''swap''). &lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Partition !! Usage !!/ Comment&lt;br /&gt;
|-&lt;br /&gt;
| {{ic|/dev/sdyA}} || EFI system || Required for EFI system and mounted on ''/boot/efi''&lt;br /&gt;
|-&lt;br /&gt;
| {{ic|/dev/sdyB}} || boot || Optional but mounted on ''/boot'' The primary use is when GRUB cannot write to ''/'' (eg. ''f2fs'')&lt;br /&gt;
|-&lt;br /&gt;
| {{ic|/dev/sdyC}} || root || Required and for the root filesystem and mounted on ''/'' - usually formatted using ''ext4''&lt;br /&gt;
|}&lt;br /&gt;
{{Important|If your system is a BIOS/MBR system there is no efi partition. If your system is a BIOS/GPT system you will find an unformatted partion size 1-32MB of the bios boot partition type.}}&lt;br /&gt;
&lt;br /&gt;
===Use manjaro-chroot=== &lt;br /&gt;
Manjaro deploys a script called {{ic|manjaro-chroot}} takes an optional argument which will search the visible devices - scan the partitions for signs of an operating system. If more than one Linux operating system is found you will get a choice of which system to chroot otherwise the file ''/etc/fstab'' from the system is used to mount the partitions and chroot into this system.This script is only available in live iso by default but you can get it in an installed system by installing {{Ic|manjaro-tools-base}} package.&lt;br /&gt;
{{RootCmd|command=pamac install manjaro-tools-base}}&lt;br /&gt;
{{RootCmd|command=manjaro-chroot -a}}&lt;br /&gt;
&lt;br /&gt;
===Manual chroot=== &lt;br /&gt;
(Unnecessary if you have used {{ic|manjaro-chroot}})&lt;br /&gt;
Mount the partitions using the designated temporary mountpoint and '''always''' start with ''root''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{RootCmd|command=mount /dev/sdyC /mnt}}&lt;br /&gt;
{{Important|With a [[Btrfs|BTRFS filesystem]], you should note that the subvolumes must be mounted. That would be in such a case:{{RootCmd|command=mount -o subvol=@ /dev/sdyC /mnt}}}}&lt;br /&gt;
Then - if applicable - mount ''boot''&lt;br /&gt;
{{RootCmd|command=mount /dev/sdyB /mnt/boot}}&lt;br /&gt;
Then - if applicable - mount ''efi''&lt;br /&gt;
{{RootCmd|command=mount /dev/sdyA /mnt/boot/efi}}&lt;br /&gt;
Create the chroot environment and use bash as shell&lt;br /&gt;
{{RootCmd|command=manjaro-chroot /mnt /bin/bash}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Reinstall GRUB== &lt;br /&gt;
One possible cause why you are reading this document - is an unfinished update - which in turn can be caused by several situations - situation we will not dive into. To fix what ever caused this you should run a full system update including grub to ensure everything is in place.&lt;br /&gt;
{{RootCmd|command=pacman -Syu grub}}&lt;br /&gt;
When the transaction as completed continue below using the section matching your system&lt;br /&gt;
===BIOS System===&lt;br /&gt;
On a BIOS/GPT system there is no MBR and therefore no place to store the loader. The GPT partition specification allows for an unformatted partition of the BIOS boot partition type (0xEF02). The size of this partition can be as small as 1 mebibyte. The Calamares installer uses a fixed size of 32 mebibyte. On a BIOS/MBR system a part of the bootloader is written to the Master Boot Record for the primary disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The device is the '''disk''' ('''not a partition''')&lt;br /&gt;
{{RootCmd|command=grub-install --force --target=i386-pc --recheck --boot-directory=/boot /dev/sdy}}&lt;br /&gt;
Make sure the grub configuration is up-to-date&lt;br /&gt;
{{RootCmd|command=grub-mkconfig -o /boot/grub/grub.cfg}}&lt;br /&gt;
&lt;br /&gt;
===EFI System=== &lt;br /&gt;
{{Important|You need to be in chroot for this procedure.}}&lt;br /&gt;
Reinstall grub&lt;br /&gt;
{{RootCmd|command=grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck}}&lt;br /&gt;
Update the grub configuration&lt;br /&gt;
{{RootCmd|command=grub-mkconfig -o /boot/grub/grub.cfg}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{BoxWarning|EFI grub install messages|EFI variables are not supported on this system.}}&lt;br /&gt;
Verify the existance of an EFI system partition&lt;br /&gt;
{{RootCmd|command=lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME}}&lt;br /&gt;
Verify the efi filesystem is loaded&lt;br /&gt;
{{RootCmd|command=ls /sys/firmware/efi}}&lt;br /&gt;
Exit chroot&lt;br /&gt;
{{RootCmd|command=exit}}&lt;br /&gt;
Try loading the efi filesystem&lt;br /&gt;
{{RootCmd|command=modprobe efivarfs}}&lt;br /&gt;
Re-enter chroot &lt;br /&gt;
{{RootCmd|command=manjaro-chroot /mnt /bin/bash}}&lt;br /&gt;
Then mount the efi filesystem&lt;br /&gt;
{{RootCmd|command=mount -t efivarfs efivarfs /sys/firmware/efi/efivars}}&lt;br /&gt;
Verify the efi filesystem is loaded&lt;br /&gt;
{{RootCmd|command=ls /sys/firmware/efi}}&lt;br /&gt;
If successfull re-run above installation commands&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting== &lt;br /&gt;
=== Arch Linux is not recognized ===&lt;br /&gt;
If Arch Linux wasn't recognized after an update-grub then probably your Arch installation is missing the package lsb-release.&lt;br /&gt;
&lt;br /&gt;
==See also== &lt;br /&gt;
* [http://wiki.manjaro.org/index.php?title=UEFI_-_Install_Guide UEFI Install Guide]&lt;br /&gt;
* [https://wiki.archlinux.org/index.php/GRUB GRUB on Arch wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page{{#translation:}}]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=User:Megavolt/grub&amp;diff=36145</id>
		<title>User:Megavolt/grub</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=User:Megavolt/grub&amp;diff=36145"/>
		<updated>2022-09-12T04:43:12Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: delete&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=User:Megavolt&amp;diff=36144</id>
		<title>User:Megavolt</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=User:Megavolt&amp;diff=36144"/>
		<updated>2022-09-12T04:41:10Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
== Pages ==&lt;br /&gt;
{{Special:PrefixIndex/User:Megavolt/}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=0 style=&amp;quot;width:100%;text-align:left;vertical-align:top&amp;quot; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th style=&amp;quot;width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
'''&amp;lt;big&amp;gt;Deutsch&amp;lt;/big&amp;gt;'''&lt;br /&gt;
&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th style=&amp;quot;width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
'''&amp;lt;big&amp;gt;English&amp;lt;/big&amp;gt;'''&lt;br /&gt;
&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
== Wer bin ich? ==&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
== Who am I? ==&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
https://forum.manjaro.org/u/megavolt&lt;br /&gt;
&lt;br /&gt;
https://gitlab.manjaro.org/megavolt&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
https://forum.manjaro.org/u/megavolt&lt;br /&gt;
&lt;br /&gt;
https://gitlab.manjaro.org/megavolt&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th style=&amp;quot;width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
== Was ist mein Ziel hier? ==&lt;br /&gt;
&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th style=&amp;quot;width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
== What is my goal here? ==&lt;br /&gt;
&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr style=&amp;quot;vertical-align:top&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
* '''Übersetzungen''' von Englisch nach Deutsch&lt;br /&gt;
* Diese Wiki zur '''ersten Anlaufstelle''' für Manjaro Nutzer zu machen, wenn Probleme auftreten.&lt;br /&gt;
* Einfache und selbst erklärende '''Anleitungen''' zu schreiben und diese aktuell halten.&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
* '''Translations''' from English to German&lt;br /&gt;
* To make this wiki the '''first point of contact''' for Manjaro users when problems arise.&lt;br /&gt;
* To write simple and self-explanatory '''tutorials''' and keep them up to date.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr  style=&amp;quot;vertical-align:top&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
''Ich hoffe für die Zukunft, dass wir einverstanden sein werden, dass wir nicht immer einverstanden sein werden, aber dennoch respektvoll miteinander umgehen.''&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; ''Auf eine gute Zusammenarbeit!''&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td style=&amp;quot;width:50%;&amp;quot;&amp;gt;&lt;br /&gt;
''I hope for the future that we will agree, that we will not always agree, but still be respectful to each other.'' &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;''To a good cooperation!''&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[User:Megavolt/regex|regex]] ==&lt;br /&gt;
{{User:Megavolt/regex}}&lt;br /&gt;
&lt;br /&gt;
== [[User:Megavolt/cheatsheet|cheatsheet]] ==&lt;br /&gt;
{{User:Megavolt/cheatsheet}}&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=User:Megavolt/grub&amp;diff=36143</id>
		<title>User:Megavolt/grub</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=User:Megavolt/grub&amp;diff=36143"/>
		<updated>2022-09-12T04:34:14Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Megavolt moved page User:Megavolt/grub to User:Megavolt/bootloaders&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[User:Megavolt/bootloaders]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=User:Megavolt/bootloaders&amp;diff=36142</id>
		<title>User:Megavolt/bootloaders</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=User:Megavolt/bootloaders&amp;diff=36142"/>
		<updated>2022-09-12T04:34:14Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Megavolt moved page User:Megavolt/grub to User:Megavolt/bootloaders&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Overview== &lt;br /&gt;
In order to load the operating system a boot loader is needed. There is not only one boot loader, but many of them which have its benefits and disadvantages.&lt;br /&gt;
&lt;br /&gt;
Common boot loaders are:&lt;br /&gt;
* GRUB&lt;br /&gt;
* systemd-boot&lt;br /&gt;
* rEFInd&lt;br /&gt;
* Syslinux&lt;br /&gt;
&lt;br /&gt;
It depends on the computer which boot loader can or should be used. In general there are 2 system: UEFI/EFI and BIOS, while UEFI/EFI has commonly also a legacy mode which is fully compatible with a pure BIOS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
For various reasons - it happens the bootloader get's corrupted, erased or misconfigured resulting to a black screen with a failure message during boot, like '''No boot loaders found in /dev/...'''. To restore system operation without re-installing your OS or losing your data you will need to use your Manjaro installation media, such as, a CD/DVD or USB Flashdrive.&lt;br /&gt;
{{BoxSecondary|Archlinux Boot Process|More information about the boot process on Archlinux based distributions is available at [https://wiki.archlinux.org/index.php/Arch_boot_process Archwiki]}}&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==Preparation== &lt;br /&gt;
Identify the type of system you are attempted to rescue as the commands involved are slightly different. There are 2 types of systems which are not compatible to each other.&lt;br /&gt;
&lt;br /&gt;
=== Identify the system ===&lt;br /&gt;
Indicators for EFI:&lt;br /&gt;
&lt;br /&gt;
* When you start the computer and you commonly type F8 (or any other key combination) to choose a boot media, you will see 2 different entries of the same media, flagged with either [UEFI] or [legacy].&lt;br /&gt;
* Your local Disk has a small vfat (fat16/32) partition (100-300MB).&lt;br /&gt;
* Your local Disk has a GPT partition table.&lt;br /&gt;
&lt;br /&gt;
If all of these indicators are not valid to your computer, then it is most likely be a pure BIOS.&lt;br /&gt;
&lt;br /&gt;
==== BIOS ====&lt;br /&gt;
Old computers have commonly only a pure BIOS.&lt;br /&gt;
&lt;br /&gt;
* Your disk has commonly a MBR/MS-DOS partition table.&lt;br /&gt;
* There is only one Master Boot Record for each disk. Which means only one BootLoader can be targeted.&lt;br /&gt;
* If you have installed Manjaro along with Windows or another Linux Distribution on the same Disk, then the last installed OS will commonly overwrite the MBR and take itself as the boot target.&lt;br /&gt;
* If you have installed 2 Operating-Systems on 2 separate Disks, then you are able to set the boot priority at the BIOS settings, so that it boots the first disk first, if it fails, it boots the second one etc.&lt;br /&gt;
&lt;br /&gt;
==== EFI ====&lt;br /&gt;
Newer computers have commonly an UEFI. It has also a legacy mode, which is fully compatible with a pure BIOS.&lt;br /&gt;
&lt;br /&gt;
* You disk has commonly a GPT partition table, but it also support MBR/MS-DOS in legacy mode.&lt;br /&gt;
* The UEFI has a builtin Bootloader which boots efi files.&lt;br /&gt;
* efi files are stored on a partition formatted with vfat (fat16/32) and flagged with &amp;quot;boot&amp;quot; or &amp;quot;esp&amp;quot; or &amp;quot;boot,esp&amp;quot;&lt;br /&gt;
* efi files contain at bare minimum, just like MBR, information about which partition should be booted, but there is no limitation of one MBR per Disk, so you create as many efi partitions and efi files as you like &lt;br /&gt;
* In your UEFI settings you can set the boot priority just like on a pure BIOS.&lt;br /&gt;
* It is possible to use/add a MBR-like behavior in legacy mode on a GPT partition table to be able to boot on both modes. Normally you will see here a 8-10MB non-formatted partition flagged with bios_grub.&lt;br /&gt;
&lt;br /&gt;
Go to [[Restore_the_GRUB_Bootloader#Identify_the_system|Identify the system]] for indicators of which system you use.&lt;br /&gt;
&lt;br /&gt;
=== Load Manjaro Installation Media === &lt;br /&gt;
&lt;br /&gt;
In order to boot with a Manjaro Installation Media  [[Burn_an_ISO_File|you need to create it]], if not done yet.&lt;br /&gt;
{{BoxSecondary|System Boot Override|To override system boot order the vendor has a dedicated key. Most laptop keyboard has multiple use for the function keys and the primary function may be reversed. In such case a  key must be used with the function key. If you don't know consult your system documentation. Manjaro ISO default usernames and passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Identify partitions ==== &lt;br /&gt;
To identify your partitions and their designated use you need to run a partition manager. Depending on environment there is various tools. GTK based ISO offers GpartEd, QT based ISO offers KParted and common to all is the CLI tools.&lt;br /&gt;
{{UserCmd|command=lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME}}&lt;br /&gt;
More comprehensive information can be found using {{ic|fdisk}} (requires superuser) and you can limit the probed device e.g. ''/dev/sda'' or ''/dev/nvme0n1''&lt;br /&gt;
{{UserCmd|command=sudo fdisk -l /dev/sda}}&lt;br /&gt;
The clues to look for is ''mbr'' vs. ''gpt'' and the presence of a small partition - usually the first - formatted with the ''vfat'' filesystem followed by a larger partition formatted as ''ext4''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Important|This document and the content should '''never''' be used as a copy/paste resource. The remainder of this document will use pseudo names and partition numbering. Devices will be referred as '''/dev/sdy''' and partitions referred as '''/dev/sdyA''' and you will have to subtitute those with the real values from your system.}}&lt;br /&gt;
&lt;br /&gt;
==Use root context== &lt;br /&gt;
When you have loaded the live ISO - depending on environment - open a terminal and switch to ''root'' context. Use above mentioned root:password combination.&lt;br /&gt;
{{UserCmd|command=su}}&lt;br /&gt;
&lt;br /&gt;
==Chroot environment== &lt;br /&gt;
Chroot is a method to restrict various tasks to a restricted area e.g. package installation and other system maintenance tasks. Follow the [https://wiki.archlinux.org/index.php/Change_Root link] to read more about chroot on the Arch wiki.&lt;br /&gt;
===Identify system partitions===&lt;br /&gt;
From the above we assume you have identified the relevant partitions on your system and this document will refer the partitions as follows. Partitions not needed for this kind of maintenance has intentionally been left out (e.g. ''home'', ''swap''). &lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Partition !! Usage !!/ Comment&lt;br /&gt;
|-&lt;br /&gt;
| {{ic|/dev/sdyA}} || EFI system || Required for EFI system and mounted on ''/boot/efi''&lt;br /&gt;
|-&lt;br /&gt;
| {{ic|/dev/sdyB}} || boot || Optional but mounted on ''/boot'' The primary use is when GRUB cannot write to ''/'' (eg. ''f2fs'')&lt;br /&gt;
|-&lt;br /&gt;
| {{ic|/dev/sdyC}} || root || Required and for the root filesystem and mounted on ''/'' - usually formatted using ''ext4''&lt;br /&gt;
|}&lt;br /&gt;
{{Important|If your system is a BIOS/MBR system there is no efi partition. If your system is a BIOS/GPT system you will find an unformatted partion size 1-32MB of the bios boot partition type.}}&lt;br /&gt;
&lt;br /&gt;
===Use manjaro-chroot=== &lt;br /&gt;
Manjaro deploys a script called {{ic|manjaro-chroot}} takes an optional argument which will search the visible devices - scan the partitions for signs of an operating system. If more than one Linux operating system is found you will get a choice of which system to chroot otherwise the file ''/etc/fstab'' from the system is used to mount the partitions and chroot into this system.This script is only available in live iso by default but you can get it in an installed system by installing {{Ic|manjaro-tools-base}} package.&lt;br /&gt;
{{RootCmd|command=pamac install manjaro-tools-base}}&lt;br /&gt;
{{RootCmd|command=manjaro-chroot -a}}&lt;br /&gt;
&lt;br /&gt;
===Manual chroot=== &lt;br /&gt;
(Unnecessary if you have used {{ic|manjaro-chroot}})&lt;br /&gt;
Mount the partitions using the designated temporary mountpoint and '''always''' start with ''root''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{RootCmd|command=mount /dev/sdyC /mnt}}&lt;br /&gt;
{{Important|With a [[Btrfs|BTRFS filesystem]], you should note that the subvolumes must be mounted. That would be in such a case:{{RootCmd|command=mount -o subvol=@ /dev/sdyC /mnt}}}}&lt;br /&gt;
Then - if applicable - mount ''boot''&lt;br /&gt;
{{RootCmd|command=mount /dev/sdyB /mnt/boot}}&lt;br /&gt;
Then - if applicable - mount ''efi''&lt;br /&gt;
{{RootCmd|command=mount /dev/sdyA /mnt/boot/efi}}&lt;br /&gt;
Create the chroot environment and use bash as shell&lt;br /&gt;
{{RootCmd|command=manjaro-chroot /mnt /bin/bash}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Reinstall GRUB== &lt;br /&gt;
One possible cause why you are reading this document - is an unfinished update - which in turn can be caused by several situations - situation we will not dive into. To fix what ever caused this you should run a full system update including grub to ensure everything is in place.&lt;br /&gt;
{{RootCmd|command=pacman -Syu grub}}&lt;br /&gt;
When the transaction as completed continue below using the section matching your system&lt;br /&gt;
===BIOS System===&lt;br /&gt;
On a BIOS/GPT system there is no MBR and therefore no place to store the loader. The GPT partition specification allows for an unformatted partition of the BIOS boot partition type (0xEF02). The size of this partition can be as small as 1 mebibyte. The Calamares installer uses a fixed size of 32 mebibyte. On a BIOS/MBR system a part of the bootloader is written to the Master Boot Record for the primary disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The device is the '''disk''' ('''not a partition''')&lt;br /&gt;
{{RootCmd|command=grub-install --force --target=i386-pc --recheck --boot-directory=/boot /dev/sdy}}&lt;br /&gt;
Make sure the grub configuration is up-to-date&lt;br /&gt;
{{RootCmd|command=grub-mkconfig -o /boot/grub/grub.cfg}}&lt;br /&gt;
&lt;br /&gt;
===EFI System=== &lt;br /&gt;
{{Important|You need to be in chroot for this procedure.}}&lt;br /&gt;
Reinstall grub&lt;br /&gt;
{{RootCmd|command=grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck}}&lt;br /&gt;
Update the grub configuration&lt;br /&gt;
{{RootCmd|command=grub-mkconfig -o /boot/grub/grub.cfg}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{BoxWarning|EFI grub install messages|EFI variables are not supported on this system.}}&lt;br /&gt;
Verify the existance of an EFI system partition&lt;br /&gt;
{{RootCmd|command=lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME}}&lt;br /&gt;
Verify the efi filesystem is loaded&lt;br /&gt;
{{RootCmd|command=ls /sys/firmware/efi}}&lt;br /&gt;
Exit chroot&lt;br /&gt;
{{RootCmd|command=exit}}&lt;br /&gt;
Try loading the efi filesystem&lt;br /&gt;
{{RootCmd|command=modprobe efivarfs}}&lt;br /&gt;
Re-enter chroot &lt;br /&gt;
{{RootCmd|command=manjaro-chroot /mnt /bin/bash}}&lt;br /&gt;
Then mount the efi filesystem&lt;br /&gt;
{{RootCmd|command=mount -t efivarfs efivarfs /sys/firmware/efi/efivars}}&lt;br /&gt;
Verify the efi filesystem is loaded&lt;br /&gt;
{{RootCmd|command=ls /sys/firmware/efi}}&lt;br /&gt;
If successfull re-run above installation commands&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting== &lt;br /&gt;
=== Arch Linux is not recognized ===&lt;br /&gt;
If Arch Linux wasn't recognized after an update-grub then probably your Arch installation is missing the package lsb-release.&lt;br /&gt;
&lt;br /&gt;
==See also== &lt;br /&gt;
* [http://wiki.manjaro.org/index.php?title=UEFI_-_Install_Guide UEFI Install Guide]&lt;br /&gt;
* [https://wiki.archlinux.org/index.php/GRUB GRUB on Arch wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page{{#translation:}}]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=User:Megavolt/chroot&amp;diff=36141</id>
		<title>User:Megavolt/chroot</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=User:Megavolt/chroot&amp;diff=36141"/>
		<updated>2022-09-12T02:57:50Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: add chroot&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;chroot is a terminal command that gives you the ability to execute commands in another root directory, as well as switch to an interactive shell inside another root directory.&lt;br /&gt;
{{BoxInfo|Note|Chroot can also be used to switch from a [[chroot:|live session]] to a local installation to change configurations or make Manjaro bootable again. It is important that the source and the target have the same architecture.}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
{{BoxInfo|su/sudo|How to execute a command with [[sudo]] or [[su]]}}&lt;br /&gt;
&lt;br /&gt;
The command must always be run with root privileges. The general command looks like this:&lt;br /&gt;
&lt;br /&gt;
{{RootCmd|chroot DIRECTORY COMMAND}&lt;br /&gt;
&lt;br /&gt;
This executes a command within a directory. This command must exist in the directory.&lt;br /&gt;
&lt;br /&gt;
=== Beispiel ===&lt;br /&gt;
&lt;br /&gt;
To change into the bash shell of another system that you have already mounted in the current one, it needs this command:&lt;br /&gt;
&lt;br /&gt;
{{RootCmd|chroot /mnt /bin/bash -i}&lt;br /&gt;
&lt;br /&gt;
Usually you can omit /bin/bash -i, because the default is always /bin/sh -i, which is generally a link to the default shell, which is usually bash.&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=User:Megavolt/bootloaders&amp;diff=36140</id>
		<title>User:Megavolt/bootloaders</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=User:Megavolt/bootloaders&amp;diff=36140"/>
		<updated>2022-09-12T02:05:07Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: some rework&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Overview== &lt;br /&gt;
In order to load the operating system a boot loader is needed. There is not only one boot loader, but many of them which have its benefits and disadvantages.&lt;br /&gt;
&lt;br /&gt;
Common boot loaders are:&lt;br /&gt;
* GRUB&lt;br /&gt;
* systemd-boot&lt;br /&gt;
* rEFInd&lt;br /&gt;
* Syslinux&lt;br /&gt;
&lt;br /&gt;
It depends on the computer which boot loader can or should be used. In general there are 2 system: UEFI/EFI and BIOS, while UEFI/EFI has commonly also a legacy mode which is fully compatible with a pure BIOS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
For various reasons - it happens the bootloader get's corrupted, erased or misconfigured resulting to a black screen with a failure message during boot, like '''No boot loaders found in /dev/...'''. To restore system operation without re-installing your OS or losing your data you will need to use your Manjaro installation media, such as, a CD/DVD or USB Flashdrive.&lt;br /&gt;
{{BoxSecondary|Archlinux Boot Process|More information about the boot process on Archlinux based distributions is available at [https://wiki.archlinux.org/index.php/Arch_boot_process Archwiki]}}&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
==Preparation== &lt;br /&gt;
Identify the type of system you are attempted to rescue as the commands involved are slightly different. There are 2 types of systems which are not compatible to each other.&lt;br /&gt;
&lt;br /&gt;
=== Identify the system ===&lt;br /&gt;
Indicators for EFI:&lt;br /&gt;
&lt;br /&gt;
* When you start the computer and you commonly type F8 (or any other key combination) to choose a boot media, you will see 2 different entries of the same media, flagged with either [UEFI] or [legacy].&lt;br /&gt;
* Your local Disk has a small vfat (fat16/32) partition (100-300MB).&lt;br /&gt;
* Your local Disk has a GPT partition table.&lt;br /&gt;
&lt;br /&gt;
If all of these indicators are not valid to your computer, then it is most likely be a pure BIOS.&lt;br /&gt;
&lt;br /&gt;
==== BIOS ====&lt;br /&gt;
Old computers have commonly only a pure BIOS.&lt;br /&gt;
&lt;br /&gt;
* Your disk has commonly a MBR/MS-DOS partition table.&lt;br /&gt;
* There is only one Master Boot Record for each disk. Which means only one BootLoader can be targeted.&lt;br /&gt;
* If you have installed Manjaro along with Windows or another Linux Distribution on the same Disk, then the last installed OS will commonly overwrite the MBR and take itself as the boot target.&lt;br /&gt;
* If you have installed 2 Operating-Systems on 2 separate Disks, then you are able to set the boot priority at the BIOS settings, so that it boots the first disk first, if it fails, it boots the second one etc.&lt;br /&gt;
&lt;br /&gt;
==== EFI ====&lt;br /&gt;
Newer computers have commonly an UEFI. It has also a legacy mode, which is fully compatible with a pure BIOS.&lt;br /&gt;
&lt;br /&gt;
* You disk has commonly a GPT partition table, but it also support MBR/MS-DOS in legacy mode.&lt;br /&gt;
* The UEFI has a builtin Bootloader which boots efi files.&lt;br /&gt;
* efi files are stored on a partition formatted with vfat (fat16/32) and flagged with &amp;quot;boot&amp;quot; or &amp;quot;esp&amp;quot; or &amp;quot;boot,esp&amp;quot;&lt;br /&gt;
* efi files contain at bare minimum, just like MBR, information about which partition should be booted, but there is no limitation of one MBR per Disk, so you create as many efi partitions and efi files as you like &lt;br /&gt;
* In your UEFI settings you can set the boot priority just like on a pure BIOS.&lt;br /&gt;
* It is possible to use/add a MBR-like behavior in legacy mode on a GPT partition table to be able to boot on both modes. Normally you will see here a 8-10MB non-formatted partition flagged with bios_grub.&lt;br /&gt;
&lt;br /&gt;
Go to [[Restore_the_GRUB_Bootloader#Identify_the_system|Identify the system]] for indicators of which system you use.&lt;br /&gt;
&lt;br /&gt;
=== Load Manjaro Installation Media === &lt;br /&gt;
&lt;br /&gt;
In order to boot with a Manjaro Installation Media  [[Burn_an_ISO_File|you need to create it]], if not done yet.&lt;br /&gt;
{{BoxSecondary|System Boot Override|To override system boot order the vendor has a dedicated key. Most laptop keyboard has multiple use for the function keys and the primary function may be reversed. In such case a  key must be used with the function key. If you don't know consult your system documentation. Manjaro ISO default usernames and passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Identify partitions ==== &lt;br /&gt;
To identify your partitions and their designated use you need to run a partition manager. Depending on environment there is various tools. GTK based ISO offers GpartEd, QT based ISO offers KParted and common to all is the CLI tools.&lt;br /&gt;
{{UserCmd|command=lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME}}&lt;br /&gt;
More comprehensive information can be found using {{ic|fdisk}} (requires superuser) and you can limit the probed device e.g. ''/dev/sda'' or ''/dev/nvme0n1''&lt;br /&gt;
{{UserCmd|command=sudo fdisk -l /dev/sda}}&lt;br /&gt;
The clues to look for is ''mbr'' vs. ''gpt'' and the presence of a small partition - usually the first - formatted with the ''vfat'' filesystem followed by a larger partition formatted as ''ext4''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Important|This document and the content should '''never''' be used as a copy/paste resource. The remainder of this document will use pseudo names and partition numbering. Devices will be referred as '''/dev/sdy''' and partitions referred as '''/dev/sdyA''' and you will have to subtitute those with the real values from your system.}}&lt;br /&gt;
&lt;br /&gt;
==Use root context== &lt;br /&gt;
When you have loaded the live ISO - depending on environment - open a terminal and switch to ''root'' context. Use above mentioned root:password combination.&lt;br /&gt;
{{UserCmd|command=su}}&lt;br /&gt;
&lt;br /&gt;
==Chroot environment== &lt;br /&gt;
Chroot is a method to restrict various tasks to a restricted area e.g. package installation and other system maintenance tasks. Follow the [https://wiki.archlinux.org/index.php/Change_Root link] to read more about chroot on the Arch wiki.&lt;br /&gt;
===Identify system partitions===&lt;br /&gt;
From the above we assume you have identified the relevant partitions on your system and this document will refer the partitions as follows. Partitions not needed for this kind of maintenance has intentionally been left out (e.g. ''home'', ''swap''). &lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Partition !! Usage !!/ Comment&lt;br /&gt;
|-&lt;br /&gt;
| {{ic|/dev/sdyA}} || EFI system || Required for EFI system and mounted on ''/boot/efi''&lt;br /&gt;
|-&lt;br /&gt;
| {{ic|/dev/sdyB}} || boot || Optional but mounted on ''/boot'' The primary use is when GRUB cannot write to ''/'' (eg. ''f2fs'')&lt;br /&gt;
|-&lt;br /&gt;
| {{ic|/dev/sdyC}} || root || Required and for the root filesystem and mounted on ''/'' - usually formatted using ''ext4''&lt;br /&gt;
|}&lt;br /&gt;
{{Important|If your system is a BIOS/MBR system there is no efi partition. If your system is a BIOS/GPT system you will find an unformatted partion size 1-32MB of the bios boot partition type.}}&lt;br /&gt;
&lt;br /&gt;
===Use manjaro-chroot=== &lt;br /&gt;
Manjaro deploys a script called {{ic|manjaro-chroot}} takes an optional argument which will search the visible devices - scan the partitions for signs of an operating system. If more than one Linux operating system is found you will get a choice of which system to chroot otherwise the file ''/etc/fstab'' from the system is used to mount the partitions and chroot into this system.This script is only available in live iso by default but you can get it in an installed system by installing {{Ic|manjaro-tools-base}} package.&lt;br /&gt;
{{RootCmd|command=pamac install manjaro-tools-base}}&lt;br /&gt;
{{RootCmd|command=manjaro-chroot -a}}&lt;br /&gt;
&lt;br /&gt;
===Manual chroot=== &lt;br /&gt;
(Unnecessary if you have used {{ic|manjaro-chroot}})&lt;br /&gt;
Mount the partitions using the designated temporary mountpoint and '''always''' start with ''root''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{RootCmd|command=mount /dev/sdyC /mnt}}&lt;br /&gt;
{{Important|With a [[Btrfs|BTRFS filesystem]], you should note that the subvolumes must be mounted. That would be in such a case:{{RootCmd|command=mount -o subvol=@ /dev/sdyC /mnt}}}}&lt;br /&gt;
Then - if applicable - mount ''boot''&lt;br /&gt;
{{RootCmd|command=mount /dev/sdyB /mnt/boot}}&lt;br /&gt;
Then - if applicable - mount ''efi''&lt;br /&gt;
{{RootCmd|command=mount /dev/sdyA /mnt/boot/efi}}&lt;br /&gt;
Create the chroot environment and use bash as shell&lt;br /&gt;
{{RootCmd|command=manjaro-chroot /mnt /bin/bash}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Reinstall GRUB== &lt;br /&gt;
One possible cause why you are reading this document - is an unfinished update - which in turn can be caused by several situations - situation we will not dive into. To fix what ever caused this you should run a full system update including grub to ensure everything is in place.&lt;br /&gt;
{{RootCmd|command=pacman -Syu grub}}&lt;br /&gt;
When the transaction as completed continue below using the section matching your system&lt;br /&gt;
===BIOS System===&lt;br /&gt;
On a BIOS/GPT system there is no MBR and therefore no place to store the loader. The GPT partition specification allows for an unformatted partition of the BIOS boot partition type (0xEF02). The size of this partition can be as small as 1 mebibyte. The Calamares installer uses a fixed size of 32 mebibyte. On a BIOS/MBR system a part of the bootloader is written to the Master Boot Record for the primary disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The device is the '''disk''' ('''not a partition''')&lt;br /&gt;
{{RootCmd|command=grub-install --force --target=i386-pc --recheck --boot-directory=/boot /dev/sdy}}&lt;br /&gt;
Make sure the grub configuration is up-to-date&lt;br /&gt;
{{RootCmd|command=grub-mkconfig -o /boot/grub/grub.cfg}}&lt;br /&gt;
&lt;br /&gt;
===EFI System=== &lt;br /&gt;
{{Important|You need to be in chroot for this procedure.}}&lt;br /&gt;
Reinstall grub&lt;br /&gt;
{{RootCmd|command=grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck}}&lt;br /&gt;
Update the grub configuration&lt;br /&gt;
{{RootCmd|command=grub-mkconfig -o /boot/grub/grub.cfg}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{BoxWarning|EFI grub install messages|EFI variables are not supported on this system.}}&lt;br /&gt;
Verify the existance of an EFI system partition&lt;br /&gt;
{{RootCmd|command=lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME}}&lt;br /&gt;
Verify the efi filesystem is loaded&lt;br /&gt;
{{RootCmd|command=ls /sys/firmware/efi}}&lt;br /&gt;
Exit chroot&lt;br /&gt;
{{RootCmd|command=exit}}&lt;br /&gt;
Try loading the efi filesystem&lt;br /&gt;
{{RootCmd|command=modprobe efivarfs}}&lt;br /&gt;
Re-enter chroot &lt;br /&gt;
{{RootCmd|command=manjaro-chroot /mnt /bin/bash}}&lt;br /&gt;
Then mount the efi filesystem&lt;br /&gt;
{{RootCmd|command=mount -t efivarfs efivarfs /sys/firmware/efi/efivars}}&lt;br /&gt;
Verify the efi filesystem is loaded&lt;br /&gt;
{{RootCmd|command=ls /sys/firmware/efi}}&lt;br /&gt;
If successfull re-run above installation commands&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting== &lt;br /&gt;
=== Arch Linux is not recognized ===&lt;br /&gt;
If Arch Linux wasn't recognized after an update-grub then probably your Arch installation is missing the package lsb-release.&lt;br /&gt;
&lt;br /&gt;
==See also== &lt;br /&gt;
* [http://wiki.manjaro.org/index.php?title=UEFI_-_Install_Guide UEFI Install Guide]&lt;br /&gt;
* [https://wiki.archlinux.org/index.php/GRUB GRUB on Arch wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page{{#translation:}}]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=User:Megavolt/bootloaders&amp;diff=36139</id>
		<title>User:Megavolt/bootloaders</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=User:Megavolt/bootloaders&amp;diff=36139"/>
		<updated>2022-09-11T09:22:45Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;&amp;lt;languages/&amp;gt; __TOC__ &amp;lt;translate&amp;gt; ==Overview== &amp;lt;!--T:1--&amp;gt; In order to load the operating system, a Linux-capable boot loader such as GRUB, rEFInd or Syslinux needs to be instal...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Overview== &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
In order to load the operating system, a Linux-capable boot loader such as GRUB, rEFInd or Syslinux needs to be installed to the Master Boot Record (MBR) or the GUID Partition Table (GPT) of the media containing the Operating System. Installations created using Manjaro ISO defaults to GRUB.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
For various reasons - it happens the bootloader get's corrupted, erased or misconfigured resulting to a black screen with a failure message during boot, like '''No boot loaders found in /dev/...'''. To restore system operation without re-installing your OS or losing your data you will need to use your Manjaro installation media, such as, a CD/DVD or USB Flashdrive.&lt;br /&gt;
{{BoxSecondary|Archlinux Boot Process|More information about the boot process on Archlinux based distributions is available at [https://wiki.archlinux.org/index.php/Arch_boot_process Archwiki]}}&lt;br /&gt;
&lt;br /&gt;
==Preparation== &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
Identify the type of system you are attempted to rescue as the commands involved are slightly different. There are 2 types of systems which are not compatible to each other.&lt;br /&gt;
&lt;br /&gt;
=== Identify the system ===&lt;br /&gt;
Indicators for EFI:&lt;br /&gt;
* When you start the computer and you commonly type F8 (or any other key combination) to choose a boot media, you will see 2 different entries of the same media, flagged with either [UEFI] or [legacy].&lt;br /&gt;
* Your local Disk has a small vfat (fat16/32) partition (100-300MB).&lt;br /&gt;
* Your local Disk has a GPT partition table.&lt;br /&gt;
&lt;br /&gt;
If all of these indicators are not valid to your computer, then it must be a pure BIOS.&lt;br /&gt;
&lt;br /&gt;
==== BIOS ====&lt;br /&gt;
Old computers have commonly only a pure BIOS.&lt;br /&gt;
&lt;br /&gt;
* Your disk has commonly a MBR/MS-DOS partition table.&lt;br /&gt;
* There is only one Master Boot Record for each disk. Which means only one BootLoader can be targeted.&lt;br /&gt;
* If you have installed Manjaro along with Windows or another Linux Distribution on the same Disk, then the last installed OS will commonly overwrite the MBR and take itself as the boot target.&lt;br /&gt;
* If you have installed 2 Operating-Systems on 2 separate Disks, then you are able to set the boot priority at the BIOS settings, so that it boots the first disk first, if it fails, it boots the second one etc.&lt;br /&gt;
&lt;br /&gt;
==== EFI ====&lt;br /&gt;
Newer computers have commonly an UEFI. It has also a legacy mode, which is fully compatible with a pure BIOS.&lt;br /&gt;
&lt;br /&gt;
* You disk has commonly a GPT partition table, but it also support MBR/MS-DOS in legacy mode.&lt;br /&gt;
* The UEFI has a builtin Bootloader which boots efi files.&lt;br /&gt;
* efi files are stored on a partition formatted with vfat (fat16/32) and flagged with &amp;quot;boot&amp;quot; or &amp;quot;esp&amp;quot; or &amp;quot;boot,esp&amp;quot;&lt;br /&gt;
* efi files contain at bare minimum, just like MBR, information about which partition should be booted, but there is no limitation of one MBR per Disk, so you create as many efi partitions and efi files as you like &lt;br /&gt;
* In your UEFI settings you can set the boot priority just like on a pure BIOS.&lt;br /&gt;
* It is possible to use/add a MBR-like behavior in legacy mode on a GPT partition table to be able to boot on both modes. Normally you will see here a 8-10MB non-formatted partition flagged with bios_grub.&lt;br /&gt;
&lt;br /&gt;
Go to [[Restore_the_GRUB_Bootloader#Identify_the_system|Identify the system]] for indicators of which system you use.&lt;br /&gt;
&lt;br /&gt;
=== Load Manjaro Installation Media === &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
{{BoxSecondary|System Boot Override|To override system boot order the vendor has a dedicated key. Most laptop keyboard has multiple use for the function keys and the primary function may be reversed. In such case a &amp;lt;kbd&amp;gt;Fn&amp;lt;/kbd&amp;gt; key must be used with the function key. If you don't know consult your system documentation. Manjaro ISO default usernames and passwords&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Default Username&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Default Password&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;manjaro&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;manjaro&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;root&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;manjaro&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== Identify partitions ==== &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
To identify your partitions and their designated use you need to run a partition manager. Depending on environment there is various tools. GTK based ISO offers GpartEd, QT based ISO offers KParted and common to all is the CLI tools.&lt;br /&gt;
{{UserCmd|command=lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME}}&lt;br /&gt;
More comprehensive information can be found using {{ic|fdisk}} (requires superuser) and you can limit the probed device e.g. ''/dev/sda'' or ''/dev/nvme0n1''&lt;br /&gt;
{{UserCmd|command=sudo fdisk -l /dev/sda}}&lt;br /&gt;
The clues to look for is ''mbr'' vs. ''gpt'' and the presence of a small partition - usually the first - formatted with the ''vfat'' filesystem followed by a larger partition formatted as ''ext4''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
{{Important|This document and the content should '''never''' be used as a copy/paste resource. The remainder of this document will use pseudo names and partition numbering. Devices will be referred as '''/dev/sdy''' and partitions referred as '''/dev/sdyA''' and you will have to subtitute those with the real values from your system.}}&lt;br /&gt;
&lt;br /&gt;
==Use root context== &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
When you have loaded the live ISO - depending on environment - open a terminal and switch to ''root'' context. Use above mentioned root:password combination.&lt;br /&gt;
{{UserCmd|command=su}}&lt;br /&gt;
&lt;br /&gt;
==Chroot environment== &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
Chroot is a method to restrict various tasks to a restricted area e.g. package installation and other system maintenance tasks. Follow the [https://wiki.archlinux.org/index.php/Change_Root link] to read more about chroot on the Arch wiki.&lt;br /&gt;
===Identify system partitions===&lt;br /&gt;
From the above we assume you have identified the relevant partitions on your system and this document will refer the partitions as follows. Partitions not needed for this kind of maintenance has intentionally been left out (e.g. ''home'', ''swap''). &lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Partition !! Usage !!/ Comment&lt;br /&gt;
|-&lt;br /&gt;
| {{ic|/dev/sdyA}} || EFI system || Required for EFI system and mounted on ''/boot/efi''&lt;br /&gt;
|-&lt;br /&gt;
| {{ic|/dev/sdyB}} || boot || Optional but mounted on ''/boot'' The primary use is when GRUB cannot write to ''/'' (eg. ''f2fs'')&lt;br /&gt;
|-&lt;br /&gt;
| {{ic|/dev/sdyC}} || root || Required and for the root filesystem and mounted on ''/'' - usually formatted using ''ext4''&lt;br /&gt;
|}&lt;br /&gt;
{{Important|If your system is a BIOS/MBR system there is no efi partition. If your system is a BIOS/GPT system you will find an unformatted partion size 1-32MB of the bios boot partition type.}}&lt;br /&gt;
&lt;br /&gt;
===Use manjaro-chroot=== &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
Manjaro deploys a script called {{ic|manjaro-chroot}} takes an optional argument which will search the visible devices - scan the partitions for signs of an operating system. If more than one Linux operating system is found you will get a choice of which system to chroot otherwise the file ''/etc/fstab'' from the system is used to mount the partitions and chroot into this system.This script is only available in live iso by default but you can get it in an installed system by installing {{Ic|manjaro-tools-base}} package.&lt;br /&gt;
{{RootCmd|command=pamac install manjaro-tools-base}}&lt;br /&gt;
{{RootCmd|command=manjaro-chroot -a}}&lt;br /&gt;
&lt;br /&gt;
===Manual chroot=== &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
(Unnecessary if you have used {{ic|manjaro-chroot}})&lt;br /&gt;
Mount the partitions using the designated temporary mountpoint and '''always''' start with ''root''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
{{RootCmd|command=mount /dev/sdyC /mnt}}&lt;br /&gt;
{{Important|With a [[Btrfs|BTRFS filesystem]], you should note that the subvolumes must be mounted. That would be in such a case:{{RootCmd|command=mount -o subvol=@ /dev/sdyC /mnt}}}}&lt;br /&gt;
Then - if applicable - mount ''boot''&lt;br /&gt;
{{RootCmd|command=mount /dev/sdyB /mnt/boot}}&lt;br /&gt;
Then - if applicable - mount ''efi''&lt;br /&gt;
{{RootCmd|command=mount /dev/sdyA /mnt/boot/efi}}&lt;br /&gt;
Create the chroot environment and use bash as shell&lt;br /&gt;
{{RootCmd|command=manjaro-chroot /mnt /bin/bash}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Reinstall GRUB== &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
One possible cause why you are reading this document - is an unfinished update - which in turn can be caused by several situations - situation we will not dive into. To fix what ever caused this you should run a full system update including grub to ensure everything is in place.&lt;br /&gt;
{{RootCmd|command=pacman -Syu grub}}&lt;br /&gt;
When the transaction as completed continue below using the section matching your system&lt;br /&gt;
===BIOS System===&lt;br /&gt;
On a BIOS/GPT system there is no MBR and therefore no place to store the loader. The GPT partition specification allows for an unformatted partition of the BIOS boot partition type (0xEF02). The size of this partition can be as small as 1 mebibyte. The Calamares installer uses a fixed size of 32 mebibyte. On a BIOS/MBR system a part of the bootloader is written to the Master Boot Record for the primary disk.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
The device is the '''disk''' ('''not a partition''')&lt;br /&gt;
{{RootCmd|command=grub-install --force --target=i386-pc --recheck --boot-directory=/boot /dev/sdy}}&lt;br /&gt;
Make sure the grub configuration is up-to-date&lt;br /&gt;
{{RootCmd|command=grub-mkconfig -o /boot/grub/grub.cfg}}&lt;br /&gt;
&lt;br /&gt;
===EFI System=== &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
{{Important|You need to be in chroot for this procedure.}}&lt;br /&gt;
Reinstall grub&lt;br /&gt;
{{RootCmd|command=grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck}}&lt;br /&gt;
Update the grub configuration&lt;br /&gt;
{{RootCmd|command=grub-mkconfig -o /boot/grub/grub.cfg}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
{{BoxWarning|EFI grub install messages|EFI variables are not supported on this system.}}&lt;br /&gt;
Verify the existance of an EFI system partition&lt;br /&gt;
{{RootCmd|command=lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME}}&lt;br /&gt;
Verify the efi filesystem is loaded&lt;br /&gt;
{{RootCmd|command=ls /sys/firmware/efi}}&lt;br /&gt;
Exit chroot&lt;br /&gt;
{{RootCmd|command=exit}}&lt;br /&gt;
Try loading the efi filesystem&lt;br /&gt;
{{RootCmd|command=modprobe efivarfs}}&lt;br /&gt;
Re-enter chroot &lt;br /&gt;
{{RootCmd|command=manjaro-chroot /mnt /bin/bash}}&lt;br /&gt;
Then mount the efi filesystem&lt;br /&gt;
{{RootCmd|command=mount -t efivarfs efivarfs /sys/firmware/efi/efivars}}&lt;br /&gt;
Verify the efi filesystem is loaded&lt;br /&gt;
{{RootCmd|command=ls /sys/firmware/efi}}&lt;br /&gt;
If successfull re-run above installation commands&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting== &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
=== Arch Linux is not recognized ===&lt;br /&gt;
If Arch Linux wasn't recognized after an update-grub then probably your Arch installation is missing the package lsb-release.&lt;br /&gt;
&lt;br /&gt;
==See also== &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
* [http://wiki.manjaro.org/index.php?title=UEFI_-_Install_Guide UEFI Install Guide]&lt;br /&gt;
* [https://wiki.archlinux.org/index.php/GRUB GRUB on Arch wiki]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
[[Category:Contents Page{{#translation:}}]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Manjaro_Online&amp;diff=35240</id>
		<title>Manjaro Online</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Manjaro_Online&amp;diff=35240"/>
		<updated>2022-04-19T11:44:32Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Update Telegram description because no offer of general support there&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages&amp;gt;中文（简体）&amp;lt;/languages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SectionTemplate|&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt; [[File:Org.communia.ttrssPocket.png|left|36px]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:1--&amp;gt; Manjaro Contact&amp;lt;/translate&amp;gt;|&lt;br /&gt;
{{FlexSideContainerTemplate|&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
* [https://manjaro.org/news/ The Official Manjaro Blog]&lt;br /&gt;
: ''Keep up with the latest news and developments. ''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
* '''[https://t.me/manjaro_official Manjaro Telegram]'''&lt;br /&gt;
: ''Public official Manjaro group for general socializing and off topic.''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
* '''[[Manjaro Forums]]'''&lt;br /&gt;
: ''A place to post queries and communicate with the developers and users of Manjaro.''&amp;lt;/translate&amp;gt;|&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
* [https://www.reddit.com/r/ManjaroLinux Manjaro Reddit]&lt;br /&gt;
: ''A crowdsourced collection of Manjaro related content''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
* [https://twitter.com/ManjaroLinux Manjaro Twitter]&lt;br /&gt;
:  ''We tweet too!''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
* [https://www.facebook.com/ManjaroLinux Manjaro Facebook]&lt;br /&gt;
: ''Like and share your opinions on Facebook.''&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
|2|2}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page{{#translation:}}]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Pacman_troubleshooting&amp;diff=29413</id>
		<title>Pacman troubleshooting</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Pacman_troubleshooting&amp;diff=29413"/>
		<updated>2021-12-16T18:57:35Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: removed gnupg from pacman command, added  $HOME/.cache/pkg/ instead of  $HOME/.cache/,&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
= Software Installation = &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Various issues relating to the download and installation of software packages from the Manjaro repositories are dealt with here.&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;Unrecognized archive format&amp;quot; Error == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
It has ocurred more than once, an update is issuing these messages in a seemingly never ending stream.&lt;br /&gt;
[https://forum.manjaro.org/t/pacman-could-not-open-file-sync-files/20046 Pacman could not open file: sync files]&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
error: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive format&lt;br /&gt;
 error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format&lt;br /&gt;
 error: could not open file /var/lib/pacman/sync/community.db: Unrecognized archive format&lt;br /&gt;
 error: could not open file /var/lib/pacman/sync/multilib.db: Unrecognized archive format&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
The error relates to a mismatch in the information contained in the db files at the mentioned location and the db files at the first mirror in your mirrorlist. Pacman checks a package in the database and sees if the signature file matches the one in the database. If it does not, then pacman will say the package is corrupted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
While it sometimes is possible to fix the issue simply by deleting the files and the running a pacman update it far from every time.&lt;br /&gt;
&lt;br /&gt;
=== One recipe for fixing this === &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
It is mandatory to ensure that the keyrings is current. By ensuring the keyrings are in shape and then redownloading the databases we reestablish the chain of trust between the keyrings and the packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
'''You will have to find the correct names by looking at'''&lt;br /&gt;
 Browse [https://mirror.netzspielplatz.de/manjaro/packages/pool/overlay https://mirror.netzspielplatz.de/manjaro/packages/pool/overlay] for the current manjaro-keyring&lt;br /&gt;
and&lt;br /&gt;
 Browse [https://mirror.netzspielplatz.de/manjaro/packages/pool/sync https://mirror.netzspielplatz.de/manjaro/packages/pool/sync] for the current archlinux-keyring&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
'''Replace yyyymmdd and x with the info found at the above links'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
sudo pacman -U https://mirror.netzspielplatz.de/manjaro/packages/pool/overlay/manjaro-keyring-yyyymmdd-x-any.pkg.tar.xz&lt;br /&gt;
 sudo pacman -U https://mirror.netzspielplatz.de/manjaro/packages/pool/sync/archlinux-keyring-yyyymmdd-x-any.pkg.tar.xz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
'''Remove your faulty databases'''&lt;br /&gt;
 sudo rm -f /var/lib/pacman/sync/*&lt;br /&gt;
'''Download the databases and update the system'''&lt;br /&gt;
 sudo pacman -Syyu&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;Unable to lock database&amp;quot; Error == &amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
When downloading and installing software from the repositories, a special database lock file will be created in order to ensure that the current installation process is the only one running at that time. Otherwise, attempting to install multiple files from multiple sources simultaneously may corrupt the downloaded files, cause file conflicts - or worse still - damage your system. Once the installation has been completed, the lock file will then be automatically deleted. This error may therefore occur due to two possible reasons:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
* Another installation is still taking place and has not yet finished, or&lt;br /&gt;
* A previous installation attempt had not finished properly (e.g. due to being aborted early)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
It is therefore wise to first check to ensure that another installation is not (or had not been) in process at the time of the error. When satisfied that this is not the case, then the database lock file can be manually deleted. To do so, open up the terminal and enter the following command:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
sudo rm /var/lib/pacman/db.lck&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
Once done, you should now be able to successfully re-attempt your intended installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors about Keys == &amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
We all have our own unique signatures which are used to authenticate who we are and to prevent fraudulent or even malicious activities by others. This is also the case with software packages available from the software repositories. They all contain encrypted codes (signature keys) unique to their developers to ensure that they are authentic and not malicious in nature. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
During the installation process, once any software packages have been downloaded, your system will first check their signature keys to ensure that they are authentic prior to actually installing them. If a signature key cannot be verified for any reason, then the installation process will be aborted. This problem will usually occur due to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
* one or more signature keys contained in your system's database being revoked, changed, corrupted, or out of date &lt;br /&gt;
* one or more software packages not having been signed off properly when placed in a repository&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Where a package has not been signed off properly before being placed in a repository, it will be the responsibility of the developer(s) to correct this. However, as this problem will be more than likely due to a problem with your system's verification of a signiture key, this can be solved in three easy steps. Working net connection is required. Once you have opened your terminal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
{{Warning|The following commands only work, when your system time is set correctly! }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
&amp;lt;s&amp;gt;'''1. Remove old (and possibly broken) keys''' by entering this command:&lt;br /&gt;
 &lt;br /&gt;
 sudo rm -r /etc/pacman.d/gnupg &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
'''2. Reinstall keyrings including the latest keys''':&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
sudo pacman -Sy gnupg archlinux-keyring manjaro-keyring&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
'''2. Initialize the pacman keyring''':&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
sudo pacman-key --init &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
'''4. Load the signature keys''':&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
sudo pacman-key --populate archlinux manjaro &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
'''5. Refresh and update the signature keys''': &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
sudo pacman-key --refresh-keys &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
'''6. Clear out the software packages downloaded during the aborted installation''' (optional): &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
sudo pacman -Sc&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BoxInfo|Info|Improved version added, since it doesn't work that way above. The packages are signed and since '''/etc/pacman.d/gnupg''' has been removed, it cannot be installed due the check. Instead editing the '''/etc/pacman.conf''' and lowering the SigLevel, it would be better installing the keyrings without a check manually to overcome this problem.}}&lt;br /&gt;
&lt;br /&gt;
'''1. Remove old (and possibly broken) keys''' by entering this command:&lt;br /&gt;
 &lt;br /&gt;
 sudo rm -r /etc/pacman.d/gnupg &lt;br /&gt;
&lt;br /&gt;
'''2. Initialize the pacman keyring''':&lt;br /&gt;
 &lt;br /&gt;
 sudo pacman-key --init &lt;br /&gt;
&lt;br /&gt;
'''3. Download the packages:'''&lt;br /&gt;
{{BoxInfo|Info| GPG check errors can be ignored, since it only downloads the keyring packages.}}&lt;br /&gt;
 &lt;br /&gt;
 mkdir -pv $HOME/.cache/pkg/ &amp;amp;&amp;amp; sudo pacman -Syw archlinux-keyring manjaro-keyring --cachedir $HOME/.cache/pkg/&lt;br /&gt;
&lt;br /&gt;
'''4. Remove the signatures:'''&lt;br /&gt;
{{BoxInfo|Info| Signatures must be removed to avoid the automatic check of the packages.}}&lt;br /&gt;
 &lt;br /&gt;
 rm -f $HOME/.cache/pkg/*.sig&lt;br /&gt;
&lt;br /&gt;
'''5. Install the downloaded packages manually:&lt;br /&gt;
{{BoxInfo|Info|This will also trigger the populate process.}}&lt;br /&gt;
 sudo pacman -U $HOME/.cache/pkg/*.tar.zst&lt;br /&gt;
&lt;br /&gt;
'''6. Clear out the software packages downloaded during the aborted installation''' (optional): &lt;br /&gt;
{{warning|The above command clears the pacman cache completely, and one will not be able to downgrade to a previous version of a package if required. Instead packages that are causing signing errors can be removed individually when upgrading.}}&lt;br /&gt;
 &lt;br /&gt;
 sudo pacman -Sc&lt;br /&gt;
 &lt;br /&gt;
'''7. Remove the custom package folder:''' (optional): &lt;br /&gt;
 &lt;br /&gt;
 sudo rm -Rf $HOME/.cache/pkg/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
After that try running '''sudo pacman -Syu''' to see if the errors were resolved.&lt;br /&gt;
&lt;br /&gt;
== Conflicting files - ''FILENAME'' exists in filesystem == &amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
'''If you cant can't install or update a package because of an error like this:'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
error: could not prepare transaction&lt;br /&gt;
 error: failed to commit transaction (conflicting files)&lt;br /&gt;
 libname: /insert/file/name/here exists in filesystem&lt;br /&gt;
 Errors occurred, no packages were upgraded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
Then the package manager, pacman, has detected an unexpected file that already exists on the disk.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
'''Why is this happening?'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
By design pacman will '''not''' overwrite files that already exist. This is a design feature, not a flaw - package managers are designed to keep track of installed files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:45--&amp;gt;&lt;br /&gt;
This issue normally happens because you've manually added, copied, or created a file. It can also happen when you install software using a downloaded executable, run a make install, or use a third-party package system such as conda. It also occurs when you install an AUR package which installs files that conflict with a repo package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
When using a third-party installer you should always specify an alternative installation location, such as under your home directory, or under /opt or /usr/local/. Never install directly under / or /usr.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
'''How can I fix this?'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
The first step is to identify which, if any, package owns the file. This can be easily done with:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
pacman -Qo /path/to/file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
If this identifies a conflicting package you can decide to remove it with pacman -R. If no package is identified you can delete the file (or move it to a backup location).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
'''Where can I read more?'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
This post was inspired by (and adapted from):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
https://bbs.archlinux.org/viewtopic.php?id=56373143&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
The above post also has links to further reading.&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;Configuration file...not recognized&amp;quot; Error == &amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
Manjaro's package manager - '''[[pacman]]''' - uses a file called ''mirrorlist'' to tell it the internet addresses of the Manjaro servers in order to download updates and software applications from them. This error will therefore occur if one or more server addresses contained in the mirrorlist file have not been listed properly, resulting in pacman being unable to connect to them. Another tell-tale sign is that this problem will also be encountered immediately after:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
* Installing Manjaro and editing the mirrorlist file during installation, or&lt;br /&gt;
* Editing the mirrorlist file at a later time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
See the [[Change to a Different Download Server]] guide for more detailed information on how to correctly select and enable another Manjaro server for downloading.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;GPGME error: No data&amp;quot; Error == &amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
The most likely cause of this issue is that an error or corruption has been detected by ''pacman'' in one or more software packages being downloaded. Package signatures and checksums are used to verify the validity of downloaded software, and should they fail, the installation attempt will be aborted to protect your system until the matter is resolved.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Basic Resolution === &amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:62--&amp;gt;&lt;br /&gt;
To resolve this issue, first follow the basic procedure provided below. If this does not work, then there is a more comprehensive procedure available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
1. Download the package databases and update your system:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
sudo pacman -Syyu&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
2. Clear out the software packages downloaded during the aborted installation by entering the command: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:66--&amp;gt;&lt;br /&gt;
sudo pacman -Sc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
3. Re-attempt the aborted download.&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Comprehensive Resolution === &amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:69--&amp;gt;&lt;br /&gt;
If the basic proceedure still does not resolve the matter, further steps are available:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
1. Resynchronise with the Manjaro servers to ensure that everything is up to date by entering the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
sudo pacman -Syy&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
2. Refresh and update the signature keys by entering the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
sudo pacman-key --refresh-keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
3. Reload the signature keys by entering the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
sudo pacman-key --populate archlinux manjaro&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
4. Clear out the software packages downloaded during the aborted installation by entering the command: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
sudo pacman -Sc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
5. Re-attempt the aborted download.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
If the error still persists, then it is recommended to '''[[Change to a Different Download Server]]'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;keyserver refresh failed: No dirmngr&amp;quot; Error == &amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
Try running the following command:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:82--&amp;gt;&lt;br /&gt;
sudo dirmngr &amp;lt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See Also = &amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
* '''[[Change to a Different Download Server]]'''&lt;br /&gt;
* '''[[Pacman-mirrors|Reference Guide for pacman-mirrors]]'''&lt;br /&gt;
* '''[https://wiki.archlinux.org/index.php/Pacman#Troubleshooting Arch wiki for more comprehensive troubleshooting]'''&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
[[Category:Contents Page{{#translation:}}]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Pacman_troubleshooting&amp;diff=29408</id>
		<title>Pacman troubleshooting</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Pacman_troubleshooting&amp;diff=29408"/>
		<updated>2021-12-13T22:43:01Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Added improved sequence to fix broken keyrings&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
= Software Installation = &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Various issues relating to the download and installation of software packages from the Manjaro repositories are dealt with here.&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;Unrecognized archive format&amp;quot; Error == &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
It has ocurred more than once, an update is issuing these messages in a seemingly never ending stream.&lt;br /&gt;
[https://forum.manjaro.org/t/pacman-could-not-open-file-sync-files/20046 Pacman could not open file: sync files]&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
error: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive format&lt;br /&gt;
 error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format&lt;br /&gt;
 error: could not open file /var/lib/pacman/sync/community.db: Unrecognized archive format&lt;br /&gt;
 error: could not open file /var/lib/pacman/sync/multilib.db: Unrecognized archive format&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
The error relates to a mismatch in the information contained in the db files at the mentioned location and the db files at the first mirror in your mirrorlist. Pacman checks a package in the database and sees if the signature file matches the one in the database. If it does not, then pacman will say the package is corrupted.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
While it sometimes is possible to fix the issue simply by deleting the files and the running a pacman update it far from every time.&lt;br /&gt;
&lt;br /&gt;
=== One recipe for fixing this === &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
It is mandatory to ensure that the keyrings is current. By ensuring the keyrings are in shape and then redownloading the databases we reestablish the chain of trust between the keyrings and the packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
'''You will have to find the correct names by looking at'''&lt;br /&gt;
 Browse [https://mirror.netzspielplatz.de/manjaro/packages/pool/overlay https://mirror.netzspielplatz.de/manjaro/packages/pool/overlay] for the current manjaro-keyring&lt;br /&gt;
and&lt;br /&gt;
 Browse [https://mirror.netzspielplatz.de/manjaro/packages/pool/sync https://mirror.netzspielplatz.de/manjaro/packages/pool/sync] for the current archlinux-keyring&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
'''Replace yyyymmdd and x with the info found at the above links'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
sudo pacman -U https://mirror.netzspielplatz.de/manjaro/packages/pool/overlay/manjaro-keyring-yyyymmdd-x-any.pkg.tar.xz&lt;br /&gt;
 sudo pacman -U https://mirror.netzspielplatz.de/manjaro/packages/pool/sync/archlinux-keyring-yyyymmdd-x-any.pkg.tar.xz&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
'''Remove your faulty databases'''&lt;br /&gt;
 sudo rm -f /var/lib/pacman/sync/*&lt;br /&gt;
'''Download the databases and update the system'''&lt;br /&gt;
 sudo pacman -Syyu&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;Unable to lock database&amp;quot; Error == &amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
When downloading and installing software from the repositories, a special database lock file will be created in order to ensure that the current installation process is the only one running at that time. Otherwise, attempting to install multiple files from multiple sources simultaneously may corrupt the downloaded files, cause file conflicts - or worse still - damage your system. Once the installation has been completed, the lock file will then be automatically deleted. This error may therefore occur due to two possible reasons:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
* Another installation is still taking place and has not yet finished, or&lt;br /&gt;
* A previous installation attempt had not finished properly (e.g. due to being aborted early)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
It is therefore wise to first check to ensure that another installation is not (or had not been) in process at the time of the error. When satisfied that this is not the case, then the database lock file can be manually deleted. To do so, open up the terminal and enter the following command:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
sudo rm /var/lib/pacman/db.lck&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
Once done, you should now be able to successfully re-attempt your intended installation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Errors about Keys == &amp;lt;!--T:20--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:21--&amp;gt;&lt;br /&gt;
We all have our own unique signatures which are used to authenticate who we are and to prevent fraudulent or even malicious activities by others. This is also the case with software packages available from the software repositories. They all contain encrypted codes (signature keys) unique to their developers to ensure that they are authentic and not malicious in nature. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:22--&amp;gt;&lt;br /&gt;
During the installation process, once any software packages have been downloaded, your system will first check their signature keys to ensure that they are authentic prior to actually installing them. If a signature key cannot be verified for any reason, then the installation process will be aborted. This problem will usually occur due to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
* one or more signature keys contained in your system's database being revoked, changed, corrupted, or out of date &lt;br /&gt;
* one or more software packages not having been signed off properly when placed in a repository&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:24--&amp;gt;&lt;br /&gt;
Where a package has not been signed off properly before being placed in a repository, it will be the responsibility of the developer(s) to correct this. However, as this problem will be more than likely due to a problem with your system's verification of a signiture key, this can be solved in three easy steps. Working net connection is required. Once you have opened your terminal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:25--&amp;gt;&lt;br /&gt;
{{Warning|The following commands only work, when your system time is set correctly! }}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:26--&amp;gt;&lt;br /&gt;
&amp;lt;s&amp;gt;'''1. Remove old (and possibly broken) keys''' by entering this command:&lt;br /&gt;
 &lt;br /&gt;
 sudo rm -r /etc/pacman.d/gnupg &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
'''2. Reinstall keyrings including the latest keys''':&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
sudo pacman -Sy gnupg archlinux-keyring manjaro-keyring&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:29--&amp;gt;&lt;br /&gt;
'''2. Initialize the pacman keyring''':&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:30--&amp;gt;&lt;br /&gt;
sudo pacman-key --init &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:31--&amp;gt;&lt;br /&gt;
'''4. Load the signature keys''':&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
sudo pacman-key --populate archlinux manjaro &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
'''5. Refresh and update the signature keys''': &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
sudo pacman-key --refresh-keys &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
'''6. Clear out the software packages downloaded during the aborted installation''' (optional): &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:36--&amp;gt;&lt;br /&gt;
sudo pacman -Sc&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{BoxInfo|INFO|Improved version added, since it doesn't work that way above. The packages are signed and since '''/etc/pacman.d/gnupg''' has been removed, it cannot be installed due the check. Instead editing the '''/etc/pacman.conf''' and lowering the SigLevel, it would be better installing the keyrings without a check manually to overcome this problem.}}&lt;br /&gt;
&lt;br /&gt;
'''1. Remove old (and possibly broken) keys''' by entering this command:&lt;br /&gt;
 &lt;br /&gt;
 sudo rm -r /etc/pacman.d/gnupg &lt;br /&gt;
&lt;br /&gt;
'''2. Initialize the pacman keyring''':&lt;br /&gt;
 &lt;br /&gt;
 sudo pacman-key --init &lt;br /&gt;
&lt;br /&gt;
'''3. Download the packages:'''&lt;br /&gt;
 &lt;br /&gt;
 sudo pacman -Syw gnupg archlinux-keyring manjaro-keyring --cachedir $HOME/.cache/&lt;br /&gt;
&lt;br /&gt;
'''4. Remove the signatures:'''&lt;br /&gt;
 &lt;br /&gt;
 rm -f $HOME/.cache/*.sig&lt;br /&gt;
&lt;br /&gt;
'''5. Install the downloaded packages manually:&lt;br /&gt;
{{BoxInfo|INFO|This will also trigger the populate process.}}&lt;br /&gt;
 sudo pacman -U $HOME/.cache/*.tar.zst&lt;br /&gt;
&lt;br /&gt;
'''6. Clear out the software packages downloaded during the aborted installation''' (optional): &lt;br /&gt;
 &lt;br /&gt;
 sudo pacman -Sc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:37--&amp;gt;&lt;br /&gt;
{{warning|The above command clears the pacman cache completely, and one will not be able to downgrade to a previous version of a package if required. Instead packages that are causing signing errors can be removed individually when upgrading.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:38--&amp;gt;&lt;br /&gt;
After that try running '''sudo pacman -Syu''' to see if the errors were resolved.&lt;br /&gt;
&lt;br /&gt;
== Conflicting files - ''FILENAME'' exists in filesystem == &amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
'''If you cant can't install or update a package because of an error like this:'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
error: could not prepare transaction&lt;br /&gt;
 error: failed to commit transaction (conflicting files)&lt;br /&gt;
 libname: /insert/file/name/here exists in filesystem&lt;br /&gt;
 Errors occurred, no packages were upgraded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
Then the package manager, pacman, has detected an unexpected file that already exists on the disk.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
'''Why is this happening?'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
By design pacman will '''not''' overwrite files that already exist. This is a design feature, not a flaw - package managers are designed to keep track of installed files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:45--&amp;gt;&lt;br /&gt;
This issue normally happens because you've manually added, copied, or created a file. It can also happen when you install software using a downloaded executable, run a make install, or use a third-party package system such as conda. It also occurs when you install an AUR package which installs files that conflict with a repo package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
When using a third-party installer you should always specify an alternative installation location, such as under your home directory, or under /opt or /usr/local/. Never install directly under / or /usr.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
'''How can I fix this?'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
The first step is to identify which, if any, package owns the file. This can be easily done with:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:49--&amp;gt;&lt;br /&gt;
pacman -Qo /path/to/file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:50--&amp;gt;&lt;br /&gt;
If this identifies a conflicting package you can decide to remove it with pacman -R. If no package is identified you can delete the file (or move it to a backup location).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
'''Where can I read more?'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
This post was inspired by (and adapted from):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
https://bbs.archlinux.org/viewtopic.php?id=56373143&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
The above post also has links to further reading.&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;Configuration file...not recognized&amp;quot; Error == &amp;lt;!--T:55--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:56--&amp;gt;&lt;br /&gt;
Manjaro's package manager - '''[[pacman]]''' - uses a file called ''mirrorlist'' to tell it the internet addresses of the Manjaro servers in order to download updates and software applications from them. This error will therefore occur if one or more server addresses contained in the mirrorlist file have not been listed properly, resulting in pacman being unable to connect to them. Another tell-tale sign is that this problem will also be encountered immediately after:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
* Installing Manjaro and editing the mirrorlist file during installation, or&lt;br /&gt;
* Editing the mirrorlist file at a later time.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
See the [[Change to a Different Download Server]] guide for more detailed information on how to correctly select and enable another Manjaro server for downloading.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;GPGME error: No data&amp;quot; Error == &amp;lt;!--T:59--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:60--&amp;gt;&lt;br /&gt;
The most likely cause of this issue is that an error or corruption has been detected by ''pacman'' in one or more software packages being downloaded. Package signatures and checksums are used to verify the validity of downloaded software, and should they fail, the installation attempt will be aborted to protect your system until the matter is resolved.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Basic Resolution === &amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:62--&amp;gt;&lt;br /&gt;
To resolve this issue, first follow the basic procedure provided below. If this does not work, then there is a more comprehensive procedure available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:63--&amp;gt;&lt;br /&gt;
1. Download the package databases and update your system:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:64--&amp;gt;&lt;br /&gt;
sudo pacman -Syyu&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
2. Clear out the software packages downloaded during the aborted installation by entering the command: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:66--&amp;gt;&lt;br /&gt;
sudo pacman -Sc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:67--&amp;gt;&lt;br /&gt;
3. Re-attempt the aborted download.&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Comprehensive Resolution === &amp;lt;!--T:68--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:69--&amp;gt;&lt;br /&gt;
If the basic proceedure still does not resolve the matter, further steps are available:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
1. Resynchronise with the Manjaro servers to ensure that everything is up to date by entering the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
sudo pacman -Syy&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
2. Refresh and update the signature keys by entering the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
sudo pacman-key --refresh-keys&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
3. Reload the signature keys by entering the command:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:75--&amp;gt;&lt;br /&gt;
sudo pacman-key --populate archlinux manjaro&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:76--&amp;gt;&lt;br /&gt;
4. Clear out the software packages downloaded during the aborted installation by entering the command: &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:77--&amp;gt;&lt;br /&gt;
sudo pacman -Sc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:78--&amp;gt;&lt;br /&gt;
5. Re-attempt the aborted download.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:79--&amp;gt;&lt;br /&gt;
If the error still persists, then it is recommended to '''[[Change to a Different Download Server]]'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;keyserver refresh failed: No dirmngr&amp;quot; Error == &amp;lt;!--T:80--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:81--&amp;gt;&lt;br /&gt;
Try running the following command:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!--T:82--&amp;gt;&lt;br /&gt;
sudo dirmngr &amp;lt;/dev/null&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See Also = &amp;lt;!--T:83--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:84--&amp;gt;&lt;br /&gt;
* '''[[Change to a Different Download Server]]'''&lt;br /&gt;
* '''[[Pacman-mirrors|Reference Guide for pacman-mirrors]]'''&lt;br /&gt;
* '''[https://wiki.archlinux.org/index.php/Pacman#Troubleshooting Arch wiki for more comprehensive troubleshooting]'''&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
[[Category:Contents Page{{#translation:}}]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=GRUB/Restore_the_GRUB_Bootloader&amp;diff=29242</id>
		<title>GRUB/Restore the GRUB Bootloader</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=GRUB/Restore_the_GRUB_Bootloader&amp;diff=29242"/>
		<updated>2021-11-12T08:49:01Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: added note at manual mount for btrfs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Overview== &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
In order to load the operating system, a Linux-capable boot loader such as GRUB, rEFInd or Syslinux needs to be installed to the Master Boot Record (MBR) or the GUID Partition Table (GPT) of the media containing the Operating System. Installations created using Manjaro ISO defaults to GRUB.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
For various reasons - it happens the bootloader get's corrupted, erased or misconfigured resulting to a black screen with a failure message during boot, like '''No boot loaders found in /dev/...'''. To restore system operation without re-installing your OS or losing your data you will need to use your Manjaro installation media, such as, a CD/DVD or USB Flashdrive.&lt;br /&gt;
{{BoxSecondary|Archlinux Boot Process|More information about the boot process on Archlinux based distributions is available at [https://wiki.archlinux.org/index.php/Arch_boot_process Archwiki]}}&lt;br /&gt;
&lt;br /&gt;
==Preparation== &amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
Identify the type of system you are attempted to resque as the commands involved are slightly different.&lt;br /&gt;
* BIOS/MBR/GPT system&lt;br /&gt;
* EFI/GPT system&lt;br /&gt;
&lt;br /&gt;
==Load Manjaro Installation Media== &amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
{{BoxSecondary|System Boot Override|To override system boot order the vendor has a dedicated key. Most laptop keyboard has multiple use for the function keys and the primary function may be reversed. In such case a &amp;lt;kbd&amp;gt;Fn&amp;lt;/kbd&amp;gt; key must be used with the function key. If you don't know consult your system documentation. Manjaro ISO default usernames and passwords&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Default Username&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Default Password&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;manjaro&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;manjaro&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;root&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;manjaro&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Identify partitions== &amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
To identify your partitions and their designated use you need to run a partition manager. Depending on environment there is various tools. GTK based ISO offers GpartEd, QT based ISO offers KParted and common to all is the CLI tools.&lt;br /&gt;
{{UserCmd|command=lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME}}&lt;br /&gt;
More comprehensive information can be found using {{ic|fdisk}} (requires superuser) and you can limit the probed device e.g. ''/dev/sda'' or ''/dev/nvme0n1''&lt;br /&gt;
{{UserCmd|command=sudo fdisk -l /dev/sda}}&lt;br /&gt;
The clues to look for is ''mbr'' vs. ''gpt'' and the presence of a small partition - usually the first - formatted with the ''vfat'' filesystem followed by a larger partition formatted as ''ext4''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
{{Important|This document and the content should '''never''' be used as a copy/paste resource. The remainder of this document will use pseudo names and partition numbering. Devices will be referred as '''/dev/sdy''' and partitions referred as '''/dev/sdyA''' and you will have to subtitute those with the real values from your system.}}&lt;br /&gt;
&lt;br /&gt;
==Use root context== &amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
When you have loaded the live ISO - depending on environment - open a terminal and switch to ''root'' context. Use above mentioned root:password combination.&lt;br /&gt;
{{UserCmd|command=su}}&lt;br /&gt;
&lt;br /&gt;
==Chroot environment== &amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
Chroot is a method to restrict various tasks to a restricted area e.g. package installation and other system maintenance tasks. Follow the [https://wiki.archlinux.org/index.php/Change_Root link] to read more about chroot on the Arch wiki.&lt;br /&gt;
===Identify system partitions===&lt;br /&gt;
From the above we assume you have identified the relevant partitions on your system and this document will refer the partitions as follows. Partitions not needed for this kind of maintenance has intentionally been left out (e.g. ''home'', ''swap''). &lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Partition !! Usage !! Comment&lt;br /&gt;
|-&lt;br /&gt;
| {{ic|/dev/sdyA}} || EFI system || Required for EFI system and mounted on ''/boot/efi''&lt;br /&gt;
|-&lt;br /&gt;
| {{ic|/dev/sdyB}} || boot || Optional but mounted on ''/boot'' The primary use is when GRUB cannot write to ''/'' (eg. ''f2fs'')&lt;br /&gt;
|-&lt;br /&gt;
| {{ic|/dev/sdyC}} || root || Required and for the root filesystem and mounted on ''/'' - usually formatted using ''ext4''&lt;br /&gt;
|}&lt;br /&gt;
{{Important|If your system is a BIOS/MBR system there is no efi partition. If your system is a BIOS/GPT system you will find an unformatted partion size 1-32MB of the bios boot partition type.}}&lt;br /&gt;
&lt;br /&gt;
===Manual chroot=== &amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
Mount the partitions using the designated temporary mountpoint and '''always''' start with ''root''&lt;br /&gt;
{{RootCmd|command=mount /dev/sdyC /mnt}}&lt;br /&gt;
{{Important|With a [[Btrfs|BTRFS filesystem]], you should note that the subvolumes must be mounted. That would be in such a case:{{RootCmd|command=mount -o subvol=@ /dev/sdyC /mnt}}}}&lt;br /&gt;
Then - if applicable - mount ''boot''&lt;br /&gt;
{{RootCmd|command=mount /dev/sdyB /mnt/boot}}&lt;br /&gt;
Then - if applicable - mount ''efi''&lt;br /&gt;
{{RootCmd|command=mount /dev/sdyA /mnt/boot/efi}}&lt;br /&gt;
Create the chroot environment and use bash as shell&lt;br /&gt;
{{RootCmd|command=manjaro-chroot /mnt /bin/bash}}&lt;br /&gt;
&lt;br /&gt;
===Use manjaro-chroot=== &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
Manjaro deploys a script called {{ic|manjaro-chroot}} takes an optional argument which will search the visible devices - scan the partitions for signs of an operating system. If more than one Linux operating system is found you will get a choice of which system to chroot otherwise the file ''/etc/fstab'' from the system is used to mount the partitions and chroot into this system.&lt;br /&gt;
{{RootCmd|command=manjaro-chroot -a}}&lt;br /&gt;
&lt;br /&gt;
==Reinstall GRUB== &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
One possible cause why you are reading this document - is an unfinished update - which in turn can be caused by several situations - situation we will not dive into. To fix what ever caused this you should run a full system update including grub to ensure everything is in place.&lt;br /&gt;
{{RootCmd|command=pacman -Syu grub}}&lt;br /&gt;
When the transaction as completed continue below using the section matching your system&lt;br /&gt;
===BIOS System===&lt;br /&gt;
On a BIOS/GPT system there is no MBR and therefore no place to store the loader. The GPT partition specification allows for an unformatted partition of the BIOS boot partition type (0xEF02). The size of this partition can be as small as 1 mebibyte. The Calamares installer uses a fixed size of 32 mebibyte. On a BIOS/MBR system a part of the bootloader is written to the Master Boot Record for the primary disk.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
The device is the '''disk''' ('''not a partition''')&lt;br /&gt;
{{RootCmd|command=grub-install --force --target=i386-pc --recheck --boot-directory=/boot /dev/sdy}}&lt;br /&gt;
Make sure the grub configuration is up-to-date&lt;br /&gt;
{{RootCmd|command=grub-mkconfig -o /boot/grub/grub.cfg}}&lt;br /&gt;
&lt;br /&gt;
===EFI System=== &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
{{Important|You need to be in chroot for this procedure.}}&lt;br /&gt;
Reinstall grub&lt;br /&gt;
{{RootCmd|command=grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck}}&lt;br /&gt;
Update the grub configuration&lt;br /&gt;
{{RootCmd|command=grub-mkconfig -o /boot/grub/grub.cfg}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:14--&amp;gt;&lt;br /&gt;
{{BoxWarning|EFI grub install messages|EFI variables are not supported on this system.}}&lt;br /&gt;
Verify the existance of an EFI system partition&lt;br /&gt;
{{RootCmd|command=lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME}}&lt;br /&gt;
Verify the efi filesystem is loaded&lt;br /&gt;
{{RootCmd|command=ls /sys/firmware/efi}}&lt;br /&gt;
Exit chroot&lt;br /&gt;
{{RootCmd|command=exit}}&lt;br /&gt;
Try loading the efi filesystem&lt;br /&gt;
{{RootCmd|command=modprobe efivarfs}}&lt;br /&gt;
Re-enter chroot &lt;br /&gt;
{{RootCmd|command=manjaro-chroot /mnt /bin/bash}}&lt;br /&gt;
Then mount the efi filesystem&lt;br /&gt;
{{RootCmd|command=mount -t efivarfs efivarfs /sys/firmware/efi/efivars}}&lt;br /&gt;
Verify the efi filesystem is loaded&lt;br /&gt;
{{RootCmd|command=ls /sys/firmware/efi}}&lt;br /&gt;
If successfull re-run above installation commands&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting== &amp;lt;!--T:15--&amp;gt;&lt;br /&gt;
=== Arch Linux is not recognized ===&lt;br /&gt;
If Arch Linux wasn't recognized after an update-grub then probably your Arch installation is missing the package lsb-release.&lt;br /&gt;
&lt;br /&gt;
==See also== &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
* [http://wiki.manjaro.org/index.php?title=UEFI_-_Install_Guide UEFI Install Guide]&lt;br /&gt;
* [https://wiki.archlinux.org/index.php/GRUB GRUB on Arch wiki]&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
[[Category:Contents Page{{#translation:}}]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Swap&amp;diff=28927</id>
		<title>Swap</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Swap&amp;diff=28927"/>
		<updated>2021-09-22T19:50:56Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Added: swapfile -&amp;gt; timeshift compatibility&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Overview= &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Swap space is used to extend the amount of memory(RAM) available for running programs.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt; Without swap space, if you run out of memory, applications ''will'' be terminated up to and including the entire system crashing.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt; With swap space available to the system, the kernel can take less frequently accessed memory pages from inactive applications / services and write them to disk (&amp;quot;swapping&amp;quot; them), allowing more actual RAM to be available for active applications.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:5--&amp;gt; There are three different ways in which swap can be managed in Manjaro:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt; A swap partition&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt; A swap file&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt; zswap&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt; This article tries to be as comprehensive as possible but even more information can be found in the [[&amp;lt;tvar|link&amp;gt;Special:MyLanguage/#See_Also&amp;lt;/&amp;gt;|articles linked below]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Do I Need Swap= &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
That is a question that cannot be answered without having a look at your configuration and even with plenty of available memory, it is often used as a safety net or even sometimes due to specific application requirements so have a look at the following non-exhaustive list:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt; If you use hibernation: ''yes, you need swap!''&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt; If you have services that are not always active, but are still running all the time: ''yes, you need swap!''&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt; If you have an application that allocates virtual memory directly for temporary storage instead of RAM: ''yes, you need swap!''&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt; If you have an application that has a memory leak: ''yes, you need swap!''&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt; If you have a server with 1TB of RAM that you're using as a desktop without applications allocating virtual memory or having memory leaks: ''No, you don't need swap!''&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=How Much Swap do I Need= &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
The amount of swap you need is highly variable based on ''your'' specific applications and workload.  There is no universal formula on swap size without monitoring usage over a period of time.  A reasonable place to start would be:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt; For less then 4GB of physical memory (RAM), it's highly recommended that the swap space should, as a base minimum, be equal to the amount of RAM. Also, it's recommended that the swap space is maximum twice the amount of RAM depending upon the amount of disk space available for the system because of diminishing returns.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:20--&amp;gt; For more modern systems (&amp;gt;4GB), your swap space should be at a minimum be ROUNDUP(SQRT(RAM)) I.E. the square root of your RAM size rounded up to the next GB.  '''However, if you use hibernation''', you need a minimum of physical memory (RAM) size '''plus''' ROUNDUP(SQRT(RAM)). The maximum, is again twice the amount of RAM, again because of diminishing returns.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:21--&amp;gt; The only downside to having more swap space than you will actually use, is the disk space you will be reserving for it cannot be used for application or system data.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:22--&amp;gt; The &amp;quot;diminishing returns&amp;quot; means that if you need more swap space than twice your RAM size, you would be better off adding more RAM as Hard Disk Drive (HDD) access is about 10³ slower then RAM access, so something that would take 1 second, suddenly takes more then 15 minutes! And on a Solid State Drive (SSD) the same operation that took 1 second in RAM will still take about 1 minute on that SSD!&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
Taking into account all of the above, this brings us to the following table:&lt;br /&gt;
(last 3 columns denote swap space)&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt; RAM   No hibernation    With Hibernation  Maximum&amp;lt;/translate&amp;gt;&lt;br /&gt;
        1GB              1GB                 2GB      2GB&lt;br /&gt;
        2GB              2GB                 3GB      4GB&lt;br /&gt;
        3GB              3GB                 5GB      6GB&lt;br /&gt;
        4GB              4GB                 6GB      8GB&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt; RAM   No hibernation    With Hibernation  Maximum&amp;lt;/translate&amp;gt;&lt;br /&gt;
        5GB              2GB                 7GB     10GB&lt;br /&gt;
        6GB              2GB                 8GB     12GB&lt;br /&gt;
        8GB              3GB                11GB     16GB&lt;br /&gt;
       12GB              3GB                15GB     24GB&lt;br /&gt;
       16GB              4GB                20GB     32GB&lt;br /&gt;
       24GB              5GB                29GB     48GB&lt;br /&gt;
       32GB              6GB                38GB     64GB&lt;br /&gt;
       64GB              8GB                72GB    128GB&lt;br /&gt;
      128GB             11GB               139GB    256GB&lt;br /&gt;
      256GB             16GB               272GB    512GB&lt;br /&gt;
      512GB             23GB               535GB      1TB&lt;br /&gt;
        1TB             32GB              1056GB      2TB&lt;br /&gt;
        2TB             46GB              2094GB      4TB&lt;br /&gt;
        4TB             64GB              4160GB      8TB&lt;br /&gt;
        8TB             91GB              8283GB     16TB&lt;br /&gt;
{{note|&amp;lt;translate&amp;gt;&amp;lt;!--T:26--&amp;gt; The largest server one of the authors of this wiki article has ever installed had, indeed, 8TB of RAM and even that machine has the above swap settings, so why not your machine?&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Displaying Swap Information= &amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
The command {{ic|swapon}} will display your current swap information.  For example:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE   USED PRIO&lt;br /&gt;
 /dev/sda7 partition  20G  44.3M   -2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:29--&amp;gt; The following script will:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:30--&amp;gt; show whether zswap is active or not and if active, give zswap parameters if run with the  {{ic|sudo}} command&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:31--&amp;gt; display a list of all applications / services that take up swap and how much they take up in descending order&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Check whether running as root&lt;br /&gt;
 if [ &amp;quot;$(whoami)&amp;quot; = 'root' ]; then&lt;br /&gt;
   dmesg | grep &amp;quot;zswap:&amp;quot; | grep --silent &amp;quot;load&amp;quot;&lt;br /&gt;
   if [[ $? -eq 0 ]]; then&lt;br /&gt;
     # zswap is active&lt;br /&gt;
     echo &amp;quot;zswap information:&amp;quot;&lt;br /&gt;
     grep --recursive --color=none . /sys/kernel/debug/zswap/&lt;br /&gt;
     read -n 1 -s -r -p &amp;quot;Press any key to continue&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;[warning] zwap not active. Continuing&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;[warning] Not running as root: skipping zswap info&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 for szFile in /proc/*/status ; do&lt;br /&gt;
   awk '/VmSwap|Name/{printf $2 &amp;quot;\t&amp;quot; $3}END{ print &amp;quot;&amp;quot; }' &amp;quot;$szFile&amp;quot;&lt;br /&gt;
 done | sort --key 2 --numeric --reverse | more&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Using a Swap Partition= &amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
A swap partition is the traditional way of managing swap.  In this scenario, a dedicated partition (or partitions) are created for holding swap.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Creating and Enabling a Swap Partition== &amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
To create a swap partition, you need enough unallocated disk space to create an additional partition. If you do not have enough space, skip to the next section [[&amp;lt;tvar|link&amp;gt;Special:MyLanguage/#Using_a_swap_file&amp;lt;/&amp;gt;|#Using_a_swap_file]]. A swap partition can be created in any disk management / partition management tool and should be set as type {{ic|linuxswap}}.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt; Once you have a swap partition you will need to initialize the swap partition with {{ic|mkswap}}.  For example, if your swap partition is {{ic|/dev/sda3}}, you could use the command:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo mkswap /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:37--&amp;gt; Next we need to enable the swap partition with the {{ic|swapon}} command. Following our example above this could be done with:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo swapon /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:38--&amp;gt; In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  It is best to use the UUID instead of the device name for this purpose.  You can add the line to fstab manually or using the command:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo bash -c &amp;quot;echo UUID=$(lsblk -no UUID /dev/sda3) none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:96--&amp;gt; If you would like to have more than one swap partition, simply repeat the steps above for any additional partitions.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{note|&amp;lt;translate&amp;gt;&amp;lt;!--T:97--&amp;gt; Be sure to replace /dev/sda3 in the above commands with your actual swap partition.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
{{tip|&amp;lt;translate&amp;gt;&amp;lt;!--T:98--&amp;gt; ''If you're using a HDD'' (spinning rust) put the swap partition *at the beginning of the disk* as the speed of the disk is higher on the inside tracks. On an SSD this doesn't matter.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Using a Swapfile= &amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
Using a swap partition has one major disadvantage:  Changing the size of swap or adding swap requires repartitioning the disk.  In current Linux kernels, it is possible to use a swap file instead of a dedicated partition and as from kernel 2.6 onwards there is no performance difference any more between the two.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Creating and Enabling a Static Swapfile== &amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{tip|&amp;lt;translate&amp;gt;&amp;lt;!--T:42--&amp;gt;&lt;br /&gt;
There is no reason you can't have both a swap partition and a swapfile.  This is an easy way to add more swap without repartitioning.&lt;br /&gt;
&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:43--&amp;gt;&lt;br /&gt;
First create and intialize the file to hold the swap.  For example, to create a 4GB swapfile, you could use the command:&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 sudo dd if=/dev/zero of=/swapfile bs=1M count=4096 status=progress&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:44--&amp;gt;&lt;br /&gt;
Set the appropriate permissions on the file.  It should be readable and writable only by {{ic|root}}.  This can be done with the command:&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 sudo chmod 600 /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:45--&amp;gt;&lt;br /&gt;
Next we need to format and enable the swapfile:&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 sudo mkswap /swapfile&lt;br /&gt;
&lt;br /&gt;
 sudo swapon /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:46--&amp;gt;&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  You can add the line to fstab manually or using the command:&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 sudo bash -c &amp;quot;echo /swapfile none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on BTRFS== &amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:49--&amp;gt; Prior to running the {{ic|fallocate}} step above, you should run these commands:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo truncate -s 0 /swapfile&lt;br /&gt;
 sudo chattr +C /swapfile&lt;br /&gt;
 sudo btrfs property set /swapfile compression none&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:50--&amp;gt; These commands create an empty swapfile, disable COW for that file and ensure that compression is disabled.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|&amp;lt;translate&amp;gt;To stay compatible with Timeshift, it is necessary to create the swapfile outside the root subvolume &amp;quot;@&amp;quot;.&lt;br /&gt;
&amp;lt;tvar|RootCmd&amp;gt;{{RootCmd|command=btrfs subvolume create /@swapfile}}&amp;lt;/&amp;gt;&lt;br /&gt;
Just replace /swapfile with /@swapfile/swapfile.&lt;br /&gt;
&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on ZFS== &amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
zfs doesn't support swapfiles, however you can achieve a similar benefit using a zvol as a swap volume.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
Detailed instructions on how to accomplish this can be found in this [&amp;lt;tvar|link&amp;gt;https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device&amp;lt;/&amp;gt; ZoL guide].&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Automated Swap Management with systemd-swap= &amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{note|&amp;lt;translate&amp;gt;&amp;lt;!--T:55--&amp;gt; Using systemd-swap with on btrfs/zfs or with hibernation support requires special handling beyond the scope of this article&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:56--&amp;gt; It is possible to automatically manage the size of your swapfile using {{ic|systemd-swap}}.  It can create swap files dynamically based on memory needs.  It is also an easy way to enable/manage [[&amp;lt;tvar|link&amp;gt;#Using_zswap_with_systemd-swap&amp;lt;/&amp;gt;|zswap]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Installing and Configuring systemd-swap== &amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
First, install and enable {{ic|systemd-swap}}:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 pamac install systemd-swap&lt;br /&gt;
 sudo systemctl enable systemd-swap.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:59--&amp;gt; Next enable dynamic swap management by creating a file {{ic|/etc/systemd/swap.conf.d/myswap.conf}} with the following parameters:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 zswap_enabled=0&lt;br /&gt;
 zram_enabled=0&lt;br /&gt;
 swapfc_enabled=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:60--&amp;gt; If you would prefer a single command to create this file you could use:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo bash -c 'echo -e &amp;quot;zswap_enabled=0\nzram_enabled=0\nswapfc_enabled=1&amp;quot; &amp;gt; /etc/systemd/swap.conf.d/myswap.conf'&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Remove Other Swap== &amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:62--&amp;gt;&lt;br /&gt;
In order for systemd-swap to be effective you need to remove any traditional swap devices you have.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:63--&amp;gt; To display your current swap devices you can use the command {{ic|swapon}}.  For example, my test machine displays the following:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE USED PRIO&lt;br /&gt;
 /swapfile file        4G   0B   -2&lt;br /&gt;
 /dev/sda3 partition 8.4G   0B   -3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:64--&amp;gt; In this example there are two swap devices.  A swapfile and a swap partition.  To turn them off we can use the command {{ic|swapoff}}.&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo swapoff /swapfile&lt;br /&gt;
 sudo swapoff /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
Next we need to remove them.  &lt;br /&gt;
The swap partition will need to be deleted using your favorite partitioning tool.  You can remove the swapfile by simply deleting it.&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo rm /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:66--&amp;gt; We need to also remove any lines related to swap from {{ic|/etc/fstab}}.  Edit the file with an [[&amp;lt;tvar|link&amp;gt;Special:MyLanguage/Viewing_and_editing_configuration_files&amp;lt;/&amp;gt;|appropriate text editor]] and remove or comment out the lines for the swap space.  In the example above, we would remove these lines:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 UUID=c2430cf1-8ea9-4422-a5c5-5a38779194c3 swap           swap    defaults,noatime 0 2&lt;br /&gt;
 /swapfile none swap defaults 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:67--&amp;gt; Next reboot.  After the reboot, when running {{ic|swapon}} you should see something similiar to the following:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 NAME                           TYPE SIZE USED PRIO&lt;br /&gt;
 /var/lib/systemd-swap/swapfc/1 file 512M   0B   -2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:68--&amp;gt; systemd-swap will add and remove swapfiles as your memory usage dictates.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{note|&amp;lt;translate&amp;gt;&amp;lt;!--T:69--&amp;gt; If you don't delete your existing swap partition it will be automatically activated by systemd even though you have removed it from fstab&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Using zswap with systemd-swap== &amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
zswap is compressed swap kept in RAM. zswap keeps the most frequently used pages in RAM and writes less frequently used pages to the swap space on disk.  In many workloads, this will result in increased swap performance and less wear and tear on SSDs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
To enable zswap with systemd-swap, simply alter the instructions above and set Linux Kernel parameter  zswap_enabled=1&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Tuning &amp;amp; Performance Considerations= &amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
Although swap seems like a great way to expand memory, excessive swap use will cause severe performance degradation, as mentioned before.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:75--&amp;gt; There are couple of parameters that can be used to tune swap utilization.  These are swappiness and vfs_cache_pressure.  To see your current settings for these you can use the following commands:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 cat /proc/sys/vm/swappiness&lt;br /&gt;
 cat /proc/sys/vm/vfs_cache_pressure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:76--&amp;gt; {{ic|swappiness}} controls how likely a page is to be transferred to swap.  This value represents the percentage of the free memory before activating swap. The lower the value, the less swapping is used and the more memory pages are kept in physical memory where:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:77--&amp;gt; 0 disables swap&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:78--&amp;gt; 60 is the default value which is ideal for a server that is memory-starved and running a lot of services&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:79--&amp;gt; 100 is very aggressive swapping.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:80--&amp;gt; For ''most'' desktop computers the recommended value is 10: Theoretically, this means to only start swapping when RAM usage reaches around 90 percent.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:81--&amp;gt; {{ic|vfs_cache_pressure}} used to be a percentage value that controls the tendency of the kernel to ''reclaim'' the memory which is used for caching of directory and inode objects with a default value of 100 on Kernels &amp;lt;5.4. On Kernels &amp;gt;=5.4 can be increased beyond 100.&amp;lt;/translate&amp;gt;  &amp;lt;translate&amp;gt;&amp;lt;!--T:82--&amp;gt; Increasing this value will increase the rate in which these objects are removed from the RAM cache.  Decreasing it will allow these objects to be cached in memory longer, consuming additional RAM over time.&amp;lt;/translate&amp;gt;  &amp;lt;translate&amp;gt;&amp;lt;!--T:83--&amp;gt; Depending on your specific workload, increasing or decreasing this value too far can have significant negative impacts on system performance.&amp;lt;/translate&amp;gt;  &amp;lt;translate&amp;gt;&amp;lt;!--T:84--&amp;gt; Experimentation is needed to find the appropriate balance and the default value is reasonable.  In general, it is more common to optimize swappiness before experimenting with vfs_cache_pressure.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:85--&amp;gt; To set these values you can use the command {{ic|sysctl}}.  For example, to set the swappiness value to 10 you could use:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo sysctl vm.swappiness=10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;translate&amp;gt;&amp;lt;!--T:86--&amp;gt; There is no preset defined answer on the optimal values for these parameters.&amp;lt;/translate&amp;gt;'''  &amp;lt;translate&amp;gt;&amp;lt;!--T:87--&amp;gt; Experimentation is needed to find the optimum configuration for your specific hardware and workload.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=See Also= &amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:89--&amp;gt; The Arch Wiki page on [&amp;lt;tvar|link&amp;gt;https://wiki.archlinux.org/index.php/Swap&amp;lt;/&amp;gt; swap]&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:90--&amp;gt; The Arch Wiki page on [&amp;lt;tvar|link&amp;gt;https://wiki.archlinux.org/index.php/Zswap&amp;lt;/&amp;gt; zswap]&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:91--&amp;gt; The Linux kernel documentation on [&amp;lt;tvar|link&amp;gt;https://www.kernel.org/doc/Documentation/vm/zswap.txt&amp;lt;/&amp;gt; zswap]&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:92--&amp;gt; The Linux kernel documentation on [&amp;lt;tvar|link&amp;gt;https://www.kernel.org/doc/Documentation/sysctl/vm.txt&amp;lt;/&amp;gt; swappiness and vfs_cache_pressure]&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:93--&amp;gt; The openSUSE guide to [&amp;lt;tvar|link&amp;gt;https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.memory.html&amp;lt;/&amp;gt; tuning memory]&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:94--&amp;gt; The [&amp;lt;tvar|link&amp;gt;https://github.com/Nefelim4ag/systemd-swap&amp;lt;/&amp;gt; systemd-swap page]&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:95--&amp;gt; The ZFS on Linux guide on [&amp;lt;tvar|link&amp;gt;https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device&amp;lt;/&amp;gt; Swap Volumes]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page{{#translation:}}]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Main_Page/de&amp;diff=22349</id>
		<title>Main Page/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Main_Page/de&amp;diff=22349"/>
		<updated>2021-04-04T00:59:02Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BoxWarning|Aktualisierung der Manjaro Wiki|Sie könnten ein paar kleinen Änderungen auf der Wiki begegnen. Wie sind dabei die Wiki und die Seiten zu aktualisieren. Alte Seiten und übersetzte Seiten sind unter ''Website can't be added because of restriction.'' verfügbar.&lt;br /&gt;
Danke für ihr Verständnis.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Manjaro Logo--&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;[[File:new_logo_tex.png|center|300px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;languages/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Text box. Latest articles--&amp;gt;&lt;br /&gt;
{{FlexSideContainerTemplate|&lt;br /&gt;
{{FlexBoxTemplate|Neuigkeiten - Die letzten Änderungen|{{Special:RecentChanges/days=100,limit=12,hidebots}}|Aktuell warten '''{{NUMBEROFARTICLES}}''' Artikel hier auf sie. }}|&lt;br /&gt;
&lt;br /&gt;
__TOC__|&lt;br /&gt;
9|&lt;br /&gt;
1}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--========================================================================================--&amp;gt;&lt;br /&gt;
{{SectionTemplate|&lt;br /&gt;
1=Inhaltsseite|&lt;br /&gt;
2=Für eine alphabetisch sortierte Liste aller Wiki Anleitungen klicken Sie bitte [https://wiki.manjaro.org/index.php?title=Category:Contents_Page{{#translation:}} hier]|&lt;br /&gt;
3=Gtk-dialog-info.png&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- SECTIONS --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{FlexBoxTemplate|Los geht's!|&lt;br /&gt;
&lt;br /&gt;
{{SubContentTemplate|Übersicht|&lt;br /&gt;
* '''[[Manjaro|Manjaro Übersicht]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Verschiedene Artikel, um all deine Fragen zu beantworten!''&lt;br /&gt;
&lt;br /&gt;
* '''[[Using Manjaro for Beginners|Manjaro benutzen]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Neu bei Manjaro? Starte hier für einen Überblick!''&lt;br /&gt;
|Manjaro.png}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Second --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SubContentTemplate|Online und Unterstützung|&lt;br /&gt;
* '''[[Manjaro Online|Manjaro Online]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Unser Forum, Twitter, Reddit, und unsere Facebook Konten.''&lt;br /&gt;
&lt;br /&gt;
* '''[https://t.me/manjaro_official Manjaro Telegram]'''&lt;br /&gt;
&lt;br /&gt;
: ''Zusätzliche direkte Unterstützung für Manjaro Benutzer''&lt;br /&gt;
|Dragon-ball-online-global.png}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Third --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SubContentTemplate|Manjaro holen|&lt;br /&gt;
* '''[[Download Manjaro|Manjaro herunterladen]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Wo Sie die neuesten und besten Manjaro finden.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Check a Downloaded ISO Image For Errors|Überprüfe ein heruntergeladenes ISO Abbild auf Fehler]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Überprüfe dein heruntergeladenes Manjaro auf Fehler unter Linux und Windows.''&lt;br /&gt;
|Emblem-downloads.png}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- fourth --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SubContentTemplate|Installation|&lt;br /&gt;
* '''[[Burn an ISO File|Brenne eine ISO-Datei]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Brenne Manjaro auf eine CD/DVD oder auf einen USB-Stick unter Linux oder Windows.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Installation Guides|Installiere Manjaro]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Installations- und Partitionierung-Anleitungen für Anfänger und erfahrene Benutzer.''&lt;br /&gt;
|System-os-installer.png}}|4=flex&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ANOTHER SECTION --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{FlexBoxTemplate|Anpassung und Konfiguration|&lt;br /&gt;
&amp;lt;!-- First --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SubContentTemplate|Hochfahren / Startvorgang|&lt;br /&gt;
* '''[[BIOS and UEFI|BIOS und UEFI]]'''&lt;br /&gt;
&lt;br /&gt;
: '' Wie man die Virtualisierung aktiviert, Manjaro auf Systemen mit Windows 10 laufen lässt und mehr!''&lt;br /&gt;
&lt;br /&gt;
* '''[[Display Managers / Login Screens|Anzeige-Manager / Anmeldebildschirme]]'''    &lt;br /&gt;
&lt;br /&gt;
: ''Installieren oder konfigurieren von MDM, GDM, SDDM, LXDM, and SLiM und wie man dieses umgeht.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Fstab - Use SystemD automount|Fstab - Nutze SystemD zur automatischen Einbindung]]'''&lt;br /&gt;
&lt;br /&gt;
: ''SystemD und /etc/fstab Optionen für die Geräte-Einbindung.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Make GRUB menu &amp;amp; boot-up/down fonts bigger|Größere Schrift für GRUB, das Hochfahren, und das Herunterfahren]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Wie man größe der Schriften beim Hochfahren, Herunterfahren und in GRUB erhöht.''&lt;br /&gt;
|System-shutdown.png}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Second --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SubContentTemplate|DEs / WMs|&lt;br /&gt;
* '''[[Basic Tips for conky|Conky - Grundlegende Tipps]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Conky kann eine Menge nützlicher Informationen auf dem Schreibtisch anzeigen lassen.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Desktop Environments|Desktop-Umgebungen und Fenster-Manager]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Installiere populäre Desktops und übernehme eine ganze Reihe von Desktop spezifischen Konfigurationen.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Set all Qt app's to use GTK+ font &amp;amp; theme settings|Stelle alle QT-Apps so ein, sodass diese GTK+ Schriften und Themen-Enstellungen verwenden.]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Stelle sicher, dass QT-Apps zu den GTK+ Themen der Desktop-Umgebung/Fenster-Manager passen.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Set all Qt app's to use GTK+ font &amp;amp; theme settings|Stelle alle QT-Apps so ein, sodass diese GTK+ Schriften und Themen-Enstellungen verwenden.]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Stelle sicher, dass QT-Apps zu den GTK+ Themen der Desktop-Umgebung/Fenster-Manager passen.''&lt;br /&gt;
|Preferences-desktop-theme-global.png}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Third --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SubContentTemplate|Software Verwaltung|&lt;br /&gt;
* '''[[Repositories and Servers|Repositories and Servers]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Change repositories, find the fastest mirrors, etc.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Pacman|Pacman]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Instructions for using the '''Pac'''kage '''Man'''ager and more.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Graphical Software Managers|Graphical Software Managers]]'''&lt;br /&gt;
&lt;br /&gt;
: ''There's a range of user-friendly software managers available''!&lt;br /&gt;
&lt;br /&gt;
* '''[[Arch User Repository|Arch User Repository]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Learn about and use the AUR.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Flatpak|Flatpak]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Extend your software library using Flatpaks''&lt;br /&gt;
&lt;br /&gt;
* '''[[Snap|Snap]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Install and manage Snaps on Manjaro''&lt;br /&gt;
&lt;br /&gt;
* '''[[Software Applications|Software Applications]]'''&lt;br /&gt;
&lt;br /&gt;
: ''A collection of tips and configurations for many applications''&lt;br /&gt;
|X-content-unix-software.png}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- fourth --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SubContentTemplate|Hardware / MSM|&lt;br /&gt;
* '''[[Manjaro Settings Manager|Manjaro Settings Manager]]'''&lt;br /&gt;
&lt;br /&gt;
: ''MSM can set your Language, User Account, Kernel, Time and Date, Graphics Card Drivers, and more.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Manjaro Hardware Detection|Manjaro Hardware Detection]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Kernels and Drivers.(mhwd)''&lt;br /&gt;
&lt;br /&gt;
* '''[[Configure Graphics Cards|Configure Graphics Cards]]'''&lt;br /&gt;
&lt;br /&gt;
: ''View, install, remove, or reinstall GPU drivers and much more.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Power Management|Power Management]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Got the power? No? Then optimise it!''&lt;br /&gt;
&lt;br /&gt;
* '''[[Printing|Printing]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Enable printing and add printers.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Wacom Tablet And Pen|Wacom Tablet And Pen]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Configuring tablets and pens.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Manjaro-ARM|Manjaro-ARM]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Tips specific to ARM systems''&lt;br /&gt;
|Kali-hardware-hacking-trans.png}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- fifth --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SubContentTemplate|Network / Internet|&lt;br /&gt;
* '''[[Internet Browsers|Internet Browsers]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Security, Customization, and Configuration.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Firewalls|Firewalls]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Firewalls on Manjaro''&lt;br /&gt;
&lt;br /&gt;
* '''[[Sync dynamic IP with openDNS service via ddclient|Sync dynamic IP with openDNS service via ddclient]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Solution for update dynamic IP for openDNS service.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Keyboard and Mouse Sharing|Keyboard and Mouse Sharing]]''' &lt;br /&gt;
&lt;br /&gt;
: ''Use a mouse and keyboard across multiple machines &amp;amp; operating systems.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Networking|Networking]]''' &lt;br /&gt;
&lt;br /&gt;
: ''Managing networking''&lt;br /&gt;
&lt;br /&gt;
* '''[[Using Samba in your File Manager|Using Samba in your File Manager]]''' &lt;br /&gt;
&lt;br /&gt;
: ''How to setup Samba share in your network.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Sharing files with Python|Sharing files with Python]]''' &lt;br /&gt;
&lt;br /&gt;
: ''Using Python's built-in network capabilities to share files.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Using autofs (automount) with NFS|Using autofs (automount) with NFS]]''' &lt;br /&gt;
&lt;br /&gt;
: ''One of the many ways to mount shares.''&lt;br /&gt;
|Preferences-system-network.png}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- sixth --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SubContentTemplate|System / Misc|&lt;br /&gt;
* '''[[Manjaro Polkit Rules|Manjaro Polkit Rules]]''' &lt;br /&gt;
&lt;br /&gt;
: ''The policykity rules implemented by Manjaro''&lt;br /&gt;
&lt;br /&gt;
* '''[[Add a Storage Partition &amp;amp; Modify your System to Suit|Add a Storage Partition &amp;amp; Modify your System to Suit]]''' &lt;br /&gt;
&lt;br /&gt;
: ''How to shrink and add a partition &amp;amp; make Manjaro know where &amp;amp; what it is.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Aliases in .bashrc|Aliases in .bashrc]]''' &lt;br /&gt;
&lt;br /&gt;
: ''Shortcuts for your terminal.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Developer Tools|Developer Tools]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Set of tools used by Manjaro developers and advanced users.''&lt;br /&gt;
&lt;br /&gt;
* '''[[File Systems|File Systems]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Information on different file systems, how they work, and how to use them.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Swap|Managing Swap]]''' &lt;br /&gt;
&lt;br /&gt;
: ''All about swap space''&lt;br /&gt;
&lt;br /&gt;
* '''[[Limit the size of .log files &amp;amp; the journal|Management of the Systemd Journal &amp;amp; of .log files]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Manage Systemd's Journal &amp;amp; syslog-ng's /var/log/*log files.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Linux Security|Linux Security]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Information on root and superuser passwords.''&lt;br /&gt;
&lt;br /&gt;
* '''[[How to mount Windows (NTFS) filesystem due to hibernation|How to mount Windows (NTFS) filesystem due to hibernation]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Solutions &amp;amp; workarounds for various Windows versions.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Keyboard_Shortcuts|Keyboard Shortcuts]]'''&lt;br /&gt;
&lt;br /&gt;
: ''Set custom keyboard bindings.''&lt;br /&gt;
&lt;br /&gt;
* '''[[Viewing and editing configuration files|Viewing and editing configuration files]]'''&lt;br /&gt;
&lt;br /&gt;
: ''How to view and edit files in each Manjaro edition.''&lt;br /&gt;
|Xfce4-settings.png}}&lt;br /&gt;
|4=flex&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ANOTHER SECTION --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{FlexBoxTemplate|Troubleshooting|&lt;br /&gt;
{{SubContentTemplate|Boot / Startup|&lt;br /&gt;
* [[Restore the GRUB Bootloader|Restore the GRUB Bootloader]]&lt;br /&gt;
&lt;br /&gt;
:  ''Can't boot Manjaro? You may be able to repair rather than reinstall!''&lt;br /&gt;
&lt;br /&gt;
* [[Preserve Manjaro Bootloader|Preserve Manjaro Bootloader]]&lt;br /&gt;
&lt;br /&gt;
:  ''Prevent Manjaro's GRUB from being overridden.''&lt;br /&gt;
&lt;br /&gt;
* [[Kernel Fails to Load (pata_acpi error)|Kernel Fails to Load / &amp;quot;Unable to Find Device&amp;quot; Error]]&lt;br /&gt;
&lt;br /&gt;
: ''Solution for a problem that affects certain computers using JMicron chips.''&lt;br /&gt;
|Breeze-settings.png}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Second --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SubContentTemplate|Desktop|&lt;br /&gt;
* [[Various screen tearing fixes|Various screen tearing fixes]]&lt;br /&gt;
&lt;br /&gt;
: ''Hopefully one of these tips will fix your screen tearing problem.''&lt;br /&gt;
&lt;br /&gt;
* [[DMenu - warning: no locale support|DMenu - warning: no locale support]]&lt;br /&gt;
&lt;br /&gt;
: ''A fix for the &amp;quot;no locale support&amp;quot; error in dmenu.''&lt;br /&gt;
|Preferences-desktop-theme-applications.png}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Third --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SubContentTemplate|Software Management|&lt;br /&gt;
* [[pacman troubleshooting|Common Issues and Pacman Troubleshooting]]&lt;br /&gt;
&lt;br /&gt;
: ''[[pacman troubleshooting#&amp;quot;GPGME_error:_No_data&amp;quot; Error|&amp;quot;GPGME_error:_No_data&amp;quot; Error]]''&lt;br /&gt;
&lt;br /&gt;
: ''[[pacman troubleshooting#&amp;quot;Unable to lock database&amp;quot; Error|&amp;quot;Unable to lock database&amp;quot; Error]]''&lt;br /&gt;
&lt;br /&gt;
: ''[[pacman troubleshooting#&amp;quot;Failed to commit transaction (invalid or corrupted package)&amp;quot; Error|&amp;quot;Invalid or corrupted package&amp;quot; Error]]''&lt;br /&gt;
&lt;br /&gt;
: ''[[pacman_troubleshooting#&amp;quot;Configuration_file...not recognized&amp;quot; Error|&amp;quot;Configuration file...not recognized&amp;quot; Error]]''&lt;br /&gt;
&lt;br /&gt;
: ''[[pacman troubleshooting#Conflicting files - FILENAME exists in filesystem|&amp;quot;Conflicting files - FILENAME exists in filesystem&amp;quot; Error]]''&lt;br /&gt;
&lt;br /&gt;
|X-system-software-sources.png}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- fourth --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SubContentTemplate|Hardware|&lt;br /&gt;
* [[Reactivating the Backlight|Screen Brightness is too Dark or Dim]]&lt;br /&gt;
&lt;br /&gt;
: ''The solution for an issue that particularly affects some makes of laptops''.&lt;br /&gt;
&lt;br /&gt;
* [[Did X.server recognise your monitor correctly?|Did X.server recognise your monitor correctly?]]&lt;br /&gt;
&lt;br /&gt;
: ''A quick test in the Terminal''.&lt;br /&gt;
&lt;br /&gt;
* [[ALSA|Advanced Linux Sound Architecture (ALSA)]]&lt;br /&gt;
&lt;br /&gt;
: ''Troubleshooting common issues related to ALSA''.&lt;br /&gt;
|Yast-hardware.png}}&lt;br /&gt;
|4=flex&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ANOTHER SECTION --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{FlexBoxTemplate|More|&lt;br /&gt;
{{SubContentTemplate|Help|&lt;br /&gt;
* [//www.mediawiki.org/wiki/Help:Contents User's Guide]&lt;br /&gt;
&lt;br /&gt;
: ''Full user guide on every aspect of Wiki authorship and maintenance.'' &lt;br /&gt;
&lt;br /&gt;
* [[How to create a new Wiki Page|How to create a new Wiki Page]]&lt;br /&gt;
&lt;br /&gt;
: ''Guide on how to create a new wiki page.''&lt;br /&gt;
|Application-vnd.ms-htmlhelp.png}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Second --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{SubContentTemplate|Others|&lt;br /&gt;
* [[Basic Submission Rules|Basic Submission Rules]]&lt;br /&gt;
&lt;br /&gt;
: ''How to create an account, and the dos and do-nots for Wiki contributors.''&lt;br /&gt;
&lt;br /&gt;
* [[Contributing|Contributing]]&lt;br /&gt;
&lt;br /&gt;
: ''The starting point for those willing to contribute to the wiki.''&lt;br /&gt;
|Caffeine.png}}&lt;br /&gt;
|4=flex&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- to early now [[Category:Top level{{#translation:}}]] --&amp;gt;&lt;br /&gt;
[[Category:Top level{{#translation:}}]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Translations:Main_Page/93/de&amp;diff=22348</id>
		<title>Translations:Main Page/93/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Translations:Main_Page/93/de&amp;diff=22348"/>
		<updated>2021-04-04T00:59:02Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sie könnten ein paar kleinen Änderungen auf der Wiki begegnen. Wie sind dabei die Wiki und die Seiten zu aktualisieren. Alte Seiten und übersetzte Seiten sind unter ''Website can't be added because of restriction.'' verfügbar.&lt;br /&gt;
Danke für ihr Verständnis.&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=User_talk:Oguzkagan&amp;diff=22347</id>
		<title>User talk:Oguzkagan</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=User_talk:Oguzkagan&amp;diff=22347"/>
		<updated>2021-04-03T13:24:25Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: /* Switch to translated page automatically when available */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hello Oguzkagan!&lt;br /&gt;
&lt;br /&gt;
I am pretty new here and tried to do some translations into German, but well, none of them were saved. Is this feature still in testing? I used the translate extension some months ago on a wiki for testing and there must be running runJobs.php constantly so that the translation at  Special:Translate would save it immediately.&lt;br /&gt;
&lt;br /&gt;
I don't know who is responsibly for this, so i start now at your discussion page, because I saw you in the logs recently.&lt;br /&gt;
&lt;br /&gt;
Best regards&lt;br /&gt;
&lt;br /&gt;
[[User:Megavolt|Megavolt]] ([[User talk:Megavolt|talk]]) 04:21, 27 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Thanks for feedback. I broke something when I fixed a few things :). I have been fixed translate problem. Also, I gave you the translator right so moderation extension will not to hinder you. --[[User:Oguzkagan|Oguzkagan]] 12:05, 27 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Thanks for your effort. It works now. --[[User:Megavolt|Megavolt]] ([[User talk:Megavolt|talk]]) 20:11, 27 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
== language links ==&lt;br /&gt;
&lt;br /&gt;
I started to translate the Main Page, but I saw that internal links like '''&amp;lt;nowiki&amp;gt;[[Using Manjaro for Beginners|Using Manjaro]]&amp;lt;/nowiki&amp;gt;''' not using the &amp;quot;Special:MyLanguage/&amp;quot; like this:  '''&amp;lt;nowiki&amp;gt;[[Special:MyLanguage/Using Manjaro for Beginners|&amp;lt;translate&amp;gt;Using Manjaro&amp;lt;/translate&amp;gt;]]&amp;lt;/nowiki&amp;gt;'''. Is there a reason for this? Or is there another method which will be used? Or must the language code added manually? Thanks! ---[[User:Megavolt|Megavolt]] ([[User talk:Megavolt|talk]]) 21:37, 27 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Switch to translated page automatically when available ==&lt;br /&gt;
&lt;br /&gt;
Hello,&lt;br /&gt;
it would be nice if the translate extension would grab the language of ULS and switch automatically to the translated page if available:&lt;br /&gt;
&lt;br /&gt;
 $wgTranslatePageTranslationULS = true&lt;br /&gt;
&lt;br /&gt;
Also nice: geolocate the country and switch to the interface language automatically... (at least for logged users)&lt;br /&gt;
&lt;br /&gt;
 $wgULSGeoService = true;&lt;br /&gt;
&lt;br /&gt;
--[[User:Megavolt|Megavolt]] ([[User talk:Megavolt|talk]]) 07:51, 31 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Thanks, I set the settings. I am not sure it works. --[[User:Oguzkagan|Oguzkagan]] 12:05, 03 April 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Thank you! So good, so far. If I change my language at ULS, it changes also the to the translated text. Now the internal links must contain '''&amp;lt;nowiki&amp;gt;Special:MyLanguage/&amp;lt;/nowiki&amp;gt;'''. So that if the language has been changed, it will detect the selected language and forward to the page of the same language if available, otherwise it will choose the original page. Maybe '''UILangCode''' can be also used in some use cases? Since it grabs the lang code of the interface automatically? Could be useful for transcluding templates of different languages.  --[[User:Megavolt|Megavolt]] ([[User talk:Megavolt|talk]]) 13:24, 3 April 2021 (UTC)&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=User_talk:Oguzkagan&amp;diff=22346</id>
		<title>User talk:Oguzkagan</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=User_talk:Oguzkagan&amp;diff=22346"/>
		<updated>2021-04-03T13:12:25Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: /* language links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hello Oguzkagan!&lt;br /&gt;
&lt;br /&gt;
I am pretty new here and tried to do some translations into German, but well, none of them were saved. Is this feature still in testing? I used the translate extension some months ago on a wiki for testing and there must be running runJobs.php constantly so that the translation at  Special:Translate would save it immediately.&lt;br /&gt;
&lt;br /&gt;
I don't know who is responsibly for this, so i start now at your discussion page, because I saw you in the logs recently.&lt;br /&gt;
&lt;br /&gt;
Best regards&lt;br /&gt;
&lt;br /&gt;
[[User:Megavolt|Megavolt]] ([[User talk:Megavolt|talk]]) 04:21, 27 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Thanks for feedback. I broke something when I fixed a few things :). I have been fixed translate problem. Also, I gave you the translator right so moderation extension will not to hinder you. --[[User:Oguzkagan|Oguzkagan]] 12:05, 27 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Thanks for your effort. It works now. --[[User:Megavolt|Megavolt]] ([[User talk:Megavolt|talk]]) 20:11, 27 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
== language links ==&lt;br /&gt;
&lt;br /&gt;
I started to translate the Main Page, but I saw that internal links like '''&amp;lt;nowiki&amp;gt;[[Using Manjaro for Beginners|Using Manjaro]]&amp;lt;/nowiki&amp;gt;''' not using the &amp;quot;Special:MyLanguage/&amp;quot; like this:  '''&amp;lt;nowiki&amp;gt;[[Special:MyLanguage/Using Manjaro for Beginners|&amp;lt;translate&amp;gt;Using Manjaro&amp;lt;/translate&amp;gt;]]&amp;lt;/nowiki&amp;gt;'''. Is there a reason for this? Or is there another method which will be used? Or must the language code added manually? Thanks! ---[[User:Megavolt|Megavolt]] ([[User talk:Megavolt|talk]]) 21:37, 27 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Switch to translated page automatically when available ==&lt;br /&gt;
&lt;br /&gt;
Hello,&lt;br /&gt;
it would be nice if the translate extension would grab the language of ULS and switch automatically to the translated page if available:&lt;br /&gt;
&lt;br /&gt;
 $wgTranslatePageTranslationULS = true&lt;br /&gt;
&lt;br /&gt;
Also nice: geolocate the country and switch to the interface language automatically... (at least for logged users)&lt;br /&gt;
&lt;br /&gt;
 $wgULSGeoService = true;&lt;br /&gt;
&lt;br /&gt;
--[[User:Megavolt|Megavolt]] ([[User talk:Megavolt|talk]]) 07:51, 31 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
: Thanks, I set the settings. I am not sure it works. --[[User:Oguzkagan|Oguzkagan]] 12:05, 03 April 2021 (UTC)&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Swap&amp;diff=22340</id>
		<title>Swap</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Swap&amp;diff=22340"/>
		<updated>2021-04-02T01:10:07Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Marked this version for translation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Overview= &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Swap space is used to extend the amount of memory(RAM) available for running programs.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt; Without swap space, if you run out of memory, applications ''will'' be terminated up to and including the entire system crashing.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt; With swap space available to the system, the kernel can take less frequently accessed memory pages from inactive applications / services and write them to disk (&amp;quot;swapping&amp;quot; them), allowing more actual RAM to be available for active applications.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:5--&amp;gt; There are three different ways in which swap can be managed in Manjaro:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt; A swap partition&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt; A swap file&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt; zswap&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt; This article tries to be as comprehensive as possible but even more information can be found in the [[&amp;lt;tvar|link&amp;gt;Special:MyLanguage/#See_Also&amp;lt;/&amp;gt;|articles linked below]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Do I Need Swap= &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
That is a question that cannot be answerd without having a look at your configuration and even with plenty of available memory, it is often used as a safety net or even sometimes due to specific application requirements so have a look at the following non-exhaustive list:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt; If you use hibernation: ''yes, you need swap!''&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt; If you have services that are not always active, but are still running all the time: ''yes, you need swap!''&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt; If you have an application that allocates virtual memory directly for temporary storage instead of RAM: ''yes, you need swap!''&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt; If you have an application that has a memory leak: ''yes, you need swap!''&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt; If you have a server with 1TB of RAM that you're using as a desktop without applications allocating virtual memory or having memory leaks: ''No, you don't need swap!''&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=How Much Swap do I Need= &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
The amount of swap you need is highly variable based on ''your'' specific applications and workload.  There is no universal formula on swap size without monitoring usage over a period of time.  A reasonable place to start would be:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt; For less then 4GB of physical memory (RAM), it's highly recommended that the swap space should, as a base minimum, be equal to the amount of RAM. Also, it's recommended that the swap space is maximum twice the amount of RAM depending upon the amount of disk space available for the system because of diminishing returns.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:20--&amp;gt; For more modern systems (&amp;gt;4GB), your swap space should be at a minimum be equal to your physical memory (RAM) size '''if you use hibernation''', otherwise you need a minimum of ROUNDUP(SQRT(RAM)) I.E. the square root of your RAM size rounded up to the next GB. The maximum, is again twice the amount of RAM, again because of diminishing returns.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:21--&amp;gt; The only downside to having more swap space than you will actually use, is the disk space you will be reserving for it cannot be used for application or system data.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:22--&amp;gt; The &amp;quot;diminishing returns&amp;quot; means that if you need more swap space than twice your RAM size, you would be better off adding more RAM as Hard Disk Drive (HDD) access is about 10³ slower then RAM access, so something that would take 1 second, suddenly takes more then 15 minutes! And on a Solid State Drive (SSD) the same operation that took 1 second in RAM will still take about 1 minute on that SSD!&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
Taking into account all of the above, this brings us to the following table:&lt;br /&gt;
(last 3 columns denote swap space)&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt; RAM   No hibernation    With Hibernation  Maximum&amp;lt;/translate&amp;gt;&lt;br /&gt;
        1GB              1GB                 2GB      2GB&lt;br /&gt;
        2GB              2GB                 3GB      4GB&lt;br /&gt;
        3GB              3GB                 5GB      6GB&lt;br /&gt;
        4GB              4GB                 6GB      8GB&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt; RAM   No hibernation    With Hibernation  Maximum&amp;lt;/translate&amp;gt;&lt;br /&gt;
        5GB              2GB                 7GB     10GB&lt;br /&gt;
        6GB              2GB                 8GB     12GB&lt;br /&gt;
        8GB              3GB                11GB     16GB&lt;br /&gt;
       12GB              3GB                15GB     24GB&lt;br /&gt;
       16GB              4GB                20GB     32GB&lt;br /&gt;
       24GB              5GB                29GB     48GB&lt;br /&gt;
       32GB              6GB                38GB     64GB&lt;br /&gt;
       64GB              8GB                72GB    128GB&lt;br /&gt;
      128GB             11GB               139GB    256GB&lt;br /&gt;
      256GB             16GB               272GB    512GB&lt;br /&gt;
      512GB             23GB               535GB      1TB&lt;br /&gt;
        1TB             32GB              1056GB      2TB&lt;br /&gt;
        2TB             46GB              2094GB      4TB&lt;br /&gt;
        4TB             64GB              4160GB      8TB&lt;br /&gt;
        8TB             91GB              8283GB     16TB&lt;br /&gt;
{{note|&amp;lt;translate&amp;gt;&amp;lt;!--T:26--&amp;gt; The largest server one of the authors of this wiki has ever installed had, indeed, 8TB of RAM&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Displaying Swap Information= &amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
The command {{ic|swapon}} will display your current swap information.  For example:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE   USED PRIO&lt;br /&gt;
 /dev/sda7 partition  20G  44.3M   -2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:29--&amp;gt; The following script will:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:30--&amp;gt; show whether zswap is active or not and if active, give zswap parameters if run with the {{$ic|sudo}} command&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:31--&amp;gt; display a list of all applications / services that take up swap and how much they take up in descending order&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Check whether running as root&lt;br /&gt;
 if [ &amp;quot;$(whoami)&amp;quot; = 'root' ]; then&lt;br /&gt;
   dmesg | grep &amp;quot;zswap:&amp;quot; | grep --silent &amp;quot;load&amp;quot;&lt;br /&gt;
   if [[ $? -eq 0 ]]; then&lt;br /&gt;
     # zswap is active&lt;br /&gt;
     echo &amp;quot;zswap information:&amp;quot;&lt;br /&gt;
     grep --recursive --color=none . /sys/kernel/debug/zswap/&lt;br /&gt;
     read -n 1 -s -r -p &amp;quot;Press any key to continue&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;[warning] zwap not active. Continuing&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;[warning] Not running as root: skipping zswap info&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 for szFile in /proc/*/status ; do&lt;br /&gt;
   awk '/VmSwap|Name/{printf $2 &amp;quot;\t&amp;quot; $3}END{ print &amp;quot;&amp;quot; }' &amp;quot;$szFile&amp;quot;&lt;br /&gt;
 done | sort --key 2 --numeric --reverse | more&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Using a Swap Partition= &amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
A swap partition is the traditional way of managing swap.  In this scenario, a dedicated partition (or partitions) are created for holding swap.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Creating and Enabling a Swap Partition== &amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
To create a swap partition, you need enough unallocated disk space to create an additional partition. If you do not have enough space, skip to the next section [[&amp;lt;tvar|link&amp;gt;Special:MyLanguage/#Using_a_swap_file&amp;lt;/&amp;gt;|#Using_a_swap_file]]. A swap partition can be created in any disk management / partition management tool and should be set as type {{ic|linuxswap}}.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt; Once you have a swap partition you will need to initialize the swap partition with {{ic|mkswap}}.  For example, if your swap partition is {{ic|/dev/sda3}}, you could use the command:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo mkswap /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:37--&amp;gt; Next we need to enable the swap partition with the {{ic|swapon}} command. Following our example above this could be done with:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo swapon /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:38--&amp;gt; In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  It is best to use the UUID instead of the device name for this purpose.  You can add the line to fstab manually or using the command:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo bash -c &amp;quot;echo UUID=$(lsblk -no UUID /dev/sda3) none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:96--&amp;gt; If you would like to have more than one swap partition, simply repeat the steps above for any additional partitions.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{note|&amp;lt;translate&amp;gt;&amp;lt;!--T:97--&amp;gt; Be sure to replace /dev/sda3 in the above commands with your actual swap partition.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
{{tip|&amp;lt;translate&amp;gt;&amp;lt;!--T:98--&amp;gt; ''If you're using a HDD'' (spinning rust) put the swap partition *at the beginning of the disk* as the speed of the disk is higher on the inside tracks. On an SSD this doesn't matter.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Using a Swapfile= &amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
Using a swap partition has one major disadvantage:  Changing the size of swap or adding swap requires repartitioning the disk.  In current Linux kernels, it is possible to use a swap file instead of a dedicated partition and as from kernel 2.6 onwards there is no performance difference any more between the two.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Creating and Enabling a Static Swapfile== &amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{tip|&amp;lt;translate&amp;gt;&amp;lt;!--T:42--&amp;gt; There is no reason you can't have both a swap partition and a swapfile.  This is an easy way to add more swap without repartitioning.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:43--&amp;gt; First create and intialize the file to hold the swap.  For example, to create a 4GB swapfile, you could use the command:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo fallocate -l 4G /swapfile&lt;br /&gt;
 sudo mkswap /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:44--&amp;gt; Set the appropriate permissions on the file.  It should be readable and writable only by {{ic|root}}.  This can be done with the command:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo chmod u=rw,go= /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:45--&amp;gt; Next we need to enable the swapfile with the {{ic|swapon}} command.  Following our example above this could be done with:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo swapon /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:46--&amp;gt; In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  You can add the line to fstab manually or using the command:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo bash -c &amp;quot;echo /swapfile none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Swapfiles on BTRFS== &amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:49--&amp;gt; Prior to running the {{ic|fallocate}} step above, you should run these commands:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo truncate -s 0 /swapfile&lt;br /&gt;
 sudo chattr +C /swapfile&lt;br /&gt;
 sudo btrfs property set /swapfile compression none&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:50--&amp;gt; These commands create an empty swapfile, disable COW for that file and ensure that compression is disabled.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Swapfiles on ZFS== &amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
zfs doesn't support swapfiles, however you can achieve a similar benefit using a zvol as a swap volume.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
Detailed instructions on how to accomplish this can be found in this [&amp;lt;tvar|link&amp;gt;https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device&amp;lt;/&amp;gt; ZoL guide].&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Automated Swap Management with systemd-swap= &amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{note|&amp;lt;translate&amp;gt;&amp;lt;!--T:55--&amp;gt; Using systemd-swap with on btrfs/zfs or with hibernation support requires special handling beyond the scope of this article&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:56--&amp;gt; It is possible to automatically manage the size of your swapfile using {{ic|systemd-swap}}.  It can create swap files dynamically based on memory needs.  It is also an easy way to enable/manage [[&amp;lt;tvar|link&amp;gt;#Using_zswap_with_systemd-swap&amp;lt;/&amp;gt;|zswap]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Installing and Configuring systemd-swap== &amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
First, install and enable {{ic|systemd-swap}}:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 pamac install systemd-swap&lt;br /&gt;
 sudo systemctl enable systemd-swap.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:59--&amp;gt; Next enable dynamic swap management by creating a file {{ic|/etc/systemd/swap.conf.d/myswap.conf}} with the following parameters:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 zswap_enabled=0&lt;br /&gt;
 zram_enabled=0&lt;br /&gt;
 swapfc_enabled=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:60--&amp;gt; If you would prefer a single command to create this file you could use:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo bash -c 'echo -e &amp;quot;zswap_enabled=0\nzram_enabled=0\nswapfc_enabled=1&amp;quot; &amp;gt; /etc/systemd/swap.conf.d/myswap.conf'&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Remove Other Swap== &amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:62--&amp;gt;&lt;br /&gt;
In order for systemd-swap to be effective you need to remove any traditional swap devices you have.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:63--&amp;gt; To display your current swap devices you can use the command {{ic|swapon}}.  For example, my test machine displays the following:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE USED PRIO&lt;br /&gt;
 /swapfile file        4G   0B   -2&lt;br /&gt;
 /dev/sda3 partition 8.4G   0B   -3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:64--&amp;gt; In this example there are two swap devices.  A swapfile and a swap partition.  To turn them off we can use the command {{ic|swapoff}}.&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo swapoff /swapfile&lt;br /&gt;
 sudo swapoff /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
Next we need to remove them.  &lt;br /&gt;
The swap partition will need to be deleted using your favorite partitioning tool.  You can remove the swapfile by simply deleting it.&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo rm /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:66--&amp;gt; We need to also remove any lines related to swap from {{ic|/etc/fstab}}.  Edit the file with an [[&amp;lt;tvar|link&amp;gt;Special:MyLanguage/Viewing_and_editing_configuration_files&amp;lt;/&amp;gt;|appropriate text editor]] and remove or comment out the lines for the swap space.  In the example above, we would remove these lines:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 UUID=c2430cf1-8ea9-4422-a5c5-5a38779194c3 swap           swap    defaults,noatime 0 2&lt;br /&gt;
 /swapfile none swap defaults 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:67--&amp;gt; Next reboot.  After the reboot, when running {{ic|swapon}} you should see something similiar to the following:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 NAME                           TYPE SIZE USED PRIO&lt;br /&gt;
 /var/lib/systemd-swap/swapfc/1 file 512M   0B   -2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:68--&amp;gt; systemd-swap will add and remove swapfiles as your memory usage dictates.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{note|&amp;lt;translate&amp;gt;&amp;lt;!--T:69--&amp;gt; If you don't delete your existing swap partition it will be automatically activated by systemd even though you have removed it from fstab&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Using zswap with systemd-swap== &amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
zswap is compressed swap kept in RAM. zswap keeps the most frequently used pages in RAM and writes less frequently used pages to the swap space on disk.  In many workloads, this will result in increased swap performance and less wear and tear on SSDs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
To enable zswap with systemd-swap, simply alter the instructions above and set Linux Kernel parameter {{ic|zswap_enabled=1}}&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Tuning &amp;amp; Performance Considerations= &amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
Although swap seems like a great way to expand memory, excessive swap use will cause severe performance degradation, as mentioned before.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:75--&amp;gt; There are couple of parameters that can be used to tune swap utilization.  These are swappiness and vfs_cache_pressure.  To see your current settings for these you can use the following commands:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 cat /proc/sys/vm/swappiness&lt;br /&gt;
 cat /proc/sys/vm/vfs_cache_pressure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:76--&amp;gt; {{ic|swappiness}} controls how likely a page is to be transferred to swap.  This value represents the percentage of the free memory before activating swap. The lower the value, the less swapping is used and the more memory pages are kept in physical memory where:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:77--&amp;gt; 0 disables swap&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:78--&amp;gt; 60 is the default value which is ideal for a server running a lot of services&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:79--&amp;gt; 100 is very aggressive swapping.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:80--&amp;gt; For ''most'' computers the recommended value is 10: Theoretically, this means to only start swapping when RAM usage reaches around 90 percent.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:81--&amp;gt; {{ic|vfs_cache_pressure}} is a percentage value that controls the tendency of the kernel to ''reclaim'' the memory which is used for caching of directory and inode objects.  The default value is 100.&amp;lt;/translate&amp;gt;  &amp;lt;translate&amp;gt;&amp;lt;!--T:82--&amp;gt; Increasing this value will increase the rate in which these objects are removed from the RAM cache.  Decreasing it will allow these objects to be cached in memory longer, consuming additional RAM over time.&amp;lt;/translate&amp;gt;  &amp;lt;translate&amp;gt;&amp;lt;!--T:83--&amp;gt; Depending on your specific workload, increasing or decreasing this value too far can have significant negative impacts on system performance.&amp;lt;/translate&amp;gt;  &amp;lt;translate&amp;gt;&amp;lt;!--T:84--&amp;gt; Experimentation is needed to find the appropriate balance and the default value is reasonable.  In general, it is more common to optimize swappiness before experimenting with vfs_cache_pressure.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:85--&amp;gt; To set these values you can use the command {{ic|sysctl}}.  For example, to set the swappiness value to 10 you could use:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo sysctl vm.swappiness=10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;translate&amp;gt;&amp;lt;!--T:86--&amp;gt; There is no preset defined answer on the optimal values for these parameters.&amp;lt;/translate&amp;gt;'''  &amp;lt;translate&amp;gt;&amp;lt;!--T:87--&amp;gt; Experimentation is needed to find the optimum configuration for your specific hardware and workload.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=See Also= &amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:89--&amp;gt; The Arch Wiki page on [&amp;lt;tvar|link&amp;gt;https://wiki.archlinux.org/index.php/Swap&amp;lt;/&amp;gt; swap]&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:90--&amp;gt; The Arch Wiki page on [&amp;lt;tvar|link&amp;gt;https://wiki.archlinux.org/index.php/Zswap&amp;lt;/&amp;gt; zswap]&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:91--&amp;gt; The Linux kernel documentation on [&amp;lt;tvar|link&amp;gt;https://www.kernel.org/doc/Documentation/vm/zswap.txt&amp;lt;/&amp;gt; zswap]&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:92--&amp;gt; The Linux kernel documentation on [&amp;lt;tvar|link&amp;gt;https://www.kernel.org/doc/Documentation/sysctl/vm.txt&amp;lt;/&amp;gt; swappiness and vfs_cache_pressure]&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:93--&amp;gt; The openSUSE guide to [&amp;lt;tvar|link&amp;gt;https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.memory.html&amp;lt;/&amp;gt; tuning memory]&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:94--&amp;gt; The [&amp;lt;tvar|link&amp;gt;https://github.com/Nefelim4ag/systemd-swap&amp;lt;/&amp;gt; systemd-swap page]&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:95--&amp;gt; The ZFS on Linux guide on [&amp;lt;tvar|link&amp;gt;https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device&amp;lt;/&amp;gt; Swap Volumes]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Swap&amp;diff=22339</id>
		<title>Swap</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Swap&amp;diff=22339"/>
		<updated>2021-04-02T01:08:21Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: page translations: added some texts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Overview= &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
Swap space is used to extend the amount of memory(RAM) available for running programs.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:3--&amp;gt; Without swap space, if you run out of memory, applications ''will'' be terminated up to and including the entire system crashing.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:4--&amp;gt; With swap space available to the system, the kernel can take less frequently accessed memory pages from inactive applications / services and write them to disk (&amp;quot;swapping&amp;quot; them), allowing more actual RAM to be available for active applications.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:5--&amp;gt; There are three different ways in which swap can be managed in Manjaro:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:6--&amp;gt; A swap partition&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:7--&amp;gt; A swap file&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:8--&amp;gt; zswap&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:9--&amp;gt; This article tries to be as comprehensive as possible but even more information can be found in the [[&amp;lt;tvar|link&amp;gt;Special:MyLanguage/#See_Also&amp;lt;/&amp;gt;|articles linked below]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Do I Need Swap= &amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
That is a question that cannot be answerd without having a look at your configuration and even with plenty of available memory, it is often used as a safety net or even sometimes due to specific application requirements so have a look at the following non-exhaustive list:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:12--&amp;gt; If you use hibernation: ''yes, you need swap!''&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:13--&amp;gt; If you have services that are not always active, but are still running all the time: ''yes, you need swap!''&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:14--&amp;gt; If you have an application that allocates virtual memory directly for temporary storage instead of RAM: ''yes, you need swap!''&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:15--&amp;gt; If you have an application that has a memory leak: ''yes, you need swap!''&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:16--&amp;gt; If you have a server with 1TB of RAM that you're using as a desktop without applications allocating virtual memory or having memory leaks: ''No, you don't need swap!''&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=How Much Swap do I Need= &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
The amount of swap you need is highly variable based on ''your'' specific applications and workload.  There is no universal formula on swap size without monitoring usage over a period of time.  A reasonable place to start would be:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:19--&amp;gt; For less then 4GB of physical memory (RAM), it's highly recommended that the swap space should, as a base minimum, be equal to the amount of RAM. Also, it's recommended that the swap space is maximum twice the amount of RAM depending upon the amount of disk space available for the system because of diminishing returns.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:20--&amp;gt; For more modern systems (&amp;gt;4GB), your swap space should be at a minimum be equal to your physical memory (RAM) size '''if you use hibernation''', otherwise you need a minimum of ROUNDUP(SQRT(RAM)) I.E. the square root of your RAM size rounded up to the next GB. The maximum, is again twice the amount of RAM, again because of diminishing returns.&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:21--&amp;gt; The only downside to having more swap space than you will actually use, is the disk space you will be reserving for it cannot be used for application or system data.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:22--&amp;gt; The &amp;quot;diminishing returns&amp;quot; means that if you need more swap space than twice your RAM size, you would be better off adding more RAM as Hard Disk Drive (HDD) access is about 10³ slower then RAM access, so something that would take 1 second, suddenly takes more then 15 minutes! And on a Solid State Drive (SSD) the same operation that took 1 second in RAM will still take about 1 minute on that SSD!&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:23--&amp;gt;&lt;br /&gt;
Taking into account all of the above, this brings us to the following table:&lt;br /&gt;
(last 3 columns denote swap space)&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;translate&amp;gt;&amp;lt;!--T:24--&amp;gt; RAM   No hibernation    With Hibernation  Maximum&amp;lt;/translate&amp;gt;&lt;br /&gt;
        1GB              1GB                 2GB      2GB&lt;br /&gt;
        2GB              2GB                 3GB      4GB&lt;br /&gt;
        3GB              3GB                 5GB      6GB&lt;br /&gt;
        4GB              4GB                 6GB      8GB&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;translate&amp;gt;&amp;lt;!--T:25--&amp;gt; RAM   No hibernation    With Hibernation  Maximum&amp;lt;/translate&amp;gt;&lt;br /&gt;
        5GB              2GB                 7GB     10GB&lt;br /&gt;
        6GB              2GB                 8GB     12GB&lt;br /&gt;
        8GB              3GB                11GB     16GB&lt;br /&gt;
       12GB              3GB                15GB     24GB&lt;br /&gt;
       16GB              4GB                20GB     32GB&lt;br /&gt;
       24GB              5GB                29GB     48GB&lt;br /&gt;
       32GB              6GB                38GB     64GB&lt;br /&gt;
       64GB              8GB                72GB    128GB&lt;br /&gt;
      128GB             11GB               139GB    256GB&lt;br /&gt;
      256GB             16GB               272GB    512GB&lt;br /&gt;
      512GB             23GB               535GB      1TB&lt;br /&gt;
        1TB             32GB              1056GB      2TB&lt;br /&gt;
        2TB             46GB              2094GB      4TB&lt;br /&gt;
        4TB             64GB              4160GB      8TB&lt;br /&gt;
        8TB             91GB              8283GB     16TB&lt;br /&gt;
{{note|&amp;lt;translate&amp;gt;&amp;lt;!--T:26--&amp;gt; The largest server one of the authors of this wiki has ever installed had, indeed, 8TB of RAM&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Displaying Swap Information= &amp;lt;!--T:27--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:28--&amp;gt;&lt;br /&gt;
The command {{ic|swapon}} will display your current swap information.  For example:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE   USED PRIO&lt;br /&gt;
 /dev/sda7 partition  20G  44.3M   -2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:29--&amp;gt; The following script will:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:30--&amp;gt; show whether zswap is active or not and if active, give zswap parameters if run with the {{$ic|sudo}} command&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:31--&amp;gt; display a list of all applications / services that take up swap and how much they take up in descending order&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Check whether running as root&lt;br /&gt;
 if [ &amp;quot;$(whoami)&amp;quot; = 'root' ]; then&lt;br /&gt;
   dmesg | grep &amp;quot;zswap:&amp;quot; | grep --silent &amp;quot;load&amp;quot;&lt;br /&gt;
   if [[ $? -eq 0 ]]; then&lt;br /&gt;
     # zswap is active&lt;br /&gt;
     echo &amp;quot;zswap information:&amp;quot;&lt;br /&gt;
     grep --recursive --color=none . /sys/kernel/debug/zswap/&lt;br /&gt;
     read -n 1 -s -r -p &amp;quot;Press any key to continue&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;[warning] zwap not active. Continuing&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;[warning] Not running as root: skipping zswap info&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 for szFile in /proc/*/status ; do&lt;br /&gt;
   awk '/VmSwap|Name/{printf $2 &amp;quot;\t&amp;quot; $3}END{ print &amp;quot;&amp;quot; }' &amp;quot;$szFile&amp;quot;&lt;br /&gt;
 done | sort --key 2 --numeric --reverse | more&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Using a Swap Partition= &amp;lt;!--T:32--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:33--&amp;gt;&lt;br /&gt;
A swap partition is the traditional way of managing swap.  In this scenario, a dedicated partition (or partitions) are created for holding swap.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Creating and Enabling a Swap Partition== &amp;lt;!--T:34--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:35--&amp;gt;&lt;br /&gt;
To create a swap partition, you need enough unallocated disk space to create an additional partition. If you do not have enough space, skip to the next section [[&amp;lt;tvar|link&amp;gt;Special:MyLanguage/#Using_a_swap_file&amp;lt;/&amp;gt;|#Using_a_swap_file]]. A swap partition can be created in any disk management / partition management tool and should be set as type {{ic|linuxswap}}.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:36--&amp;gt; Once you have a swap partition you will need to initialize the swap partition with {{ic|mkswap}}.  For example, if your swap partition is {{ic|/dev/sda3}}, you could use the command:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo mkswap /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:37--&amp;gt; Next we need to enable the swap partition with the {{ic|swapon}} command. Following our example above this could be done with:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo swapon /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:38--&amp;gt; In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  It is best to use the UUID instead of the device name for this purpose.  You can add the line to fstab manually or using the command:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo bash -c &amp;quot;echo UUID=$(lsblk -no UUID /dev/sda3) none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;If you would like to have more than one swap partition, simply repeat the steps above for any additional partitions.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{note|&amp;lt;translate&amp;gt;Be sure to replace /dev/sda3 in the above commands with your actual swap partition.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
{{tip|&amp;lt;translate&amp;gt;''If you're using a HDD'' (spinning rust) put the swap partition *at the beginning of the disk* as the speed of the disk is higher on the inside tracks. On an SSD this doesn't matter.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Using a Swapfile= &amp;lt;!--T:39--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:40--&amp;gt;&lt;br /&gt;
Using a swap partition has one major disadvantage:  Changing the size of swap or adding swap requires repartitioning the disk.  In current Linux kernels, it is possible to use a swap file instead of a dedicated partition and as from kernel 2.6 onwards there is no performance difference any more between the two.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Creating and Enabling a Static Swapfile== &amp;lt;!--T:41--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{tip|&amp;lt;translate&amp;gt;&amp;lt;!--T:42--&amp;gt; There is no reason you can't have both a swap partition and a swapfile.  This is an easy way to add more swap without repartitioning.&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:43--&amp;gt; First create and intialize the file to hold the swap.  For example, to create a 4GB swapfile, you could use the command:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo fallocate -l 4G /swapfile&lt;br /&gt;
 sudo mkswap /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:44--&amp;gt; Set the appropriate permissions on the file.  It should be readable and writable only by {{ic|root}}.  This can be done with the command:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo chmod u=rw,go= /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:45--&amp;gt; Next we need to enable the swapfile with the {{ic|swapon}} command.  Following our example above this could be done with:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo swapon /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:46--&amp;gt; In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  You can add the line to fstab manually or using the command:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo bash -c &amp;quot;echo /swapfile none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Swapfiles on BTRFS== &amp;lt;!--T:47--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:48--&amp;gt;&lt;br /&gt;
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:49--&amp;gt; Prior to running the {{ic|fallocate}} step above, you should run these commands:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo truncate -s 0 /swapfile&lt;br /&gt;
 sudo chattr +C /swapfile&lt;br /&gt;
 sudo btrfs property set /swapfile compression none&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:50--&amp;gt; These commands create an empty swapfile, disable COW for that file and ensure that compression is disabled.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Swapfiles on ZFS== &amp;lt;!--T:51--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:52--&amp;gt;&lt;br /&gt;
zfs doesn't support swapfiles, however you can achieve a similar benefit using a zvol as a swap volume.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:53--&amp;gt;&lt;br /&gt;
Detailed instructions on how to accomplish this can be found in this [&amp;lt;tvar|link&amp;gt;https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device&amp;lt;/&amp;gt; ZoL guide].&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Automated Swap Management with systemd-swap= &amp;lt;!--T:54--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
{{note|&amp;lt;translate&amp;gt;&amp;lt;!--T:55--&amp;gt; Using systemd-swap with on btrfs/zfs or with hibernation support requires special handling beyond the scope of this article&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:56--&amp;gt; It is possible to automatically manage the size of your swapfile using {{ic|systemd-swap}}.  It can create swap files dynamically based on memory needs.  It is also an easy way to enable/manage [[&amp;lt;tvar|link&amp;gt;#Using_zswap_with_systemd-swap&amp;lt;/&amp;gt;|zswap]]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Installing and Configuring systemd-swap== &amp;lt;!--T:57--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:58--&amp;gt;&lt;br /&gt;
First, install and enable {{ic|systemd-swap}}:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 pamac install systemd-swap&lt;br /&gt;
 sudo systemctl enable systemd-swap.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:59--&amp;gt; Next enable dynamic swap management by creating a file {{ic|/etc/systemd/swap.conf.d/myswap.conf}} with the following parameters:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 zswap_enabled=0&lt;br /&gt;
 zram_enabled=0&lt;br /&gt;
 swapfc_enabled=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:60--&amp;gt; If you would prefer a single command to create this file you could use:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo bash -c 'echo -e &amp;quot;zswap_enabled=0\nzram_enabled=0\nswapfc_enabled=1&amp;quot; &amp;gt; /etc/systemd/swap.conf.d/myswap.conf'&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Remove Other Swap== &amp;lt;!--T:61--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:62--&amp;gt;&lt;br /&gt;
In order for systemd-swap to be effective you need to remove any traditional swap devices you have.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:63--&amp;gt; To display your current swap devices you can use the command {{ic|swapon}}.  For example, my test machine displays the following:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE USED PRIO&lt;br /&gt;
 /swapfile file        4G   0B   -2&lt;br /&gt;
 /dev/sda3 partition 8.4G   0B   -3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:64--&amp;gt; In this example there are two swap devices.  A swapfile and a swap partition.  To turn them off we can use the command {{ic|swapoff}}.&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo swapoff /swapfile&lt;br /&gt;
 sudo swapoff /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:65--&amp;gt;&lt;br /&gt;
Next we need to remove them.  &lt;br /&gt;
The swap partition will need to be deleted using your favorite partitioning tool.  You can remove the swapfile by simply deleting it.&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo rm /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:66--&amp;gt; We need to also remove any lines related to swap from {{ic|/etc/fstab}}.  Edit the file with an [[&amp;lt;tvar|link&amp;gt;Special:MyLanguage/Viewing_and_editing_configuration_files&amp;lt;/&amp;gt;|appropriate text editor]] and remove or comment out the lines for the swap space.  In the example above, we would remove these lines:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 UUID=c2430cf1-8ea9-4422-a5c5-5a38779194c3 swap           swap    defaults,noatime 0 2&lt;br /&gt;
 /swapfile none swap defaults 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:67--&amp;gt; Next reboot.  After the reboot, when running {{ic|swapon}} you should see something similiar to the following:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 NAME                           TYPE SIZE USED PRIO&lt;br /&gt;
 /var/lib/systemd-swap/swapfc/1 file 512M   0B   -2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:68--&amp;gt; systemd-swap will add and remove swapfiles as your memory usage dictates.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{note|&amp;lt;translate&amp;gt;&amp;lt;!--T:69--&amp;gt; If you don't delete your existing swap partition it will be automatically activated by systemd even though you have removed it from fstab&amp;lt;/translate&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
==Using zswap with systemd-swap== &amp;lt;!--T:70--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:71--&amp;gt;&lt;br /&gt;
zswap is compressed swap kept in RAM. zswap keeps the most frequently used pages in RAM and writes less frequently used pages to the swap space on disk.  In many workloads, this will result in increased swap performance and less wear and tear on SSDs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:72--&amp;gt;&lt;br /&gt;
To enable zswap with systemd-swap, simply alter the instructions above and set Linux Kernel parameter {{ic|zswap_enabled=1}}&amp;lt;/translate&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=Tuning &amp;amp; Performance Considerations= &amp;lt;!--T:73--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:74--&amp;gt;&lt;br /&gt;
Although swap seems like a great way to expand memory, excessive swap use will cause severe performance degradation, as mentioned before.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:75--&amp;gt; There are couple of parameters that can be used to tune swap utilization.  These are swappiness and vfs_cache_pressure.  To see your current settings for these you can use the following commands:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 cat /proc/sys/vm/swappiness&lt;br /&gt;
 cat /proc/sys/vm/vfs_cache_pressure&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:76--&amp;gt; {{ic|swappiness}} controls how likely a page is to be transferred to swap.  This value represents the percentage of the free memory before activating swap. The lower the value, the less swapping is used and the more memory pages are kept in physical memory where:&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:77--&amp;gt; 0 disables swap&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:78--&amp;gt; 60 is the default value which is ideal for a server running a lot of services&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:79--&amp;gt; 100 is very aggressive swapping.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:80--&amp;gt; For ''most'' computers the recommended value is 10: Theoretically, this means to only start swapping when RAM usage reaches around 90 percent.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:81--&amp;gt; {{ic|vfs_cache_pressure}} is a percentage value that controls the tendency of the kernel to ''reclaim'' the memory which is used for caching of directory and inode objects.  The default value is 100.&amp;lt;/translate&amp;gt;  &amp;lt;translate&amp;gt;&amp;lt;!--T:82--&amp;gt; Increasing this value will increase the rate in which these objects are removed from the RAM cache.  Decreasing it will allow these objects to be cached in memory longer, consuming additional RAM over time.&amp;lt;/translate&amp;gt;  &amp;lt;translate&amp;gt;&amp;lt;!--T:83--&amp;gt; Depending on your specific workload, increasing or decreasing this value too far can have significant negative impacts on system performance.&amp;lt;/translate&amp;gt;  &amp;lt;translate&amp;gt;&amp;lt;!--T:84--&amp;gt; Experimentation is needed to find the appropriate balance and the default value is reasonable.  In general, it is more common to optimize swappiness before experimenting with vfs_cache_pressure.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&amp;lt;!--T:85--&amp;gt; To set these values you can use the command {{ic|sysctl}}.  For example, to set the swappiness value to 10 you could use:&amp;lt;/translate&amp;gt;&lt;br /&gt;
 sudo sysctl vm.swappiness=10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;translate&amp;gt;&amp;lt;!--T:86--&amp;gt; There is no preset defined answer on the optimal values for these parameters.&amp;lt;/translate&amp;gt;'''  &amp;lt;translate&amp;gt;&amp;lt;!--T:87--&amp;gt; Experimentation is needed to find the optimum configuration for your specific hardware and workload.&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
=See Also= &amp;lt;!--T:88--&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:89--&amp;gt; The Arch Wiki page on [&amp;lt;tvar|link&amp;gt;https://wiki.archlinux.org/index.php/Swap&amp;lt;/&amp;gt; swap]&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:90--&amp;gt; The Arch Wiki page on [&amp;lt;tvar|link&amp;gt;https://wiki.archlinux.org/index.php/Zswap&amp;lt;/&amp;gt; zswap]&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:91--&amp;gt; The Linux kernel documentation on [&amp;lt;tvar|link&amp;gt;https://www.kernel.org/doc/Documentation/vm/zswap.txt&amp;lt;/&amp;gt; zswap]&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:92--&amp;gt; The Linux kernel documentation on [&amp;lt;tvar|link&amp;gt;https://www.kernel.org/doc/Documentation/sysctl/vm.txt&amp;lt;/&amp;gt; swappiness and vfs_cache_pressure]&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:93--&amp;gt; The openSUSE guide to [&amp;lt;tvar|link&amp;gt;https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.memory.html&amp;lt;/&amp;gt; tuning memory]&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:94--&amp;gt; The [&amp;lt;tvar|link&amp;gt;https://github.com/Nefelim4ag/systemd-swap&amp;lt;/&amp;gt; systemd-swap page]&amp;lt;/translate&amp;gt;&lt;br /&gt;
* &amp;lt;translate&amp;gt;&amp;lt;!--T:95--&amp;gt; The ZFS on Linux guide on [&amp;lt;tvar|link&amp;gt;https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device&amp;lt;/&amp;gt; Swap Volumes]&amp;lt;/translate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22338</id>
		<title>Swap/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22338"/>
		<updated>2021-04-02T00:54:25Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;Um sicherzustellen, dass die Auslagerung beim Booten aktiviert ist, können wir einen Eintrag in {{ic|/etc/fstab}} hinzufügen.  Am besten verwenden Sie dazu die UUID anstelle...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Übersicht=&lt;br /&gt;
&lt;br /&gt;
Der Auslagerungsspeicher wird zur Erweiterung des für die Ausführung von Programmen verfügbaren Speichers (RAM) verwendet.&lt;br /&gt;
* Ohne Auslagerungsspeicher werden bei Speichermangel die Anwendungen ''beendet'', was zu einem Absturz des gesamten Systems führen kann.&lt;br /&gt;
* Wenn dem System Auslagerungsspeicher zur Verfügung steht, kann der Kernel weniger häufig genutzte Speicherseiten von inaktiven Anwendungen / Diensten auf die Festplatte schreiben (&amp;quot;auslagern&amp;quot;), wodurch mehr echter Arbeitsspeicher für aktive Anwendungen zur Verfügung steht.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Es gibt drei verschiedene Möglichkeiten, wie der Swap in Manjaro verwaltet werden kann:&lt;br /&gt;
* Eine Auslagerungs-Partition&lt;br /&gt;
* Eine Auslagerungs-Datei&lt;br /&gt;
* Komprimierte Auslagerung (zswap)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dieser Artikel versucht, so umfassend wie möglich zu sein, aber noch mehr Informationen finden Sie in den  [[Special:MyLanguage/#See_Also|unten verlinkten Artikel]]&lt;br /&gt;
=Brauche ich eine Auslagerung?=&lt;br /&gt;
&lt;br /&gt;
Das ist eine Frage, die nicht beantwortet werden kann, ohne einen Blick auf Ihre Konfiguration zu werfen. Selbst bei reichlich verfügbarem Speicher wird dieser oft als Auffangnetz oder sogar manchmal aufgrund spezifischer Anwendungsanforderungen verwendet, also werfen Sie einen Blick auf die folgende nicht abschließende Liste:&lt;br /&gt;
* Wenn Sie den Ruhezustand verwenden: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie Dienste haben, die nicht immer aktiv sind, aber trotzdem ständig laufen: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die anstelle von RAM direkt virtuellen Speicher für temporäre Speicherung zuweist: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die ein Speicherleck hat: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie einen Server mit 1 TB RAM haben, den Sie als Desktop verwenden, ohne dass Anwendungen virtuellen Speicher zuweisen oder Speicherlecks haben: ''Nein, Sie müssen nicht auslagern!''&lt;br /&gt;
=Wie viel Auslagerungspeicher brauche ich?=&lt;br /&gt;
&lt;br /&gt;
Die benötigte Swap-Größe ist sehr variabel und hängt von ''Ihren'' spezifischen Anwendungen und der Arbeitslast ab.  Es gibt keine allgemeingültige Formel für die Größe des Auslagerungsspeichers, ohne die Nutzung über einen bestimmten Zeitraum hinweg zu überwachen.  Ein vernünftiger Ansatzpunkt wäre:&lt;br /&gt;
* Bei weniger als 4 GB physischem Speicher (RAM) wird dringend empfohlen, dass der Swap-Speicher mindestens so groß sein sollte wie der RAM-Speicher. Außerdem wird empfohlen, dass der Swap-Speicher maximal doppelt so groß ist wie der RAM-Speicher, abhängig von der Größe des für das System verfügbaren Festplattenplatzes, wegen des abnehmenden Nutzens.&lt;br /&gt;
* Bei moderneren Systemen (&amp;gt;4 GB) sollte Ihr Auslagerungsplatz mindestens der Größe Ihres physischen Speichers (RAM) entsprechen, '''wenn Sie den Ruhezustand verwenden''', andernfalls benötigen Sie mindestens ROUNDUP(SQRT(RAM)), d.h. die Quadratwurzel Ihrer Arbeitsspeichergröße aufgerundet auf das nächste GB. Das Maximum ist auch hier das Doppelte der Arbeitsspeichergröße, ebenfalls wegen des abnehmenden Nutzens.&lt;br /&gt;
* Der einzige Nachteil, wenn Sie mehr Auslagerungsspeicher haben, als Sie tatsächlich benötigen, ist, dass der dafür reservierte Speicherplatz nicht für Anwendungs- oder Systemdaten verwendet werden kann.&lt;br /&gt;
&lt;br /&gt;
Der &amp;quot;abnehmende Nutzen&amp;quot; bedeutet, dass Sie, wenn Sie mehr Auslagerungsspeicher als das Doppelte Ihrer RAM-Größe benötigen, besser mehr RAM hinzufügen sollten, da der Zugriff auf die Festplatte (HDD) etwa 10³ langsamer ist als der Zugriff auf den RAM, so dass etwas, das 1 Sekunde dauern würde, plötzlich mehr als 15 Minuten dauert! Und auf einem Halbleiterlaufwerk (Solid State Drive, SSD) dauert derselbe Vorgang, der im RAM 1 Sekunde dauerte, auf dem SSD immer noch etwa 1 Minute!&lt;br /&gt;
&lt;br /&gt;
Unter Berücksichtigung aller oben genannten Punkte ergibt sich die folgende Tabelle:&lt;br /&gt;
&lt;br /&gt;
(die letzten 3 Spalten bezeichnen den Auslagerungsbereich)&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        1GB              1GB                 2GB      2GB&lt;br /&gt;
        2GB              2GB                 3GB      4GB&lt;br /&gt;
        3GB              3GB                 5GB      6GB&lt;br /&gt;
        4GB              4GB                 6GB      8GB&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        5GB              2GB                 7GB     10GB&lt;br /&gt;
        6GB              2GB                 8GB     12GB&lt;br /&gt;
        8GB              3GB                11GB     16GB&lt;br /&gt;
       12GB              3GB                15GB     24GB&lt;br /&gt;
       16GB              4GB                20GB     32GB&lt;br /&gt;
       24GB              5GB                29GB     48GB&lt;br /&gt;
       32GB              6GB                38GB     64GB&lt;br /&gt;
       64GB              8GB                72GB    128GB&lt;br /&gt;
      128GB             11GB               139GB    256GB&lt;br /&gt;
      256GB             16GB               272GB    512GB&lt;br /&gt;
      512GB             23GB               535GB      1TB&lt;br /&gt;
        1TB             32GB              1056GB      2TB&lt;br /&gt;
        2TB             46GB              2094GB      4TB&lt;br /&gt;
        4TB             64GB              4160GB      8TB&lt;br /&gt;
        8TB             91GB              8283GB     16TB&lt;br /&gt;
{{note|Der größte Server, den einer der Autoren dieses Wikis jemals installiert hat, hatte in der Tat 8TB RAM}}&lt;br /&gt;
=Auslagerungsinformationen anzeigen=&lt;br /&gt;
&lt;br /&gt;
Der Befehl {{ic|swapon}} zeigt Ihre aktuellen Swap-Informationen an.  Zum Beispiel:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE   USED PRIO&lt;br /&gt;
 /dev/sda7 partition  20G  44.3M   -2&lt;br /&gt;
&lt;br /&gt;
Das folgende Skript wird:&lt;br /&gt;
* zeigt an, ob zswap aktiv ist oder nicht, und wenn aktiv, gibt zswap Parameter an, wenn es mit dem Befehl {{$ic|sudo}} ausgeführt wird&lt;br /&gt;
* eine Liste aller Anwendungen / Dienste anzeigen, die Auslagerung beanspruchen und wie viel sie beanspruchen, in absteigender Reihenfolge&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Check whether running as root&lt;br /&gt;
 if [ &amp;quot;$(whoami)&amp;quot; = 'root' ]; then&lt;br /&gt;
   dmesg | grep &amp;quot;zswap:&amp;quot; | grep --silent &amp;quot;load&amp;quot;&lt;br /&gt;
   if [[ $? -eq 0 ]]; then&lt;br /&gt;
     # zswap is active&lt;br /&gt;
     echo &amp;quot;zswap information:&amp;quot;&lt;br /&gt;
     grep --recursive --color=none . /sys/kernel/debug/zswap/&lt;br /&gt;
     read -n 1 -s -r -p &amp;quot;Press any key to continue&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;[warning] zwap not active. Continuing&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;[warning] Not running as root: skipping zswap info&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 for szFile in /proc/*/status ; do&lt;br /&gt;
   awk '/VmSwap|Name/{printf $2 &amp;quot;\t&amp;quot; $3}END{ print &amp;quot;&amp;quot; }' &amp;quot;$szFile&amp;quot;&lt;br /&gt;
 done | sort --key 2 --numeric --reverse | more&lt;br /&gt;
=Eine Auslagerungspartition benutzen=&lt;br /&gt;
&lt;br /&gt;
Eine Auslagerungspartition ist die traditionelle Art, den Auslagerungsbereich zu verwalten.  In diesem Szenario wird eine dedizierte Partition (oder Partitionen) für die Unterbringung der Auslagerungsdaten erstellt.&lt;br /&gt;
==Erstellen und Aktivieren einer Auslagerungspartition==&lt;br /&gt;
&lt;br /&gt;
Um eine Auslagerungspartition zu erstellen, benötigen Sie genügend nicht zugewiesenen Speicherplatz, um eine zusätzliche Partition zu erstellen. Wenn Sie nicht genügend Platz haben, springen Sie zum nächsten Abschnitt [[Special:MyLanguage/#Using_a_swap_file|#Verwenden_einer_Auslagerungsdatei]]. Eine Auslagerungspartition kann in jeder Datenträgerverwaltung / Partitionsverwaltung erstellt werden und sollte als Typ {{ic|linuxswap}} eingerichtet werden.Special:MyLanguage/#Using_a_swap_file&lt;br /&gt;
&lt;br /&gt;
Sobald Sie eine Auslagerungspartition haben, müssen Sie die Auslagerungspartition mit {{ic|mkswap}} initialisieren.  Wenn Ihre Auslagerungspartition zum Beispiel {{ic|/dev/sda3}} ist, könnten Sie diesen Befehl verwenden:&lt;br /&gt;
 sudo mkswap /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Als nächstes müssen wir die Auslagerungspartition mit dem Befehl {{ic|swapon}} aktivieren. In Anlehnung an unser obiges Beispiel könnte dies erfolgen mit:&lt;br /&gt;
 sudo swapon /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Um sicherzustellen, dass die Auslagerung beim Booten aktiviert ist, können wir einen Eintrag in {{ic|/etc/fstab}} hinzufügen.  Am besten verwenden Sie dazu die UUID anstelle des Gerätenamens.  Sie können die Zeile zu fstab manuell oder mit dem Befehl hinzufügen:&lt;br /&gt;
 sudo bash -c &amp;quot;echo UUID=$(lsblk -no UUID /dev/sda3) none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you would like to have more than one swap partition, simply repeat the steps above for any additional partitions.&lt;br /&gt;
&lt;br /&gt;
{{note|Be sure to replace /dev/sda3 in the above commands with your actual swap partition.}}&lt;br /&gt;
{{tip|''If you're using a HDD'' (spinning rust) put the swap partition *at the beginning of the disk* as the speed of the disk is higher on the inside tracks. On an SSD this doesn't matter.}}&lt;br /&gt;
=Using a Swapfile=&lt;br /&gt;
&lt;br /&gt;
Using a swap partition has one major disadvantage:  Changing the size of swap or adding swap requires repartitioning the disk.  In current Linux kernels, it is possible to use a swap file instead of a dedicated partition and as from kernel 2.6 onwards there is no performance difference any more between the two.&lt;br /&gt;
&lt;br /&gt;
==Creating and Enabling a Static Swapfile==&lt;br /&gt;
{{tip|There is no reason you can't have both a swap partition and a swapfile.  This is an easy way to add more swap without repartitioning.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First create and intialize the file to hold the swap.  For example, to create a 4GB swapfile, you could use the command:&lt;br /&gt;
 sudo fallocate -l 4G /swapfile&lt;br /&gt;
 sudo mkswap /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the appropriate permissions on the file.  It should be readable and writable only by {{ic|root}}.  This can be done with the command:&lt;br /&gt;
 sudo chmod u=rw,go= /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swapfile with the {{ic|swapon}} command.  Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo /swapfile none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on BTRFS==&lt;br /&gt;
&lt;br /&gt;
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.&lt;br /&gt;
&lt;br /&gt;
Prior to running the {{ic|fallocate}} step above, you should run these commands:&lt;br /&gt;
 sudo truncate -s 0 /swapfile&lt;br /&gt;
 sudo chattr +C /swapfile&lt;br /&gt;
 sudo btrfs property set /swapfile compression none&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These commands create an empty swapfile, disable COW for that file and ensure that compression is disabled.&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on ZFS==&lt;br /&gt;
&lt;br /&gt;
zfs doesn't support swapfiles, however you can achieve a similar benefit using a zvol as a swap volume.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on how to accomplish this can be found in this [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device ZoL guide].&lt;br /&gt;
=Automated Swap Management with systemd-swap=&lt;br /&gt;
{{note|Using systemd-swap with on btrfs/zfs or with hibernation support requires special handling beyond the scope of this article}}&lt;br /&gt;
&lt;br /&gt;
It is possible to automatically manage the size of your swapfile using {{ic|systemd-swap}}.  It can create swap files dynamically based on memory needs.  It is also an easy way to enable/manage [[#Using_zswap_with_systemd-swap|zswap]]&lt;br /&gt;
&lt;br /&gt;
==Installing and Configuring systemd-swap==&lt;br /&gt;
&lt;br /&gt;
First, install and enable {{ic|systemd-swap}}:&lt;br /&gt;
 pamac install systemd-swap&lt;br /&gt;
 sudo systemctl enable systemd-swap.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next enable dynamic swap management by creating a file {{ic|/etc/systemd/swap.conf.d/myswap.conf}} with the following parameters:&lt;br /&gt;
 zswap_enabled=0&lt;br /&gt;
 zram_enabled=0&lt;br /&gt;
 swapfc_enabled=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would prefer a single command to create this file you could use:&lt;br /&gt;
 sudo bash -c 'echo -e &amp;quot;zswap_enabled=0\nzram_enabled=0\nswapfc_enabled=1&amp;quot; &amp;gt; /etc/systemd/swap.conf.d/myswap.conf'&lt;br /&gt;
&lt;br /&gt;
==Remove Other Swap==&lt;br /&gt;
&lt;br /&gt;
In order for systemd-swap to be effective you need to remove any traditional swap devices you have.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To display your current swap devices you can use the command {{ic|swapon}}.  For example, my test machine displays the following:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE USED PRIO&lt;br /&gt;
 /swapfile file        4G   0B   -2&lt;br /&gt;
 /dev/sda3 partition 8.4G   0B   -3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example there are two swap devices.  A swapfile and a swap partition.  To turn them off we can use the command {{ic|swapoff}}.&lt;br /&gt;
 sudo swapoff /swapfile&lt;br /&gt;
 sudo swapoff /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to remove them.  &lt;br /&gt;
The swap partition will need to be deleted using your favorite partitioning tool.  You can remove the swapfile by simply deleting it.&lt;br /&gt;
 sudo rm /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need to also remove any lines related to swap from {{ic|/etc/fstab}}.  Edit the file with an [[Special:MyLanguage/Viewing_and_editing_configuration_files|appropriate text editor]] and remove or comment out the lines for the swap space.  In the example above, we would remove these lines:&lt;br /&gt;
 UUID=c2430cf1-8ea9-4422-a5c5-5a38779194c3 swap           swap    defaults,noatime 0 2&lt;br /&gt;
 /swapfile none swap defaults 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next reboot.  After the reboot, when running {{ic|swapon}} you should see something similiar to the following:&lt;br /&gt;
 NAME                           TYPE SIZE USED PRIO&lt;br /&gt;
 /var/lib/systemd-swap/swapfc/1 file 512M   0B   -2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
systemd-swap will add and remove swapfiles as your memory usage dictates.&lt;br /&gt;
&lt;br /&gt;
{{note|If you don't delete your existing swap partition it will be automatically activated by systemd even though you have removed it from fstab}}&lt;br /&gt;
&lt;br /&gt;
==Using zswap with systemd-swap==&lt;br /&gt;
&lt;br /&gt;
zswap is compressed swap kept in RAM. zswap keeps the most frequently used pages in RAM and writes less frequently used pages to the swap space on disk.  In many workloads, this will result in increased swap performance and less wear and tear on SSDs.&lt;br /&gt;
&lt;br /&gt;
To enable zswap with systemd-swap, simply alter the instructions above and set Linux Kernel parameter {{ic|zswap_enabled=1}}&lt;br /&gt;
=Tuning &amp;amp; Performance Considerations=&lt;br /&gt;
&lt;br /&gt;
Although swap seems like a great way to expand memory, excessive swap use will cause severe performance degradation, as mentioned before.&lt;br /&gt;
&lt;br /&gt;
There are couple of parameters that can be used to tune swap utilization.  These are swappiness and vfs_cache_pressure.  To see your current settings for these you can use the following commands:&lt;br /&gt;
 cat /proc/sys/vm/swappiness&lt;br /&gt;
 cat /proc/sys/vm/vfs_cache_pressure&lt;br /&gt;
&lt;br /&gt;
{{ic|swappiness}} controls how likely a page is to be transferred to swap.  This value represents the percentage of the free memory before activating swap. The lower the value, the less swapping is used and the more memory pages are kept in physical memory where:&lt;br /&gt;
* 0 disables swap&lt;br /&gt;
* 60 is the default value which is ideal for a server running a lot of services&lt;br /&gt;
* 100 is very aggressive swapping.&lt;br /&gt;
&lt;br /&gt;
For ''most'' computers the recommended value is 10: Theoretically, this means to only start swapping when RAM usage reaches around 90 percent.&lt;br /&gt;
&lt;br /&gt;
{{ic|vfs_cache_pressure}} is a percentage value that controls the tendency of the kernel to ''reclaim'' the memory which is used for caching of directory and inode objects.  The default value is 100.  Increasing this value will increase the rate in which these objects are removed from the RAM cache.  Decreasing it will allow these objects to be cached in memory longer, consuming additional RAM over time.  Depending on your specific workload, increasing or decreasing this value too far can have significant negative impacts on system performance.  Experimentation is needed to find the appropriate balance and the default value is reasonable.  In general, it is more common to optimize swappiness before experimenting with vfs_cache_pressure.&lt;br /&gt;
&lt;br /&gt;
To set these values you can use the command {{ic|sysctl}}.  For example, to set the swappiness value to 10 you could use:&lt;br /&gt;
 sudo sysctl vm.swappiness=10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''There is no preset defined answer on the optimal values for these parameters.'''  Experimentation is needed to find the optimum configuration for your specific hardware and workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Swap swap]&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Zswap zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/vm/zswap.txt zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/sysctl/vm.txt swappiness and vfs_cache_pressure]&lt;br /&gt;
* The openSUSE guide to [https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.memory.html tuning memory]&lt;br /&gt;
* The [https://github.com/Nefelim4ag/systemd-swap systemd-swap page]&lt;br /&gt;
* The ZFS on Linux guide on [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device Swap Volumes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Translations:Swap/38/de&amp;diff=22337</id>
		<title>Translations:Swap/38/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Translations:Swap/38/de&amp;diff=22337"/>
		<updated>2021-04-02T00:54:25Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;Um sicherzustellen, dass die Auslagerung beim Booten aktiviert ist, können wir einen Eintrag in {{ic|/etc/fstab}} hinzufügen.  Am besten verwenden Sie dazu die UUID anstelle...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Um sicherzustellen, dass die Auslagerung beim Booten aktiviert ist, können wir einen Eintrag in {{ic|/etc/fstab}} hinzufügen.  Am besten verwenden Sie dazu die UUID anstelle des Gerätenamens.  Sie können die Zeile zu fstab manuell oder mit dem Befehl hinzufügen:&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22336</id>
		<title>Swap/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22336"/>
		<updated>2021-04-02T00:48:16Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;Als nächstes müssen wir die Auslagerungspartition mit dem Befehl {{ic|swapon}} aktivieren. In Anlehnung an unser obiges Beispiel könnte dies erfolgen mit:&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Übersicht=&lt;br /&gt;
&lt;br /&gt;
Der Auslagerungsspeicher wird zur Erweiterung des für die Ausführung von Programmen verfügbaren Speichers (RAM) verwendet.&lt;br /&gt;
* Ohne Auslagerungsspeicher werden bei Speichermangel die Anwendungen ''beendet'', was zu einem Absturz des gesamten Systems führen kann.&lt;br /&gt;
* Wenn dem System Auslagerungsspeicher zur Verfügung steht, kann der Kernel weniger häufig genutzte Speicherseiten von inaktiven Anwendungen / Diensten auf die Festplatte schreiben (&amp;quot;auslagern&amp;quot;), wodurch mehr echter Arbeitsspeicher für aktive Anwendungen zur Verfügung steht.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Es gibt drei verschiedene Möglichkeiten, wie der Swap in Manjaro verwaltet werden kann:&lt;br /&gt;
* Eine Auslagerungs-Partition&lt;br /&gt;
* Eine Auslagerungs-Datei&lt;br /&gt;
* Komprimierte Auslagerung (zswap)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dieser Artikel versucht, so umfassend wie möglich zu sein, aber noch mehr Informationen finden Sie in den  [[Special:MyLanguage/#See_Also|unten verlinkten Artikel]]&lt;br /&gt;
=Brauche ich eine Auslagerung?=&lt;br /&gt;
&lt;br /&gt;
Das ist eine Frage, die nicht beantwortet werden kann, ohne einen Blick auf Ihre Konfiguration zu werfen. Selbst bei reichlich verfügbarem Speicher wird dieser oft als Auffangnetz oder sogar manchmal aufgrund spezifischer Anwendungsanforderungen verwendet, also werfen Sie einen Blick auf die folgende nicht abschließende Liste:&lt;br /&gt;
* Wenn Sie den Ruhezustand verwenden: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie Dienste haben, die nicht immer aktiv sind, aber trotzdem ständig laufen: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die anstelle von RAM direkt virtuellen Speicher für temporäre Speicherung zuweist: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die ein Speicherleck hat: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie einen Server mit 1 TB RAM haben, den Sie als Desktop verwenden, ohne dass Anwendungen virtuellen Speicher zuweisen oder Speicherlecks haben: ''Nein, Sie müssen nicht auslagern!''&lt;br /&gt;
=Wie viel Auslagerungspeicher brauche ich?=&lt;br /&gt;
&lt;br /&gt;
Die benötigte Swap-Größe ist sehr variabel und hängt von ''Ihren'' spezifischen Anwendungen und der Arbeitslast ab.  Es gibt keine allgemeingültige Formel für die Größe des Auslagerungsspeichers, ohne die Nutzung über einen bestimmten Zeitraum hinweg zu überwachen.  Ein vernünftiger Ansatzpunkt wäre:&lt;br /&gt;
* Bei weniger als 4 GB physischem Speicher (RAM) wird dringend empfohlen, dass der Swap-Speicher mindestens so groß sein sollte wie der RAM-Speicher. Außerdem wird empfohlen, dass der Swap-Speicher maximal doppelt so groß ist wie der RAM-Speicher, abhängig von der Größe des für das System verfügbaren Festplattenplatzes, wegen des abnehmenden Nutzens.&lt;br /&gt;
* Bei moderneren Systemen (&amp;gt;4 GB) sollte Ihr Auslagerungsplatz mindestens der Größe Ihres physischen Speichers (RAM) entsprechen, '''wenn Sie den Ruhezustand verwenden''', andernfalls benötigen Sie mindestens ROUNDUP(SQRT(RAM)), d.h. die Quadratwurzel Ihrer Arbeitsspeichergröße aufgerundet auf das nächste GB. Das Maximum ist auch hier das Doppelte der Arbeitsspeichergröße, ebenfalls wegen des abnehmenden Nutzens.&lt;br /&gt;
* Der einzige Nachteil, wenn Sie mehr Auslagerungsspeicher haben, als Sie tatsächlich benötigen, ist, dass der dafür reservierte Speicherplatz nicht für Anwendungs- oder Systemdaten verwendet werden kann.&lt;br /&gt;
&lt;br /&gt;
Der &amp;quot;abnehmende Nutzen&amp;quot; bedeutet, dass Sie, wenn Sie mehr Auslagerungsspeicher als das Doppelte Ihrer RAM-Größe benötigen, besser mehr RAM hinzufügen sollten, da der Zugriff auf die Festplatte (HDD) etwa 10³ langsamer ist als der Zugriff auf den RAM, so dass etwas, das 1 Sekunde dauern würde, plötzlich mehr als 15 Minuten dauert! Und auf einem Halbleiterlaufwerk (Solid State Drive, SSD) dauert derselbe Vorgang, der im RAM 1 Sekunde dauerte, auf dem SSD immer noch etwa 1 Minute!&lt;br /&gt;
&lt;br /&gt;
Unter Berücksichtigung aller oben genannten Punkte ergibt sich die folgende Tabelle:&lt;br /&gt;
&lt;br /&gt;
(die letzten 3 Spalten bezeichnen den Auslagerungsbereich)&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        1GB              1GB                 2GB      2GB&lt;br /&gt;
        2GB              2GB                 3GB      4GB&lt;br /&gt;
        3GB              3GB                 5GB      6GB&lt;br /&gt;
        4GB              4GB                 6GB      8GB&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        5GB              2GB                 7GB     10GB&lt;br /&gt;
        6GB              2GB                 8GB     12GB&lt;br /&gt;
        8GB              3GB                11GB     16GB&lt;br /&gt;
       12GB              3GB                15GB     24GB&lt;br /&gt;
       16GB              4GB                20GB     32GB&lt;br /&gt;
       24GB              5GB                29GB     48GB&lt;br /&gt;
       32GB              6GB                38GB     64GB&lt;br /&gt;
       64GB              8GB                72GB    128GB&lt;br /&gt;
      128GB             11GB               139GB    256GB&lt;br /&gt;
      256GB             16GB               272GB    512GB&lt;br /&gt;
      512GB             23GB               535GB      1TB&lt;br /&gt;
        1TB             32GB              1056GB      2TB&lt;br /&gt;
        2TB             46GB              2094GB      4TB&lt;br /&gt;
        4TB             64GB              4160GB      8TB&lt;br /&gt;
        8TB             91GB              8283GB     16TB&lt;br /&gt;
{{note|Der größte Server, den einer der Autoren dieses Wikis jemals installiert hat, hatte in der Tat 8TB RAM}}&lt;br /&gt;
=Auslagerungsinformationen anzeigen=&lt;br /&gt;
&lt;br /&gt;
Der Befehl {{ic|swapon}} zeigt Ihre aktuellen Swap-Informationen an.  Zum Beispiel:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE   USED PRIO&lt;br /&gt;
 /dev/sda7 partition  20G  44.3M   -2&lt;br /&gt;
&lt;br /&gt;
Das folgende Skript wird:&lt;br /&gt;
* zeigt an, ob zswap aktiv ist oder nicht, und wenn aktiv, gibt zswap Parameter an, wenn es mit dem Befehl {{$ic|sudo}} ausgeführt wird&lt;br /&gt;
* eine Liste aller Anwendungen / Dienste anzeigen, die Auslagerung beanspruchen und wie viel sie beanspruchen, in absteigender Reihenfolge&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Check whether running as root&lt;br /&gt;
 if [ &amp;quot;$(whoami)&amp;quot; = 'root' ]; then&lt;br /&gt;
   dmesg | grep &amp;quot;zswap:&amp;quot; | grep --silent &amp;quot;load&amp;quot;&lt;br /&gt;
   if [[ $? -eq 0 ]]; then&lt;br /&gt;
     # zswap is active&lt;br /&gt;
     echo &amp;quot;zswap information:&amp;quot;&lt;br /&gt;
     grep --recursive --color=none . /sys/kernel/debug/zswap/&lt;br /&gt;
     read -n 1 -s -r -p &amp;quot;Press any key to continue&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;[warning] zwap not active. Continuing&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;[warning] Not running as root: skipping zswap info&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 for szFile in /proc/*/status ; do&lt;br /&gt;
   awk '/VmSwap|Name/{printf $2 &amp;quot;\t&amp;quot; $3}END{ print &amp;quot;&amp;quot; }' &amp;quot;$szFile&amp;quot;&lt;br /&gt;
 done | sort --key 2 --numeric --reverse | more&lt;br /&gt;
=Eine Auslagerungspartition benutzen=&lt;br /&gt;
&lt;br /&gt;
Eine Auslagerungspartition ist die traditionelle Art, den Auslagerungsbereich zu verwalten.  In diesem Szenario wird eine dedizierte Partition (oder Partitionen) für die Unterbringung der Auslagerungsdaten erstellt.&lt;br /&gt;
==Erstellen und Aktivieren einer Auslagerungspartition==&lt;br /&gt;
&lt;br /&gt;
Um eine Auslagerungspartition zu erstellen, benötigen Sie genügend nicht zugewiesenen Speicherplatz, um eine zusätzliche Partition zu erstellen. Wenn Sie nicht genügend Platz haben, springen Sie zum nächsten Abschnitt [[Special:MyLanguage/#Using_a_swap_file|#Verwenden_einer_Auslagerungsdatei]]. Eine Auslagerungspartition kann in jeder Datenträgerverwaltung / Partitionsverwaltung erstellt werden und sollte als Typ {{ic|linuxswap}} eingerichtet werden.Special:MyLanguage/#Using_a_swap_file&lt;br /&gt;
&lt;br /&gt;
Sobald Sie eine Auslagerungspartition haben, müssen Sie die Auslagerungspartition mit {{ic|mkswap}} initialisieren.  Wenn Ihre Auslagerungspartition zum Beispiel {{ic|/dev/sda3}} ist, könnten Sie diesen Befehl verwenden:&lt;br /&gt;
 sudo mkswap /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Als nächstes müssen wir die Auslagerungspartition mit dem Befehl {{ic|swapon}} aktivieren. In Anlehnung an unser obiges Beispiel könnte dies erfolgen mit:&lt;br /&gt;
 sudo swapon /dev/sda3&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  It is best to use the UUID instead of the device name for this purpose.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo UUID=$(lsblk -no UUID /dev/sda3) none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you would like to have more than one swap partition, simply repeat the steps above for any additional partitions.&lt;br /&gt;
&lt;br /&gt;
{{note|Be sure to replace /dev/sda3 in the above commands with your actual swap partition.}}&lt;br /&gt;
{{tip|''If you're using a HDD'' (spinning rust) put the swap partition *at the beginning of the disk* as the speed of the disk is higher on the inside tracks. On an SSD this doesn't matter.}}&lt;br /&gt;
=Using a Swapfile=&lt;br /&gt;
&lt;br /&gt;
Using a swap partition has one major disadvantage:  Changing the size of swap or adding swap requires repartitioning the disk.  In current Linux kernels, it is possible to use a swap file instead of a dedicated partition and as from kernel 2.6 onwards there is no performance difference any more between the two.&lt;br /&gt;
&lt;br /&gt;
==Creating and Enabling a Static Swapfile==&lt;br /&gt;
{{tip|There is no reason you can't have both a swap partition and a swapfile.  This is an easy way to add more swap without repartitioning.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First create and intialize the file to hold the swap.  For example, to create a 4GB swapfile, you could use the command:&lt;br /&gt;
 sudo fallocate -l 4G /swapfile&lt;br /&gt;
 sudo mkswap /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the appropriate permissions on the file.  It should be readable and writable only by {{ic|root}}.  This can be done with the command:&lt;br /&gt;
 sudo chmod u=rw,go= /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swapfile with the {{ic|swapon}} command.  Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo /swapfile none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on BTRFS==&lt;br /&gt;
&lt;br /&gt;
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.&lt;br /&gt;
&lt;br /&gt;
Prior to running the {{ic|fallocate}} step above, you should run these commands:&lt;br /&gt;
 sudo truncate -s 0 /swapfile&lt;br /&gt;
 sudo chattr +C /swapfile&lt;br /&gt;
 sudo btrfs property set /swapfile compression none&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These commands create an empty swapfile, disable COW for that file and ensure that compression is disabled.&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on ZFS==&lt;br /&gt;
&lt;br /&gt;
zfs doesn't support swapfiles, however you can achieve a similar benefit using a zvol as a swap volume.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on how to accomplish this can be found in this [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device ZoL guide].&lt;br /&gt;
=Automated Swap Management with systemd-swap=&lt;br /&gt;
{{note|Using systemd-swap with on btrfs/zfs or with hibernation support requires special handling beyond the scope of this article}}&lt;br /&gt;
&lt;br /&gt;
It is possible to automatically manage the size of your swapfile using {{ic|systemd-swap}}.  It can create swap files dynamically based on memory needs.  It is also an easy way to enable/manage [[#Using_zswap_with_systemd-swap|zswap]]&lt;br /&gt;
&lt;br /&gt;
==Installing and Configuring systemd-swap==&lt;br /&gt;
&lt;br /&gt;
First, install and enable {{ic|systemd-swap}}:&lt;br /&gt;
 pamac install systemd-swap&lt;br /&gt;
 sudo systemctl enable systemd-swap.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next enable dynamic swap management by creating a file {{ic|/etc/systemd/swap.conf.d/myswap.conf}} with the following parameters:&lt;br /&gt;
 zswap_enabled=0&lt;br /&gt;
 zram_enabled=0&lt;br /&gt;
 swapfc_enabled=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would prefer a single command to create this file you could use:&lt;br /&gt;
 sudo bash -c 'echo -e &amp;quot;zswap_enabled=0\nzram_enabled=0\nswapfc_enabled=1&amp;quot; &amp;gt; /etc/systemd/swap.conf.d/myswap.conf'&lt;br /&gt;
&lt;br /&gt;
==Remove Other Swap==&lt;br /&gt;
&lt;br /&gt;
In order for systemd-swap to be effective you need to remove any traditional swap devices you have.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To display your current swap devices you can use the command {{ic|swapon}}.  For example, my test machine displays the following:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE USED PRIO&lt;br /&gt;
 /swapfile file        4G   0B   -2&lt;br /&gt;
 /dev/sda3 partition 8.4G   0B   -3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example there are two swap devices.  A swapfile and a swap partition.  To turn them off we can use the command {{ic|swapoff}}.&lt;br /&gt;
 sudo swapoff /swapfile&lt;br /&gt;
 sudo swapoff /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to remove them.  &lt;br /&gt;
The swap partition will need to be deleted using your favorite partitioning tool.  You can remove the swapfile by simply deleting it.&lt;br /&gt;
 sudo rm /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need to also remove any lines related to swap from {{ic|/etc/fstab}}.  Edit the file with an [[Special:MyLanguage/Viewing_and_editing_configuration_files|appropriate text editor]] and remove or comment out the lines for the swap space.  In the example above, we would remove these lines:&lt;br /&gt;
 UUID=c2430cf1-8ea9-4422-a5c5-5a38779194c3 swap           swap    defaults,noatime 0 2&lt;br /&gt;
 /swapfile none swap defaults 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next reboot.  After the reboot, when running {{ic|swapon}} you should see something similiar to the following:&lt;br /&gt;
 NAME                           TYPE SIZE USED PRIO&lt;br /&gt;
 /var/lib/systemd-swap/swapfc/1 file 512M   0B   -2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
systemd-swap will add and remove swapfiles as your memory usage dictates.&lt;br /&gt;
&lt;br /&gt;
{{note|If you don't delete your existing swap partition it will be automatically activated by systemd even though you have removed it from fstab}}&lt;br /&gt;
&lt;br /&gt;
==Using zswap with systemd-swap==&lt;br /&gt;
&lt;br /&gt;
zswap is compressed swap kept in RAM. zswap keeps the most frequently used pages in RAM and writes less frequently used pages to the swap space on disk.  In many workloads, this will result in increased swap performance and less wear and tear on SSDs.&lt;br /&gt;
&lt;br /&gt;
To enable zswap with systemd-swap, simply alter the instructions above and set Linux Kernel parameter {{ic|zswap_enabled=1}}&lt;br /&gt;
=Tuning &amp;amp; Performance Considerations=&lt;br /&gt;
&lt;br /&gt;
Although swap seems like a great way to expand memory, excessive swap use will cause severe performance degradation, as mentioned before.&lt;br /&gt;
&lt;br /&gt;
There are couple of parameters that can be used to tune swap utilization.  These are swappiness and vfs_cache_pressure.  To see your current settings for these you can use the following commands:&lt;br /&gt;
 cat /proc/sys/vm/swappiness&lt;br /&gt;
 cat /proc/sys/vm/vfs_cache_pressure&lt;br /&gt;
&lt;br /&gt;
{{ic|swappiness}} controls how likely a page is to be transferred to swap.  This value represents the percentage of the free memory before activating swap. The lower the value, the less swapping is used and the more memory pages are kept in physical memory where:&lt;br /&gt;
* 0 disables swap&lt;br /&gt;
* 60 is the default value which is ideal for a server running a lot of services&lt;br /&gt;
* 100 is very aggressive swapping.&lt;br /&gt;
&lt;br /&gt;
For ''most'' computers the recommended value is 10: Theoretically, this means to only start swapping when RAM usage reaches around 90 percent.&lt;br /&gt;
&lt;br /&gt;
{{ic|vfs_cache_pressure}} is a percentage value that controls the tendency of the kernel to ''reclaim'' the memory which is used for caching of directory and inode objects.  The default value is 100.  Increasing this value will increase the rate in which these objects are removed from the RAM cache.  Decreasing it will allow these objects to be cached in memory longer, consuming additional RAM over time.  Depending on your specific workload, increasing or decreasing this value too far can have significant negative impacts on system performance.  Experimentation is needed to find the appropriate balance and the default value is reasonable.  In general, it is more common to optimize swappiness before experimenting with vfs_cache_pressure.&lt;br /&gt;
&lt;br /&gt;
To set these values you can use the command {{ic|sysctl}}.  For example, to set the swappiness value to 10 you could use:&lt;br /&gt;
 sudo sysctl vm.swappiness=10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''There is no preset defined answer on the optimal values for these parameters.'''  Experimentation is needed to find the optimum configuration for your specific hardware and workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Swap swap]&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Zswap zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/vm/zswap.txt zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/sysctl/vm.txt swappiness and vfs_cache_pressure]&lt;br /&gt;
* The openSUSE guide to [https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.memory.html tuning memory]&lt;br /&gt;
* The [https://github.com/Nefelim4ag/systemd-swap systemd-swap page]&lt;br /&gt;
* The ZFS on Linux guide on [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device Swap Volumes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Translations:Swap/37/de&amp;diff=22335</id>
		<title>Translations:Swap/37/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Translations:Swap/37/de&amp;diff=22335"/>
		<updated>2021-04-02T00:48:16Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;Als nächstes müssen wir die Auslagerungspartition mit dem Befehl {{ic|swapon}} aktivieren. In Anlehnung an unser obiges Beispiel könnte dies erfolgen mit:&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Als nächstes müssen wir die Auslagerungspartition mit dem Befehl {{ic|swapon}} aktivieren. In Anlehnung an unser obiges Beispiel könnte dies erfolgen mit:&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22334</id>
		<title>Swap/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22334"/>
		<updated>2021-04-02T00:47:23Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;Sobald Sie eine Auslagerungspartition haben, müssen Sie die Auslagerungspartition mit {{ic|mkswap}} initialisieren.  Wenn Ihre Auslagerungspartition zum Beispiel {{ic|/dev/sd...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Übersicht=&lt;br /&gt;
&lt;br /&gt;
Der Auslagerungsspeicher wird zur Erweiterung des für die Ausführung von Programmen verfügbaren Speichers (RAM) verwendet.&lt;br /&gt;
* Ohne Auslagerungsspeicher werden bei Speichermangel die Anwendungen ''beendet'', was zu einem Absturz des gesamten Systems führen kann.&lt;br /&gt;
* Wenn dem System Auslagerungsspeicher zur Verfügung steht, kann der Kernel weniger häufig genutzte Speicherseiten von inaktiven Anwendungen / Diensten auf die Festplatte schreiben (&amp;quot;auslagern&amp;quot;), wodurch mehr echter Arbeitsspeicher für aktive Anwendungen zur Verfügung steht.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Es gibt drei verschiedene Möglichkeiten, wie der Swap in Manjaro verwaltet werden kann:&lt;br /&gt;
* Eine Auslagerungs-Partition&lt;br /&gt;
* Eine Auslagerungs-Datei&lt;br /&gt;
* Komprimierte Auslagerung (zswap)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dieser Artikel versucht, so umfassend wie möglich zu sein, aber noch mehr Informationen finden Sie in den  [[Special:MyLanguage/#See_Also|unten verlinkten Artikel]]&lt;br /&gt;
=Brauche ich eine Auslagerung?=&lt;br /&gt;
&lt;br /&gt;
Das ist eine Frage, die nicht beantwortet werden kann, ohne einen Blick auf Ihre Konfiguration zu werfen. Selbst bei reichlich verfügbarem Speicher wird dieser oft als Auffangnetz oder sogar manchmal aufgrund spezifischer Anwendungsanforderungen verwendet, also werfen Sie einen Blick auf die folgende nicht abschließende Liste:&lt;br /&gt;
* Wenn Sie den Ruhezustand verwenden: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie Dienste haben, die nicht immer aktiv sind, aber trotzdem ständig laufen: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die anstelle von RAM direkt virtuellen Speicher für temporäre Speicherung zuweist: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die ein Speicherleck hat: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie einen Server mit 1 TB RAM haben, den Sie als Desktop verwenden, ohne dass Anwendungen virtuellen Speicher zuweisen oder Speicherlecks haben: ''Nein, Sie müssen nicht auslagern!''&lt;br /&gt;
=Wie viel Auslagerungspeicher brauche ich?=&lt;br /&gt;
&lt;br /&gt;
Die benötigte Swap-Größe ist sehr variabel und hängt von ''Ihren'' spezifischen Anwendungen und der Arbeitslast ab.  Es gibt keine allgemeingültige Formel für die Größe des Auslagerungsspeichers, ohne die Nutzung über einen bestimmten Zeitraum hinweg zu überwachen.  Ein vernünftiger Ansatzpunkt wäre:&lt;br /&gt;
* Bei weniger als 4 GB physischem Speicher (RAM) wird dringend empfohlen, dass der Swap-Speicher mindestens so groß sein sollte wie der RAM-Speicher. Außerdem wird empfohlen, dass der Swap-Speicher maximal doppelt so groß ist wie der RAM-Speicher, abhängig von der Größe des für das System verfügbaren Festplattenplatzes, wegen des abnehmenden Nutzens.&lt;br /&gt;
* Bei moderneren Systemen (&amp;gt;4 GB) sollte Ihr Auslagerungsplatz mindestens der Größe Ihres physischen Speichers (RAM) entsprechen, '''wenn Sie den Ruhezustand verwenden''', andernfalls benötigen Sie mindestens ROUNDUP(SQRT(RAM)), d.h. die Quadratwurzel Ihrer Arbeitsspeichergröße aufgerundet auf das nächste GB. Das Maximum ist auch hier das Doppelte der Arbeitsspeichergröße, ebenfalls wegen des abnehmenden Nutzens.&lt;br /&gt;
* Der einzige Nachteil, wenn Sie mehr Auslagerungsspeicher haben, als Sie tatsächlich benötigen, ist, dass der dafür reservierte Speicherplatz nicht für Anwendungs- oder Systemdaten verwendet werden kann.&lt;br /&gt;
&lt;br /&gt;
Der &amp;quot;abnehmende Nutzen&amp;quot; bedeutet, dass Sie, wenn Sie mehr Auslagerungsspeicher als das Doppelte Ihrer RAM-Größe benötigen, besser mehr RAM hinzufügen sollten, da der Zugriff auf die Festplatte (HDD) etwa 10³ langsamer ist als der Zugriff auf den RAM, so dass etwas, das 1 Sekunde dauern würde, plötzlich mehr als 15 Minuten dauert! Und auf einem Halbleiterlaufwerk (Solid State Drive, SSD) dauert derselbe Vorgang, der im RAM 1 Sekunde dauerte, auf dem SSD immer noch etwa 1 Minute!&lt;br /&gt;
&lt;br /&gt;
Unter Berücksichtigung aller oben genannten Punkte ergibt sich die folgende Tabelle:&lt;br /&gt;
&lt;br /&gt;
(die letzten 3 Spalten bezeichnen den Auslagerungsbereich)&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        1GB              1GB                 2GB      2GB&lt;br /&gt;
        2GB              2GB                 3GB      4GB&lt;br /&gt;
        3GB              3GB                 5GB      6GB&lt;br /&gt;
        4GB              4GB                 6GB      8GB&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        5GB              2GB                 7GB     10GB&lt;br /&gt;
        6GB              2GB                 8GB     12GB&lt;br /&gt;
        8GB              3GB                11GB     16GB&lt;br /&gt;
       12GB              3GB                15GB     24GB&lt;br /&gt;
       16GB              4GB                20GB     32GB&lt;br /&gt;
       24GB              5GB                29GB     48GB&lt;br /&gt;
       32GB              6GB                38GB     64GB&lt;br /&gt;
       64GB              8GB                72GB    128GB&lt;br /&gt;
      128GB             11GB               139GB    256GB&lt;br /&gt;
      256GB             16GB               272GB    512GB&lt;br /&gt;
      512GB             23GB               535GB      1TB&lt;br /&gt;
        1TB             32GB              1056GB      2TB&lt;br /&gt;
        2TB             46GB              2094GB      4TB&lt;br /&gt;
        4TB             64GB              4160GB      8TB&lt;br /&gt;
        8TB             91GB              8283GB     16TB&lt;br /&gt;
{{note|Der größte Server, den einer der Autoren dieses Wikis jemals installiert hat, hatte in der Tat 8TB RAM}}&lt;br /&gt;
=Auslagerungsinformationen anzeigen=&lt;br /&gt;
&lt;br /&gt;
Der Befehl {{ic|swapon}} zeigt Ihre aktuellen Swap-Informationen an.  Zum Beispiel:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE   USED PRIO&lt;br /&gt;
 /dev/sda7 partition  20G  44.3M   -2&lt;br /&gt;
&lt;br /&gt;
Das folgende Skript wird:&lt;br /&gt;
* zeigt an, ob zswap aktiv ist oder nicht, und wenn aktiv, gibt zswap Parameter an, wenn es mit dem Befehl {{$ic|sudo}} ausgeführt wird&lt;br /&gt;
* eine Liste aller Anwendungen / Dienste anzeigen, die Auslagerung beanspruchen und wie viel sie beanspruchen, in absteigender Reihenfolge&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Check whether running as root&lt;br /&gt;
 if [ &amp;quot;$(whoami)&amp;quot; = 'root' ]; then&lt;br /&gt;
   dmesg | grep &amp;quot;zswap:&amp;quot; | grep --silent &amp;quot;load&amp;quot;&lt;br /&gt;
   if [[ $? -eq 0 ]]; then&lt;br /&gt;
     # zswap is active&lt;br /&gt;
     echo &amp;quot;zswap information:&amp;quot;&lt;br /&gt;
     grep --recursive --color=none . /sys/kernel/debug/zswap/&lt;br /&gt;
     read -n 1 -s -r -p &amp;quot;Press any key to continue&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;[warning] zwap not active. Continuing&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;[warning] Not running as root: skipping zswap info&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 for szFile in /proc/*/status ; do&lt;br /&gt;
   awk '/VmSwap|Name/{printf $2 &amp;quot;\t&amp;quot; $3}END{ print &amp;quot;&amp;quot; }' &amp;quot;$szFile&amp;quot;&lt;br /&gt;
 done | sort --key 2 --numeric --reverse | more&lt;br /&gt;
=Eine Auslagerungspartition benutzen=&lt;br /&gt;
&lt;br /&gt;
Eine Auslagerungspartition ist die traditionelle Art, den Auslagerungsbereich zu verwalten.  In diesem Szenario wird eine dedizierte Partition (oder Partitionen) für die Unterbringung der Auslagerungsdaten erstellt.&lt;br /&gt;
==Erstellen und Aktivieren einer Auslagerungspartition==&lt;br /&gt;
&lt;br /&gt;
Um eine Auslagerungspartition zu erstellen, benötigen Sie genügend nicht zugewiesenen Speicherplatz, um eine zusätzliche Partition zu erstellen. Wenn Sie nicht genügend Platz haben, springen Sie zum nächsten Abschnitt [[Special:MyLanguage/#Using_a_swap_file|#Verwenden_einer_Auslagerungsdatei]]. Eine Auslagerungspartition kann in jeder Datenträgerverwaltung / Partitionsverwaltung erstellt werden und sollte als Typ {{ic|linuxswap}} eingerichtet werden.Special:MyLanguage/#Using_a_swap_file&lt;br /&gt;
&lt;br /&gt;
Sobald Sie eine Auslagerungspartition haben, müssen Sie die Auslagerungspartition mit {{ic|mkswap}} initialisieren.  Wenn Ihre Auslagerungspartition zum Beispiel {{ic|/dev/sda3}} ist, könnten Sie diesen Befehl verwenden:&lt;br /&gt;
 sudo mkswap /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swap partition with the {{ic|swapon}} command. Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /dev/sda3&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  It is best to use the UUID instead of the device name for this purpose.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo UUID=$(lsblk -no UUID /dev/sda3) none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you would like to have more than one swap partition, simply repeat the steps above for any additional partitions.&lt;br /&gt;
&lt;br /&gt;
{{note|Be sure to replace /dev/sda3 in the above commands with your actual swap partition.}}&lt;br /&gt;
{{tip|''If you're using a HDD'' (spinning rust) put the swap partition *at the beginning of the disk* as the speed of the disk is higher on the inside tracks. On an SSD this doesn't matter.}}&lt;br /&gt;
=Using a Swapfile=&lt;br /&gt;
&lt;br /&gt;
Using a swap partition has one major disadvantage:  Changing the size of swap or adding swap requires repartitioning the disk.  In current Linux kernels, it is possible to use a swap file instead of a dedicated partition and as from kernel 2.6 onwards there is no performance difference any more between the two.&lt;br /&gt;
&lt;br /&gt;
==Creating and Enabling a Static Swapfile==&lt;br /&gt;
{{tip|There is no reason you can't have both a swap partition and a swapfile.  This is an easy way to add more swap without repartitioning.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First create and intialize the file to hold the swap.  For example, to create a 4GB swapfile, you could use the command:&lt;br /&gt;
 sudo fallocate -l 4G /swapfile&lt;br /&gt;
 sudo mkswap /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the appropriate permissions on the file.  It should be readable and writable only by {{ic|root}}.  This can be done with the command:&lt;br /&gt;
 sudo chmod u=rw,go= /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swapfile with the {{ic|swapon}} command.  Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo /swapfile none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on BTRFS==&lt;br /&gt;
&lt;br /&gt;
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.&lt;br /&gt;
&lt;br /&gt;
Prior to running the {{ic|fallocate}} step above, you should run these commands:&lt;br /&gt;
 sudo truncate -s 0 /swapfile&lt;br /&gt;
 sudo chattr +C /swapfile&lt;br /&gt;
 sudo btrfs property set /swapfile compression none&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These commands create an empty swapfile, disable COW for that file and ensure that compression is disabled.&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on ZFS==&lt;br /&gt;
&lt;br /&gt;
zfs doesn't support swapfiles, however you can achieve a similar benefit using a zvol as a swap volume.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on how to accomplish this can be found in this [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device ZoL guide].&lt;br /&gt;
=Automated Swap Management with systemd-swap=&lt;br /&gt;
{{note|Using systemd-swap with on btrfs/zfs or with hibernation support requires special handling beyond the scope of this article}}&lt;br /&gt;
&lt;br /&gt;
It is possible to automatically manage the size of your swapfile using {{ic|systemd-swap}}.  It can create swap files dynamically based on memory needs.  It is also an easy way to enable/manage [[#Using_zswap_with_systemd-swap|zswap]]&lt;br /&gt;
&lt;br /&gt;
==Installing and Configuring systemd-swap==&lt;br /&gt;
&lt;br /&gt;
First, install and enable {{ic|systemd-swap}}:&lt;br /&gt;
 pamac install systemd-swap&lt;br /&gt;
 sudo systemctl enable systemd-swap.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next enable dynamic swap management by creating a file {{ic|/etc/systemd/swap.conf.d/myswap.conf}} with the following parameters:&lt;br /&gt;
 zswap_enabled=0&lt;br /&gt;
 zram_enabled=0&lt;br /&gt;
 swapfc_enabled=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would prefer a single command to create this file you could use:&lt;br /&gt;
 sudo bash -c 'echo -e &amp;quot;zswap_enabled=0\nzram_enabled=0\nswapfc_enabled=1&amp;quot; &amp;gt; /etc/systemd/swap.conf.d/myswap.conf'&lt;br /&gt;
&lt;br /&gt;
==Remove Other Swap==&lt;br /&gt;
&lt;br /&gt;
In order for systemd-swap to be effective you need to remove any traditional swap devices you have.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To display your current swap devices you can use the command {{ic|swapon}}.  For example, my test machine displays the following:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE USED PRIO&lt;br /&gt;
 /swapfile file        4G   0B   -2&lt;br /&gt;
 /dev/sda3 partition 8.4G   0B   -3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example there are two swap devices.  A swapfile and a swap partition.  To turn them off we can use the command {{ic|swapoff}}.&lt;br /&gt;
 sudo swapoff /swapfile&lt;br /&gt;
 sudo swapoff /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to remove them.  &lt;br /&gt;
The swap partition will need to be deleted using your favorite partitioning tool.  You can remove the swapfile by simply deleting it.&lt;br /&gt;
 sudo rm /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need to also remove any lines related to swap from {{ic|/etc/fstab}}.  Edit the file with an [[Special:MyLanguage/Viewing_and_editing_configuration_files|appropriate text editor]] and remove or comment out the lines for the swap space.  In the example above, we would remove these lines:&lt;br /&gt;
 UUID=c2430cf1-8ea9-4422-a5c5-5a38779194c3 swap           swap    defaults,noatime 0 2&lt;br /&gt;
 /swapfile none swap defaults 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next reboot.  After the reboot, when running {{ic|swapon}} you should see something similiar to the following:&lt;br /&gt;
 NAME                           TYPE SIZE USED PRIO&lt;br /&gt;
 /var/lib/systemd-swap/swapfc/1 file 512M   0B   -2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
systemd-swap will add and remove swapfiles as your memory usage dictates.&lt;br /&gt;
&lt;br /&gt;
{{note|If you don't delete your existing swap partition it will be automatically activated by systemd even though you have removed it from fstab}}&lt;br /&gt;
&lt;br /&gt;
==Using zswap with systemd-swap==&lt;br /&gt;
&lt;br /&gt;
zswap is compressed swap kept in RAM. zswap keeps the most frequently used pages in RAM and writes less frequently used pages to the swap space on disk.  In many workloads, this will result in increased swap performance and less wear and tear on SSDs.&lt;br /&gt;
&lt;br /&gt;
To enable zswap with systemd-swap, simply alter the instructions above and set Linux Kernel parameter {{ic|zswap_enabled=1}}&lt;br /&gt;
=Tuning &amp;amp; Performance Considerations=&lt;br /&gt;
&lt;br /&gt;
Although swap seems like a great way to expand memory, excessive swap use will cause severe performance degradation, as mentioned before.&lt;br /&gt;
&lt;br /&gt;
There are couple of parameters that can be used to tune swap utilization.  These are swappiness and vfs_cache_pressure.  To see your current settings for these you can use the following commands:&lt;br /&gt;
 cat /proc/sys/vm/swappiness&lt;br /&gt;
 cat /proc/sys/vm/vfs_cache_pressure&lt;br /&gt;
&lt;br /&gt;
{{ic|swappiness}} controls how likely a page is to be transferred to swap.  This value represents the percentage of the free memory before activating swap. The lower the value, the less swapping is used and the more memory pages are kept in physical memory where:&lt;br /&gt;
* 0 disables swap&lt;br /&gt;
* 60 is the default value which is ideal for a server running a lot of services&lt;br /&gt;
* 100 is very aggressive swapping.&lt;br /&gt;
&lt;br /&gt;
For ''most'' computers the recommended value is 10: Theoretically, this means to only start swapping when RAM usage reaches around 90 percent.&lt;br /&gt;
&lt;br /&gt;
{{ic|vfs_cache_pressure}} is a percentage value that controls the tendency of the kernel to ''reclaim'' the memory which is used for caching of directory and inode objects.  The default value is 100.  Increasing this value will increase the rate in which these objects are removed from the RAM cache.  Decreasing it will allow these objects to be cached in memory longer, consuming additional RAM over time.  Depending on your specific workload, increasing or decreasing this value too far can have significant negative impacts on system performance.  Experimentation is needed to find the appropriate balance and the default value is reasonable.  In general, it is more common to optimize swappiness before experimenting with vfs_cache_pressure.&lt;br /&gt;
&lt;br /&gt;
To set these values you can use the command {{ic|sysctl}}.  For example, to set the swappiness value to 10 you could use:&lt;br /&gt;
 sudo sysctl vm.swappiness=10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''There is no preset defined answer on the optimal values for these parameters.'''  Experimentation is needed to find the optimum configuration for your specific hardware and workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Swap swap]&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Zswap zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/vm/zswap.txt zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/sysctl/vm.txt swappiness and vfs_cache_pressure]&lt;br /&gt;
* The openSUSE guide to [https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.memory.html tuning memory]&lt;br /&gt;
* The [https://github.com/Nefelim4ag/systemd-swap systemd-swap page]&lt;br /&gt;
* The ZFS on Linux guide on [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device Swap Volumes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Translations:Swap/36/de&amp;diff=22333</id>
		<title>Translations:Swap/36/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Translations:Swap/36/de&amp;diff=22333"/>
		<updated>2021-04-02T00:47:23Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;Sobald Sie eine Auslagerungspartition haben, müssen Sie die Auslagerungspartition mit {{ic|mkswap}} initialisieren.  Wenn Ihre Auslagerungspartition zum Beispiel {{ic|/dev/sd...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sobald Sie eine Auslagerungspartition haben, müssen Sie die Auslagerungspartition mit {{ic|mkswap}} initialisieren.  Wenn Ihre Auslagerungspartition zum Beispiel {{ic|/dev/sda3}} ist, könnten Sie diesen Befehl verwenden:&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22332</id>
		<title>Swap/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22332"/>
		<updated>2021-04-02T00:46:23Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;Um eine Auslagerungspartition zu erstellen, benötigen Sie genügend nicht zugewiesenen Speicherplatz, um eine zusätzliche Partition zu erstellen. Wenn Sie nicht genügend Pl...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Übersicht=&lt;br /&gt;
&lt;br /&gt;
Der Auslagerungsspeicher wird zur Erweiterung des für die Ausführung von Programmen verfügbaren Speichers (RAM) verwendet.&lt;br /&gt;
* Ohne Auslagerungsspeicher werden bei Speichermangel die Anwendungen ''beendet'', was zu einem Absturz des gesamten Systems führen kann.&lt;br /&gt;
* Wenn dem System Auslagerungsspeicher zur Verfügung steht, kann der Kernel weniger häufig genutzte Speicherseiten von inaktiven Anwendungen / Diensten auf die Festplatte schreiben (&amp;quot;auslagern&amp;quot;), wodurch mehr echter Arbeitsspeicher für aktive Anwendungen zur Verfügung steht.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Es gibt drei verschiedene Möglichkeiten, wie der Swap in Manjaro verwaltet werden kann:&lt;br /&gt;
* Eine Auslagerungs-Partition&lt;br /&gt;
* Eine Auslagerungs-Datei&lt;br /&gt;
* Komprimierte Auslagerung (zswap)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dieser Artikel versucht, so umfassend wie möglich zu sein, aber noch mehr Informationen finden Sie in den  [[Special:MyLanguage/#See_Also|unten verlinkten Artikel]]&lt;br /&gt;
=Brauche ich eine Auslagerung?=&lt;br /&gt;
&lt;br /&gt;
Das ist eine Frage, die nicht beantwortet werden kann, ohne einen Blick auf Ihre Konfiguration zu werfen. Selbst bei reichlich verfügbarem Speicher wird dieser oft als Auffangnetz oder sogar manchmal aufgrund spezifischer Anwendungsanforderungen verwendet, also werfen Sie einen Blick auf die folgende nicht abschließende Liste:&lt;br /&gt;
* Wenn Sie den Ruhezustand verwenden: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie Dienste haben, die nicht immer aktiv sind, aber trotzdem ständig laufen: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die anstelle von RAM direkt virtuellen Speicher für temporäre Speicherung zuweist: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die ein Speicherleck hat: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie einen Server mit 1 TB RAM haben, den Sie als Desktop verwenden, ohne dass Anwendungen virtuellen Speicher zuweisen oder Speicherlecks haben: ''Nein, Sie müssen nicht auslagern!''&lt;br /&gt;
=Wie viel Auslagerungspeicher brauche ich?=&lt;br /&gt;
&lt;br /&gt;
Die benötigte Swap-Größe ist sehr variabel und hängt von ''Ihren'' spezifischen Anwendungen und der Arbeitslast ab.  Es gibt keine allgemeingültige Formel für die Größe des Auslagerungsspeichers, ohne die Nutzung über einen bestimmten Zeitraum hinweg zu überwachen.  Ein vernünftiger Ansatzpunkt wäre:&lt;br /&gt;
* Bei weniger als 4 GB physischem Speicher (RAM) wird dringend empfohlen, dass der Swap-Speicher mindestens so groß sein sollte wie der RAM-Speicher. Außerdem wird empfohlen, dass der Swap-Speicher maximal doppelt so groß ist wie der RAM-Speicher, abhängig von der Größe des für das System verfügbaren Festplattenplatzes, wegen des abnehmenden Nutzens.&lt;br /&gt;
* Bei moderneren Systemen (&amp;gt;4 GB) sollte Ihr Auslagerungsplatz mindestens der Größe Ihres physischen Speichers (RAM) entsprechen, '''wenn Sie den Ruhezustand verwenden''', andernfalls benötigen Sie mindestens ROUNDUP(SQRT(RAM)), d.h. die Quadratwurzel Ihrer Arbeitsspeichergröße aufgerundet auf das nächste GB. Das Maximum ist auch hier das Doppelte der Arbeitsspeichergröße, ebenfalls wegen des abnehmenden Nutzens.&lt;br /&gt;
* Der einzige Nachteil, wenn Sie mehr Auslagerungsspeicher haben, als Sie tatsächlich benötigen, ist, dass der dafür reservierte Speicherplatz nicht für Anwendungs- oder Systemdaten verwendet werden kann.&lt;br /&gt;
&lt;br /&gt;
Der &amp;quot;abnehmende Nutzen&amp;quot; bedeutet, dass Sie, wenn Sie mehr Auslagerungsspeicher als das Doppelte Ihrer RAM-Größe benötigen, besser mehr RAM hinzufügen sollten, da der Zugriff auf die Festplatte (HDD) etwa 10³ langsamer ist als der Zugriff auf den RAM, so dass etwas, das 1 Sekunde dauern würde, plötzlich mehr als 15 Minuten dauert! Und auf einem Halbleiterlaufwerk (Solid State Drive, SSD) dauert derselbe Vorgang, der im RAM 1 Sekunde dauerte, auf dem SSD immer noch etwa 1 Minute!&lt;br /&gt;
&lt;br /&gt;
Unter Berücksichtigung aller oben genannten Punkte ergibt sich die folgende Tabelle:&lt;br /&gt;
&lt;br /&gt;
(die letzten 3 Spalten bezeichnen den Auslagerungsbereich)&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        1GB              1GB                 2GB      2GB&lt;br /&gt;
        2GB              2GB                 3GB      4GB&lt;br /&gt;
        3GB              3GB                 5GB      6GB&lt;br /&gt;
        4GB              4GB                 6GB      8GB&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        5GB              2GB                 7GB     10GB&lt;br /&gt;
        6GB              2GB                 8GB     12GB&lt;br /&gt;
        8GB              3GB                11GB     16GB&lt;br /&gt;
       12GB              3GB                15GB     24GB&lt;br /&gt;
       16GB              4GB                20GB     32GB&lt;br /&gt;
       24GB              5GB                29GB     48GB&lt;br /&gt;
       32GB              6GB                38GB     64GB&lt;br /&gt;
       64GB              8GB                72GB    128GB&lt;br /&gt;
      128GB             11GB               139GB    256GB&lt;br /&gt;
      256GB             16GB               272GB    512GB&lt;br /&gt;
      512GB             23GB               535GB      1TB&lt;br /&gt;
        1TB             32GB              1056GB      2TB&lt;br /&gt;
        2TB             46GB              2094GB      4TB&lt;br /&gt;
        4TB             64GB              4160GB      8TB&lt;br /&gt;
        8TB             91GB              8283GB     16TB&lt;br /&gt;
{{note|Der größte Server, den einer der Autoren dieses Wikis jemals installiert hat, hatte in der Tat 8TB RAM}}&lt;br /&gt;
=Auslagerungsinformationen anzeigen=&lt;br /&gt;
&lt;br /&gt;
Der Befehl {{ic|swapon}} zeigt Ihre aktuellen Swap-Informationen an.  Zum Beispiel:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE   USED PRIO&lt;br /&gt;
 /dev/sda7 partition  20G  44.3M   -2&lt;br /&gt;
&lt;br /&gt;
Das folgende Skript wird:&lt;br /&gt;
* zeigt an, ob zswap aktiv ist oder nicht, und wenn aktiv, gibt zswap Parameter an, wenn es mit dem Befehl {{$ic|sudo}} ausgeführt wird&lt;br /&gt;
* eine Liste aller Anwendungen / Dienste anzeigen, die Auslagerung beanspruchen und wie viel sie beanspruchen, in absteigender Reihenfolge&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Check whether running as root&lt;br /&gt;
 if [ &amp;quot;$(whoami)&amp;quot; = 'root' ]; then&lt;br /&gt;
   dmesg | grep &amp;quot;zswap:&amp;quot; | grep --silent &amp;quot;load&amp;quot;&lt;br /&gt;
   if [[ $? -eq 0 ]]; then&lt;br /&gt;
     # zswap is active&lt;br /&gt;
     echo &amp;quot;zswap information:&amp;quot;&lt;br /&gt;
     grep --recursive --color=none . /sys/kernel/debug/zswap/&lt;br /&gt;
     read -n 1 -s -r -p &amp;quot;Press any key to continue&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;[warning] zwap not active. Continuing&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;[warning] Not running as root: skipping zswap info&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 for szFile in /proc/*/status ; do&lt;br /&gt;
   awk '/VmSwap|Name/{printf $2 &amp;quot;\t&amp;quot; $3}END{ print &amp;quot;&amp;quot; }' &amp;quot;$szFile&amp;quot;&lt;br /&gt;
 done | sort --key 2 --numeric --reverse | more&lt;br /&gt;
=Eine Auslagerungspartition benutzen=&lt;br /&gt;
&lt;br /&gt;
Eine Auslagerungspartition ist die traditionelle Art, den Auslagerungsbereich zu verwalten.  In diesem Szenario wird eine dedizierte Partition (oder Partitionen) für die Unterbringung der Auslagerungsdaten erstellt.&lt;br /&gt;
==Erstellen und Aktivieren einer Auslagerungspartition==&lt;br /&gt;
&lt;br /&gt;
Um eine Auslagerungspartition zu erstellen, benötigen Sie genügend nicht zugewiesenen Speicherplatz, um eine zusätzliche Partition zu erstellen. Wenn Sie nicht genügend Platz haben, springen Sie zum nächsten Abschnitt [[Special:MyLanguage/#Using_a_swap_file|#Verwenden_einer_Auslagerungsdatei]]. Eine Auslagerungspartition kann in jeder Datenträgerverwaltung / Partitionsverwaltung erstellt werden und sollte als Typ {{ic|linuxswap}} eingerichtet werden.Special:MyLanguage/#Using_a_swap_file&lt;br /&gt;
&lt;br /&gt;
Once you have a swap partition you will need to initialize the swap partition with {{ic|mkswap}}.  For example, if your swap partition is {{ic|/dev/sda3}}, you could use the command:&lt;br /&gt;
 sudo mkswap /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swap partition with the {{ic|swapon}} command. Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /dev/sda3&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  It is best to use the UUID instead of the device name for this purpose.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo UUID=$(lsblk -no UUID /dev/sda3) none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you would like to have more than one swap partition, simply repeat the steps above for any additional partitions.&lt;br /&gt;
&lt;br /&gt;
{{note|Be sure to replace /dev/sda3 in the above commands with your actual swap partition.}}&lt;br /&gt;
{{tip|''If you're using a HDD'' (spinning rust) put the swap partition *at the beginning of the disk* as the speed of the disk is higher on the inside tracks. On an SSD this doesn't matter.}}&lt;br /&gt;
=Using a Swapfile=&lt;br /&gt;
&lt;br /&gt;
Using a swap partition has one major disadvantage:  Changing the size of swap or adding swap requires repartitioning the disk.  In current Linux kernels, it is possible to use a swap file instead of a dedicated partition and as from kernel 2.6 onwards there is no performance difference any more between the two.&lt;br /&gt;
&lt;br /&gt;
==Creating and Enabling a Static Swapfile==&lt;br /&gt;
{{tip|There is no reason you can't have both a swap partition and a swapfile.  This is an easy way to add more swap without repartitioning.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First create and intialize the file to hold the swap.  For example, to create a 4GB swapfile, you could use the command:&lt;br /&gt;
 sudo fallocate -l 4G /swapfile&lt;br /&gt;
 sudo mkswap /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the appropriate permissions on the file.  It should be readable and writable only by {{ic|root}}.  This can be done with the command:&lt;br /&gt;
 sudo chmod u=rw,go= /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swapfile with the {{ic|swapon}} command.  Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo /swapfile none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on BTRFS==&lt;br /&gt;
&lt;br /&gt;
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.&lt;br /&gt;
&lt;br /&gt;
Prior to running the {{ic|fallocate}} step above, you should run these commands:&lt;br /&gt;
 sudo truncate -s 0 /swapfile&lt;br /&gt;
 sudo chattr +C /swapfile&lt;br /&gt;
 sudo btrfs property set /swapfile compression none&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These commands create an empty swapfile, disable COW for that file and ensure that compression is disabled.&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on ZFS==&lt;br /&gt;
&lt;br /&gt;
zfs doesn't support swapfiles, however you can achieve a similar benefit using a zvol as a swap volume.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on how to accomplish this can be found in this [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device ZoL guide].&lt;br /&gt;
=Automated Swap Management with systemd-swap=&lt;br /&gt;
{{note|Using systemd-swap with on btrfs/zfs or with hibernation support requires special handling beyond the scope of this article}}&lt;br /&gt;
&lt;br /&gt;
It is possible to automatically manage the size of your swapfile using {{ic|systemd-swap}}.  It can create swap files dynamically based on memory needs.  It is also an easy way to enable/manage [[#Using_zswap_with_systemd-swap|zswap]]&lt;br /&gt;
&lt;br /&gt;
==Installing and Configuring systemd-swap==&lt;br /&gt;
&lt;br /&gt;
First, install and enable {{ic|systemd-swap}}:&lt;br /&gt;
 pamac install systemd-swap&lt;br /&gt;
 sudo systemctl enable systemd-swap.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next enable dynamic swap management by creating a file {{ic|/etc/systemd/swap.conf.d/myswap.conf}} with the following parameters:&lt;br /&gt;
 zswap_enabled=0&lt;br /&gt;
 zram_enabled=0&lt;br /&gt;
 swapfc_enabled=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would prefer a single command to create this file you could use:&lt;br /&gt;
 sudo bash -c 'echo -e &amp;quot;zswap_enabled=0\nzram_enabled=0\nswapfc_enabled=1&amp;quot; &amp;gt; /etc/systemd/swap.conf.d/myswap.conf'&lt;br /&gt;
&lt;br /&gt;
==Remove Other Swap==&lt;br /&gt;
&lt;br /&gt;
In order for systemd-swap to be effective you need to remove any traditional swap devices you have.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To display your current swap devices you can use the command {{ic|swapon}}.  For example, my test machine displays the following:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE USED PRIO&lt;br /&gt;
 /swapfile file        4G   0B   -2&lt;br /&gt;
 /dev/sda3 partition 8.4G   0B   -3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example there are two swap devices.  A swapfile and a swap partition.  To turn them off we can use the command {{ic|swapoff}}.&lt;br /&gt;
 sudo swapoff /swapfile&lt;br /&gt;
 sudo swapoff /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to remove them.  &lt;br /&gt;
The swap partition will need to be deleted using your favorite partitioning tool.  You can remove the swapfile by simply deleting it.&lt;br /&gt;
 sudo rm /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need to also remove any lines related to swap from {{ic|/etc/fstab}}.  Edit the file with an [[Special:MyLanguage/Viewing_and_editing_configuration_files|appropriate text editor]] and remove or comment out the lines for the swap space.  In the example above, we would remove these lines:&lt;br /&gt;
 UUID=c2430cf1-8ea9-4422-a5c5-5a38779194c3 swap           swap    defaults,noatime 0 2&lt;br /&gt;
 /swapfile none swap defaults 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next reboot.  After the reboot, when running {{ic|swapon}} you should see something similiar to the following:&lt;br /&gt;
 NAME                           TYPE SIZE USED PRIO&lt;br /&gt;
 /var/lib/systemd-swap/swapfc/1 file 512M   0B   -2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
systemd-swap will add and remove swapfiles as your memory usage dictates.&lt;br /&gt;
&lt;br /&gt;
{{note|If you don't delete your existing swap partition it will be automatically activated by systemd even though you have removed it from fstab}}&lt;br /&gt;
&lt;br /&gt;
==Using zswap with systemd-swap==&lt;br /&gt;
&lt;br /&gt;
zswap is compressed swap kept in RAM. zswap keeps the most frequently used pages in RAM and writes less frequently used pages to the swap space on disk.  In many workloads, this will result in increased swap performance and less wear and tear on SSDs.&lt;br /&gt;
&lt;br /&gt;
To enable zswap with systemd-swap, simply alter the instructions above and set Linux Kernel parameter {{ic|zswap_enabled=1}}&lt;br /&gt;
=Tuning &amp;amp; Performance Considerations=&lt;br /&gt;
&lt;br /&gt;
Although swap seems like a great way to expand memory, excessive swap use will cause severe performance degradation, as mentioned before.&lt;br /&gt;
&lt;br /&gt;
There are couple of parameters that can be used to tune swap utilization.  These are swappiness and vfs_cache_pressure.  To see your current settings for these you can use the following commands:&lt;br /&gt;
 cat /proc/sys/vm/swappiness&lt;br /&gt;
 cat /proc/sys/vm/vfs_cache_pressure&lt;br /&gt;
&lt;br /&gt;
{{ic|swappiness}} controls how likely a page is to be transferred to swap.  This value represents the percentage of the free memory before activating swap. The lower the value, the less swapping is used and the more memory pages are kept in physical memory where:&lt;br /&gt;
* 0 disables swap&lt;br /&gt;
* 60 is the default value which is ideal for a server running a lot of services&lt;br /&gt;
* 100 is very aggressive swapping.&lt;br /&gt;
&lt;br /&gt;
For ''most'' computers the recommended value is 10: Theoretically, this means to only start swapping when RAM usage reaches around 90 percent.&lt;br /&gt;
&lt;br /&gt;
{{ic|vfs_cache_pressure}} is a percentage value that controls the tendency of the kernel to ''reclaim'' the memory which is used for caching of directory and inode objects.  The default value is 100.  Increasing this value will increase the rate in which these objects are removed from the RAM cache.  Decreasing it will allow these objects to be cached in memory longer, consuming additional RAM over time.  Depending on your specific workload, increasing or decreasing this value too far can have significant negative impacts on system performance.  Experimentation is needed to find the appropriate balance and the default value is reasonable.  In general, it is more common to optimize swappiness before experimenting with vfs_cache_pressure.&lt;br /&gt;
&lt;br /&gt;
To set these values you can use the command {{ic|sysctl}}.  For example, to set the swappiness value to 10 you could use:&lt;br /&gt;
 sudo sysctl vm.swappiness=10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''There is no preset defined answer on the optimal values for these parameters.'''  Experimentation is needed to find the optimum configuration for your specific hardware and workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Swap swap]&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Zswap zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/vm/zswap.txt zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/sysctl/vm.txt swappiness and vfs_cache_pressure]&lt;br /&gt;
* The openSUSE guide to [https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.memory.html tuning memory]&lt;br /&gt;
* The [https://github.com/Nefelim4ag/systemd-swap systemd-swap page]&lt;br /&gt;
* The ZFS on Linux guide on [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device Swap Volumes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Translations:Swap/35/de&amp;diff=22331</id>
		<title>Translations:Swap/35/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Translations:Swap/35/de&amp;diff=22331"/>
		<updated>2021-04-02T00:46:22Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;Um eine Auslagerungspartition zu erstellen, benötigen Sie genügend nicht zugewiesenen Speicherplatz, um eine zusätzliche Partition zu erstellen. Wenn Sie nicht genügend Pl...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Um eine Auslagerungspartition zu erstellen, benötigen Sie genügend nicht zugewiesenen Speicherplatz, um eine zusätzliche Partition zu erstellen. Wenn Sie nicht genügend Platz haben, springen Sie zum nächsten Abschnitt [[$link|#Verwenden_einer_Auslagerungsdatei]]. Eine Auslagerungspartition kann in jeder Datenträgerverwaltung / Partitionsverwaltung erstellt werden und sollte als Typ {{ic|linuxswap}} eingerichtet werden.$link&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22330</id>
		<title>Swap/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22330"/>
		<updated>2021-04-02T00:44:06Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;==Erstellen und Aktivieren einer Auslagerungspartition==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Übersicht=&lt;br /&gt;
&lt;br /&gt;
Der Auslagerungsspeicher wird zur Erweiterung des für die Ausführung von Programmen verfügbaren Speichers (RAM) verwendet.&lt;br /&gt;
* Ohne Auslagerungsspeicher werden bei Speichermangel die Anwendungen ''beendet'', was zu einem Absturz des gesamten Systems führen kann.&lt;br /&gt;
* Wenn dem System Auslagerungsspeicher zur Verfügung steht, kann der Kernel weniger häufig genutzte Speicherseiten von inaktiven Anwendungen / Diensten auf die Festplatte schreiben (&amp;quot;auslagern&amp;quot;), wodurch mehr echter Arbeitsspeicher für aktive Anwendungen zur Verfügung steht.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Es gibt drei verschiedene Möglichkeiten, wie der Swap in Manjaro verwaltet werden kann:&lt;br /&gt;
* Eine Auslagerungs-Partition&lt;br /&gt;
* Eine Auslagerungs-Datei&lt;br /&gt;
* Komprimierte Auslagerung (zswap)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dieser Artikel versucht, so umfassend wie möglich zu sein, aber noch mehr Informationen finden Sie in den  [[Special:MyLanguage/#See_Also|unten verlinkten Artikel]]&lt;br /&gt;
=Brauche ich eine Auslagerung?=&lt;br /&gt;
&lt;br /&gt;
Das ist eine Frage, die nicht beantwortet werden kann, ohne einen Blick auf Ihre Konfiguration zu werfen. Selbst bei reichlich verfügbarem Speicher wird dieser oft als Auffangnetz oder sogar manchmal aufgrund spezifischer Anwendungsanforderungen verwendet, also werfen Sie einen Blick auf die folgende nicht abschließende Liste:&lt;br /&gt;
* Wenn Sie den Ruhezustand verwenden: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie Dienste haben, die nicht immer aktiv sind, aber trotzdem ständig laufen: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die anstelle von RAM direkt virtuellen Speicher für temporäre Speicherung zuweist: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die ein Speicherleck hat: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie einen Server mit 1 TB RAM haben, den Sie als Desktop verwenden, ohne dass Anwendungen virtuellen Speicher zuweisen oder Speicherlecks haben: ''Nein, Sie müssen nicht auslagern!''&lt;br /&gt;
=Wie viel Auslagerungspeicher brauche ich?=&lt;br /&gt;
&lt;br /&gt;
Die benötigte Swap-Größe ist sehr variabel und hängt von ''Ihren'' spezifischen Anwendungen und der Arbeitslast ab.  Es gibt keine allgemeingültige Formel für die Größe des Auslagerungsspeichers, ohne die Nutzung über einen bestimmten Zeitraum hinweg zu überwachen.  Ein vernünftiger Ansatzpunkt wäre:&lt;br /&gt;
* Bei weniger als 4 GB physischem Speicher (RAM) wird dringend empfohlen, dass der Swap-Speicher mindestens so groß sein sollte wie der RAM-Speicher. Außerdem wird empfohlen, dass der Swap-Speicher maximal doppelt so groß ist wie der RAM-Speicher, abhängig von der Größe des für das System verfügbaren Festplattenplatzes, wegen des abnehmenden Nutzens.&lt;br /&gt;
* Bei moderneren Systemen (&amp;gt;4 GB) sollte Ihr Auslagerungsplatz mindestens der Größe Ihres physischen Speichers (RAM) entsprechen, '''wenn Sie den Ruhezustand verwenden''', andernfalls benötigen Sie mindestens ROUNDUP(SQRT(RAM)), d.h. die Quadratwurzel Ihrer Arbeitsspeichergröße aufgerundet auf das nächste GB. Das Maximum ist auch hier das Doppelte der Arbeitsspeichergröße, ebenfalls wegen des abnehmenden Nutzens.&lt;br /&gt;
* Der einzige Nachteil, wenn Sie mehr Auslagerungsspeicher haben, als Sie tatsächlich benötigen, ist, dass der dafür reservierte Speicherplatz nicht für Anwendungs- oder Systemdaten verwendet werden kann.&lt;br /&gt;
&lt;br /&gt;
Der &amp;quot;abnehmende Nutzen&amp;quot; bedeutet, dass Sie, wenn Sie mehr Auslagerungsspeicher als das Doppelte Ihrer RAM-Größe benötigen, besser mehr RAM hinzufügen sollten, da der Zugriff auf die Festplatte (HDD) etwa 10³ langsamer ist als der Zugriff auf den RAM, so dass etwas, das 1 Sekunde dauern würde, plötzlich mehr als 15 Minuten dauert! Und auf einem Halbleiterlaufwerk (Solid State Drive, SSD) dauert derselbe Vorgang, der im RAM 1 Sekunde dauerte, auf dem SSD immer noch etwa 1 Minute!&lt;br /&gt;
&lt;br /&gt;
Unter Berücksichtigung aller oben genannten Punkte ergibt sich die folgende Tabelle:&lt;br /&gt;
&lt;br /&gt;
(die letzten 3 Spalten bezeichnen den Auslagerungsbereich)&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        1GB              1GB                 2GB      2GB&lt;br /&gt;
        2GB              2GB                 3GB      4GB&lt;br /&gt;
        3GB              3GB                 5GB      6GB&lt;br /&gt;
        4GB              4GB                 6GB      8GB&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        5GB              2GB                 7GB     10GB&lt;br /&gt;
        6GB              2GB                 8GB     12GB&lt;br /&gt;
        8GB              3GB                11GB     16GB&lt;br /&gt;
       12GB              3GB                15GB     24GB&lt;br /&gt;
       16GB              4GB                20GB     32GB&lt;br /&gt;
       24GB              5GB                29GB     48GB&lt;br /&gt;
       32GB              6GB                38GB     64GB&lt;br /&gt;
       64GB              8GB                72GB    128GB&lt;br /&gt;
      128GB             11GB               139GB    256GB&lt;br /&gt;
      256GB             16GB               272GB    512GB&lt;br /&gt;
      512GB             23GB               535GB      1TB&lt;br /&gt;
        1TB             32GB              1056GB      2TB&lt;br /&gt;
        2TB             46GB              2094GB      4TB&lt;br /&gt;
        4TB             64GB              4160GB      8TB&lt;br /&gt;
        8TB             91GB              8283GB     16TB&lt;br /&gt;
{{note|Der größte Server, den einer der Autoren dieses Wikis jemals installiert hat, hatte in der Tat 8TB RAM}}&lt;br /&gt;
=Auslagerungsinformationen anzeigen=&lt;br /&gt;
&lt;br /&gt;
Der Befehl {{ic|swapon}} zeigt Ihre aktuellen Swap-Informationen an.  Zum Beispiel:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE   USED PRIO&lt;br /&gt;
 /dev/sda7 partition  20G  44.3M   -2&lt;br /&gt;
&lt;br /&gt;
Das folgende Skript wird:&lt;br /&gt;
* zeigt an, ob zswap aktiv ist oder nicht, und wenn aktiv, gibt zswap Parameter an, wenn es mit dem Befehl {{$ic|sudo}} ausgeführt wird&lt;br /&gt;
* eine Liste aller Anwendungen / Dienste anzeigen, die Auslagerung beanspruchen und wie viel sie beanspruchen, in absteigender Reihenfolge&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Check whether running as root&lt;br /&gt;
 if [ &amp;quot;$(whoami)&amp;quot; = 'root' ]; then&lt;br /&gt;
   dmesg | grep &amp;quot;zswap:&amp;quot; | grep --silent &amp;quot;load&amp;quot;&lt;br /&gt;
   if [[ $? -eq 0 ]]; then&lt;br /&gt;
     # zswap is active&lt;br /&gt;
     echo &amp;quot;zswap information:&amp;quot;&lt;br /&gt;
     grep --recursive --color=none . /sys/kernel/debug/zswap/&lt;br /&gt;
     read -n 1 -s -r -p &amp;quot;Press any key to continue&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;[warning] zwap not active. Continuing&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;[warning] Not running as root: skipping zswap info&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 for szFile in /proc/*/status ; do&lt;br /&gt;
   awk '/VmSwap|Name/{printf $2 &amp;quot;\t&amp;quot; $3}END{ print &amp;quot;&amp;quot; }' &amp;quot;$szFile&amp;quot;&lt;br /&gt;
 done | sort --key 2 --numeric --reverse | more&lt;br /&gt;
=Eine Auslagerungspartition benutzen=&lt;br /&gt;
&lt;br /&gt;
Eine Auslagerungspartition ist die traditionelle Art, den Auslagerungsbereich zu verwalten.  In diesem Szenario wird eine dedizierte Partition (oder Partitionen) für die Unterbringung der Auslagerungsdaten erstellt.&lt;br /&gt;
==Erstellen und Aktivieren einer Auslagerungspartition==&lt;br /&gt;
&lt;br /&gt;
To create a swap partition, you need enough unallocated disk space to create an additional partition. If you do not have enough space, skip to the next section [[Special:MyLanguage/#Using_a_swap_file|#Using_a_swap_file]]. A swap partition can be created in any disk management / partition management tool and should be set as type {{ic|linuxswap}}.&lt;br /&gt;
&lt;br /&gt;
Once you have a swap partition you will need to initialize the swap partition with {{ic|mkswap}}.  For example, if your swap partition is {{ic|/dev/sda3}}, you could use the command:&lt;br /&gt;
 sudo mkswap /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swap partition with the {{ic|swapon}} command. Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /dev/sda3&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  It is best to use the UUID instead of the device name for this purpose.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo UUID=$(lsblk -no UUID /dev/sda3) none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you would like to have more than one swap partition, simply repeat the steps above for any additional partitions.&lt;br /&gt;
&lt;br /&gt;
{{note|Be sure to replace /dev/sda3 in the above commands with your actual swap partition.}}&lt;br /&gt;
{{tip|''If you're using a HDD'' (spinning rust) put the swap partition *at the beginning of the disk* as the speed of the disk is higher on the inside tracks. On an SSD this doesn't matter.}}&lt;br /&gt;
=Using a Swapfile=&lt;br /&gt;
&lt;br /&gt;
Using a swap partition has one major disadvantage:  Changing the size of swap or adding swap requires repartitioning the disk.  In current Linux kernels, it is possible to use a swap file instead of a dedicated partition and as from kernel 2.6 onwards there is no performance difference any more between the two.&lt;br /&gt;
&lt;br /&gt;
==Creating and Enabling a Static Swapfile==&lt;br /&gt;
{{tip|There is no reason you can't have both a swap partition and a swapfile.  This is an easy way to add more swap without repartitioning.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First create and intialize the file to hold the swap.  For example, to create a 4GB swapfile, you could use the command:&lt;br /&gt;
 sudo fallocate -l 4G /swapfile&lt;br /&gt;
 sudo mkswap /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the appropriate permissions on the file.  It should be readable and writable only by {{ic|root}}.  This can be done with the command:&lt;br /&gt;
 sudo chmod u=rw,go= /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swapfile with the {{ic|swapon}} command.  Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo /swapfile none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on BTRFS==&lt;br /&gt;
&lt;br /&gt;
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.&lt;br /&gt;
&lt;br /&gt;
Prior to running the {{ic|fallocate}} step above, you should run these commands:&lt;br /&gt;
 sudo truncate -s 0 /swapfile&lt;br /&gt;
 sudo chattr +C /swapfile&lt;br /&gt;
 sudo btrfs property set /swapfile compression none&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These commands create an empty swapfile, disable COW for that file and ensure that compression is disabled.&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on ZFS==&lt;br /&gt;
&lt;br /&gt;
zfs doesn't support swapfiles, however you can achieve a similar benefit using a zvol as a swap volume.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on how to accomplish this can be found in this [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device ZoL guide].&lt;br /&gt;
=Automated Swap Management with systemd-swap=&lt;br /&gt;
{{note|Using systemd-swap with on btrfs/zfs or with hibernation support requires special handling beyond the scope of this article}}&lt;br /&gt;
&lt;br /&gt;
It is possible to automatically manage the size of your swapfile using {{ic|systemd-swap}}.  It can create swap files dynamically based on memory needs.  It is also an easy way to enable/manage [[#Using_zswap_with_systemd-swap|zswap]]&lt;br /&gt;
&lt;br /&gt;
==Installing and Configuring systemd-swap==&lt;br /&gt;
&lt;br /&gt;
First, install and enable {{ic|systemd-swap}}:&lt;br /&gt;
 pamac install systemd-swap&lt;br /&gt;
 sudo systemctl enable systemd-swap.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next enable dynamic swap management by creating a file {{ic|/etc/systemd/swap.conf.d/myswap.conf}} with the following parameters:&lt;br /&gt;
 zswap_enabled=0&lt;br /&gt;
 zram_enabled=0&lt;br /&gt;
 swapfc_enabled=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would prefer a single command to create this file you could use:&lt;br /&gt;
 sudo bash -c 'echo -e &amp;quot;zswap_enabled=0\nzram_enabled=0\nswapfc_enabled=1&amp;quot; &amp;gt; /etc/systemd/swap.conf.d/myswap.conf'&lt;br /&gt;
&lt;br /&gt;
==Remove Other Swap==&lt;br /&gt;
&lt;br /&gt;
In order for systemd-swap to be effective you need to remove any traditional swap devices you have.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To display your current swap devices you can use the command {{ic|swapon}}.  For example, my test machine displays the following:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE USED PRIO&lt;br /&gt;
 /swapfile file        4G   0B   -2&lt;br /&gt;
 /dev/sda3 partition 8.4G   0B   -3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example there are two swap devices.  A swapfile and a swap partition.  To turn them off we can use the command {{ic|swapoff}}.&lt;br /&gt;
 sudo swapoff /swapfile&lt;br /&gt;
 sudo swapoff /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to remove them.  &lt;br /&gt;
The swap partition will need to be deleted using your favorite partitioning tool.  You can remove the swapfile by simply deleting it.&lt;br /&gt;
 sudo rm /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need to also remove any lines related to swap from {{ic|/etc/fstab}}.  Edit the file with an [[Special:MyLanguage/Viewing_and_editing_configuration_files|appropriate text editor]] and remove or comment out the lines for the swap space.  In the example above, we would remove these lines:&lt;br /&gt;
 UUID=c2430cf1-8ea9-4422-a5c5-5a38779194c3 swap           swap    defaults,noatime 0 2&lt;br /&gt;
 /swapfile none swap defaults 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next reboot.  After the reboot, when running {{ic|swapon}} you should see something similiar to the following:&lt;br /&gt;
 NAME                           TYPE SIZE USED PRIO&lt;br /&gt;
 /var/lib/systemd-swap/swapfc/1 file 512M   0B   -2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
systemd-swap will add and remove swapfiles as your memory usage dictates.&lt;br /&gt;
&lt;br /&gt;
{{note|If you don't delete your existing swap partition it will be automatically activated by systemd even though you have removed it from fstab}}&lt;br /&gt;
&lt;br /&gt;
==Using zswap with systemd-swap==&lt;br /&gt;
&lt;br /&gt;
zswap is compressed swap kept in RAM. zswap keeps the most frequently used pages in RAM and writes less frequently used pages to the swap space on disk.  In many workloads, this will result in increased swap performance and less wear and tear on SSDs.&lt;br /&gt;
&lt;br /&gt;
To enable zswap with systemd-swap, simply alter the instructions above and set Linux Kernel parameter {{ic|zswap_enabled=1}}&lt;br /&gt;
=Tuning &amp;amp; Performance Considerations=&lt;br /&gt;
&lt;br /&gt;
Although swap seems like a great way to expand memory, excessive swap use will cause severe performance degradation, as mentioned before.&lt;br /&gt;
&lt;br /&gt;
There are couple of parameters that can be used to tune swap utilization.  These are swappiness and vfs_cache_pressure.  To see your current settings for these you can use the following commands:&lt;br /&gt;
 cat /proc/sys/vm/swappiness&lt;br /&gt;
 cat /proc/sys/vm/vfs_cache_pressure&lt;br /&gt;
&lt;br /&gt;
{{ic|swappiness}} controls how likely a page is to be transferred to swap.  This value represents the percentage of the free memory before activating swap. The lower the value, the less swapping is used and the more memory pages are kept in physical memory where:&lt;br /&gt;
* 0 disables swap&lt;br /&gt;
* 60 is the default value which is ideal for a server running a lot of services&lt;br /&gt;
* 100 is very aggressive swapping.&lt;br /&gt;
&lt;br /&gt;
For ''most'' computers the recommended value is 10: Theoretically, this means to only start swapping when RAM usage reaches around 90 percent.&lt;br /&gt;
&lt;br /&gt;
{{ic|vfs_cache_pressure}} is a percentage value that controls the tendency of the kernel to ''reclaim'' the memory which is used for caching of directory and inode objects.  The default value is 100.  Increasing this value will increase the rate in which these objects are removed from the RAM cache.  Decreasing it will allow these objects to be cached in memory longer, consuming additional RAM over time.  Depending on your specific workload, increasing or decreasing this value too far can have significant negative impacts on system performance.  Experimentation is needed to find the appropriate balance and the default value is reasonable.  In general, it is more common to optimize swappiness before experimenting with vfs_cache_pressure.&lt;br /&gt;
&lt;br /&gt;
To set these values you can use the command {{ic|sysctl}}.  For example, to set the swappiness value to 10 you could use:&lt;br /&gt;
 sudo sysctl vm.swappiness=10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''There is no preset defined answer on the optimal values for these parameters.'''  Experimentation is needed to find the optimum configuration for your specific hardware and workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Swap swap]&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Zswap zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/vm/zswap.txt zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/sysctl/vm.txt swappiness and vfs_cache_pressure]&lt;br /&gt;
* The openSUSE guide to [https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.memory.html tuning memory]&lt;br /&gt;
* The [https://github.com/Nefelim4ag/systemd-swap systemd-swap page]&lt;br /&gt;
* The ZFS on Linux guide on [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device Swap Volumes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Translations:Swap/34/de&amp;diff=22329</id>
		<title>Translations:Swap/34/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Translations:Swap/34/de&amp;diff=22329"/>
		<updated>2021-04-02T00:44:06Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;==Erstellen und Aktivieren einer Auslagerungspartition==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Erstellen und Aktivieren einer Auslagerungspartition==&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22328</id>
		<title>Swap/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22328"/>
		<updated>2021-04-02T00:43:34Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;Eine Auslagerungspartition ist die traditionelle Art, den Auslagerungsbereich zu verwalten.  In diesem Szenario wird eine dedizierte Partition (oder Partitionen) für die Unte...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Übersicht=&lt;br /&gt;
&lt;br /&gt;
Der Auslagerungsspeicher wird zur Erweiterung des für die Ausführung von Programmen verfügbaren Speichers (RAM) verwendet.&lt;br /&gt;
* Ohne Auslagerungsspeicher werden bei Speichermangel die Anwendungen ''beendet'', was zu einem Absturz des gesamten Systems führen kann.&lt;br /&gt;
* Wenn dem System Auslagerungsspeicher zur Verfügung steht, kann der Kernel weniger häufig genutzte Speicherseiten von inaktiven Anwendungen / Diensten auf die Festplatte schreiben (&amp;quot;auslagern&amp;quot;), wodurch mehr echter Arbeitsspeicher für aktive Anwendungen zur Verfügung steht.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Es gibt drei verschiedene Möglichkeiten, wie der Swap in Manjaro verwaltet werden kann:&lt;br /&gt;
* Eine Auslagerungs-Partition&lt;br /&gt;
* Eine Auslagerungs-Datei&lt;br /&gt;
* Komprimierte Auslagerung (zswap)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dieser Artikel versucht, so umfassend wie möglich zu sein, aber noch mehr Informationen finden Sie in den  [[Special:MyLanguage/#See_Also|unten verlinkten Artikel]]&lt;br /&gt;
=Brauche ich eine Auslagerung?=&lt;br /&gt;
&lt;br /&gt;
Das ist eine Frage, die nicht beantwortet werden kann, ohne einen Blick auf Ihre Konfiguration zu werfen. Selbst bei reichlich verfügbarem Speicher wird dieser oft als Auffangnetz oder sogar manchmal aufgrund spezifischer Anwendungsanforderungen verwendet, also werfen Sie einen Blick auf die folgende nicht abschließende Liste:&lt;br /&gt;
* Wenn Sie den Ruhezustand verwenden: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie Dienste haben, die nicht immer aktiv sind, aber trotzdem ständig laufen: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die anstelle von RAM direkt virtuellen Speicher für temporäre Speicherung zuweist: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die ein Speicherleck hat: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie einen Server mit 1 TB RAM haben, den Sie als Desktop verwenden, ohne dass Anwendungen virtuellen Speicher zuweisen oder Speicherlecks haben: ''Nein, Sie müssen nicht auslagern!''&lt;br /&gt;
=Wie viel Auslagerungspeicher brauche ich?=&lt;br /&gt;
&lt;br /&gt;
Die benötigte Swap-Größe ist sehr variabel und hängt von ''Ihren'' spezifischen Anwendungen und der Arbeitslast ab.  Es gibt keine allgemeingültige Formel für die Größe des Auslagerungsspeichers, ohne die Nutzung über einen bestimmten Zeitraum hinweg zu überwachen.  Ein vernünftiger Ansatzpunkt wäre:&lt;br /&gt;
* Bei weniger als 4 GB physischem Speicher (RAM) wird dringend empfohlen, dass der Swap-Speicher mindestens so groß sein sollte wie der RAM-Speicher. Außerdem wird empfohlen, dass der Swap-Speicher maximal doppelt so groß ist wie der RAM-Speicher, abhängig von der Größe des für das System verfügbaren Festplattenplatzes, wegen des abnehmenden Nutzens.&lt;br /&gt;
* Bei moderneren Systemen (&amp;gt;4 GB) sollte Ihr Auslagerungsplatz mindestens der Größe Ihres physischen Speichers (RAM) entsprechen, '''wenn Sie den Ruhezustand verwenden''', andernfalls benötigen Sie mindestens ROUNDUP(SQRT(RAM)), d.h. die Quadratwurzel Ihrer Arbeitsspeichergröße aufgerundet auf das nächste GB. Das Maximum ist auch hier das Doppelte der Arbeitsspeichergröße, ebenfalls wegen des abnehmenden Nutzens.&lt;br /&gt;
* Der einzige Nachteil, wenn Sie mehr Auslagerungsspeicher haben, als Sie tatsächlich benötigen, ist, dass der dafür reservierte Speicherplatz nicht für Anwendungs- oder Systemdaten verwendet werden kann.&lt;br /&gt;
&lt;br /&gt;
Der &amp;quot;abnehmende Nutzen&amp;quot; bedeutet, dass Sie, wenn Sie mehr Auslagerungsspeicher als das Doppelte Ihrer RAM-Größe benötigen, besser mehr RAM hinzufügen sollten, da der Zugriff auf die Festplatte (HDD) etwa 10³ langsamer ist als der Zugriff auf den RAM, so dass etwas, das 1 Sekunde dauern würde, plötzlich mehr als 15 Minuten dauert! Und auf einem Halbleiterlaufwerk (Solid State Drive, SSD) dauert derselbe Vorgang, der im RAM 1 Sekunde dauerte, auf dem SSD immer noch etwa 1 Minute!&lt;br /&gt;
&lt;br /&gt;
Unter Berücksichtigung aller oben genannten Punkte ergibt sich die folgende Tabelle:&lt;br /&gt;
&lt;br /&gt;
(die letzten 3 Spalten bezeichnen den Auslagerungsbereich)&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        1GB              1GB                 2GB      2GB&lt;br /&gt;
        2GB              2GB                 3GB      4GB&lt;br /&gt;
        3GB              3GB                 5GB      6GB&lt;br /&gt;
        4GB              4GB                 6GB      8GB&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        5GB              2GB                 7GB     10GB&lt;br /&gt;
        6GB              2GB                 8GB     12GB&lt;br /&gt;
        8GB              3GB                11GB     16GB&lt;br /&gt;
       12GB              3GB                15GB     24GB&lt;br /&gt;
       16GB              4GB                20GB     32GB&lt;br /&gt;
       24GB              5GB                29GB     48GB&lt;br /&gt;
       32GB              6GB                38GB     64GB&lt;br /&gt;
       64GB              8GB                72GB    128GB&lt;br /&gt;
      128GB             11GB               139GB    256GB&lt;br /&gt;
      256GB             16GB               272GB    512GB&lt;br /&gt;
      512GB             23GB               535GB      1TB&lt;br /&gt;
        1TB             32GB              1056GB      2TB&lt;br /&gt;
        2TB             46GB              2094GB      4TB&lt;br /&gt;
        4TB             64GB              4160GB      8TB&lt;br /&gt;
        8TB             91GB              8283GB     16TB&lt;br /&gt;
{{note|Der größte Server, den einer der Autoren dieses Wikis jemals installiert hat, hatte in der Tat 8TB RAM}}&lt;br /&gt;
=Auslagerungsinformationen anzeigen=&lt;br /&gt;
&lt;br /&gt;
Der Befehl {{ic|swapon}} zeigt Ihre aktuellen Swap-Informationen an.  Zum Beispiel:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE   USED PRIO&lt;br /&gt;
 /dev/sda7 partition  20G  44.3M   -2&lt;br /&gt;
&lt;br /&gt;
Das folgende Skript wird:&lt;br /&gt;
* zeigt an, ob zswap aktiv ist oder nicht, und wenn aktiv, gibt zswap Parameter an, wenn es mit dem Befehl {{$ic|sudo}} ausgeführt wird&lt;br /&gt;
* eine Liste aller Anwendungen / Dienste anzeigen, die Auslagerung beanspruchen und wie viel sie beanspruchen, in absteigender Reihenfolge&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Check whether running as root&lt;br /&gt;
 if [ &amp;quot;$(whoami)&amp;quot; = 'root' ]; then&lt;br /&gt;
   dmesg | grep &amp;quot;zswap:&amp;quot; | grep --silent &amp;quot;load&amp;quot;&lt;br /&gt;
   if [[ $? -eq 0 ]]; then&lt;br /&gt;
     # zswap is active&lt;br /&gt;
     echo &amp;quot;zswap information:&amp;quot;&lt;br /&gt;
     grep --recursive --color=none . /sys/kernel/debug/zswap/&lt;br /&gt;
     read -n 1 -s -r -p &amp;quot;Press any key to continue&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;[warning] zwap not active. Continuing&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;[warning] Not running as root: skipping zswap info&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 for szFile in /proc/*/status ; do&lt;br /&gt;
   awk '/VmSwap|Name/{printf $2 &amp;quot;\t&amp;quot; $3}END{ print &amp;quot;&amp;quot; }' &amp;quot;$szFile&amp;quot;&lt;br /&gt;
 done | sort --key 2 --numeric --reverse | more&lt;br /&gt;
=Eine Auslagerungspartition benutzen=&lt;br /&gt;
&lt;br /&gt;
Eine Auslagerungspartition ist die traditionelle Art, den Auslagerungsbereich zu verwalten.  In diesem Szenario wird eine dedizierte Partition (oder Partitionen) für die Unterbringung der Auslagerungsdaten erstellt.&lt;br /&gt;
==Creating and Enabling a Swap Partition==&lt;br /&gt;
&lt;br /&gt;
To create a swap partition, you need enough unallocated disk space to create an additional partition. If you do not have enough space, skip to the next section [[Special:MyLanguage/#Using_a_swap_file|#Using_a_swap_file]]. A swap partition can be created in any disk management / partition management tool and should be set as type {{ic|linuxswap}}.&lt;br /&gt;
&lt;br /&gt;
Once you have a swap partition you will need to initialize the swap partition with {{ic|mkswap}}.  For example, if your swap partition is {{ic|/dev/sda3}}, you could use the command:&lt;br /&gt;
 sudo mkswap /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swap partition with the {{ic|swapon}} command. Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /dev/sda3&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  It is best to use the UUID instead of the device name for this purpose.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo UUID=$(lsblk -no UUID /dev/sda3) none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you would like to have more than one swap partition, simply repeat the steps above for any additional partitions.&lt;br /&gt;
&lt;br /&gt;
{{note|Be sure to replace /dev/sda3 in the above commands with your actual swap partition.}}&lt;br /&gt;
{{tip|''If you're using a HDD'' (spinning rust) put the swap partition *at the beginning of the disk* as the speed of the disk is higher on the inside tracks. On an SSD this doesn't matter.}}&lt;br /&gt;
=Using a Swapfile=&lt;br /&gt;
&lt;br /&gt;
Using a swap partition has one major disadvantage:  Changing the size of swap or adding swap requires repartitioning the disk.  In current Linux kernels, it is possible to use a swap file instead of a dedicated partition and as from kernel 2.6 onwards there is no performance difference any more between the two.&lt;br /&gt;
&lt;br /&gt;
==Creating and Enabling a Static Swapfile==&lt;br /&gt;
{{tip|There is no reason you can't have both a swap partition and a swapfile.  This is an easy way to add more swap without repartitioning.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First create and intialize the file to hold the swap.  For example, to create a 4GB swapfile, you could use the command:&lt;br /&gt;
 sudo fallocate -l 4G /swapfile&lt;br /&gt;
 sudo mkswap /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the appropriate permissions on the file.  It should be readable and writable only by {{ic|root}}.  This can be done with the command:&lt;br /&gt;
 sudo chmod u=rw,go= /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swapfile with the {{ic|swapon}} command.  Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo /swapfile none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on BTRFS==&lt;br /&gt;
&lt;br /&gt;
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.&lt;br /&gt;
&lt;br /&gt;
Prior to running the {{ic|fallocate}} step above, you should run these commands:&lt;br /&gt;
 sudo truncate -s 0 /swapfile&lt;br /&gt;
 sudo chattr +C /swapfile&lt;br /&gt;
 sudo btrfs property set /swapfile compression none&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These commands create an empty swapfile, disable COW for that file and ensure that compression is disabled.&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on ZFS==&lt;br /&gt;
&lt;br /&gt;
zfs doesn't support swapfiles, however you can achieve a similar benefit using a zvol as a swap volume.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on how to accomplish this can be found in this [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device ZoL guide].&lt;br /&gt;
=Automated Swap Management with systemd-swap=&lt;br /&gt;
{{note|Using systemd-swap with on btrfs/zfs or with hibernation support requires special handling beyond the scope of this article}}&lt;br /&gt;
&lt;br /&gt;
It is possible to automatically manage the size of your swapfile using {{ic|systemd-swap}}.  It can create swap files dynamically based on memory needs.  It is also an easy way to enable/manage [[#Using_zswap_with_systemd-swap|zswap]]&lt;br /&gt;
&lt;br /&gt;
==Installing and Configuring systemd-swap==&lt;br /&gt;
&lt;br /&gt;
First, install and enable {{ic|systemd-swap}}:&lt;br /&gt;
 pamac install systemd-swap&lt;br /&gt;
 sudo systemctl enable systemd-swap.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next enable dynamic swap management by creating a file {{ic|/etc/systemd/swap.conf.d/myswap.conf}} with the following parameters:&lt;br /&gt;
 zswap_enabled=0&lt;br /&gt;
 zram_enabled=0&lt;br /&gt;
 swapfc_enabled=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would prefer a single command to create this file you could use:&lt;br /&gt;
 sudo bash -c 'echo -e &amp;quot;zswap_enabled=0\nzram_enabled=0\nswapfc_enabled=1&amp;quot; &amp;gt; /etc/systemd/swap.conf.d/myswap.conf'&lt;br /&gt;
&lt;br /&gt;
==Remove Other Swap==&lt;br /&gt;
&lt;br /&gt;
In order for systemd-swap to be effective you need to remove any traditional swap devices you have.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To display your current swap devices you can use the command {{ic|swapon}}.  For example, my test machine displays the following:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE USED PRIO&lt;br /&gt;
 /swapfile file        4G   0B   -2&lt;br /&gt;
 /dev/sda3 partition 8.4G   0B   -3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example there are two swap devices.  A swapfile and a swap partition.  To turn them off we can use the command {{ic|swapoff}}.&lt;br /&gt;
 sudo swapoff /swapfile&lt;br /&gt;
 sudo swapoff /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to remove them.  &lt;br /&gt;
The swap partition will need to be deleted using your favorite partitioning tool.  You can remove the swapfile by simply deleting it.&lt;br /&gt;
 sudo rm /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need to also remove any lines related to swap from {{ic|/etc/fstab}}.  Edit the file with an [[Special:MyLanguage/Viewing_and_editing_configuration_files|appropriate text editor]] and remove or comment out the lines for the swap space.  In the example above, we would remove these lines:&lt;br /&gt;
 UUID=c2430cf1-8ea9-4422-a5c5-5a38779194c3 swap           swap    defaults,noatime 0 2&lt;br /&gt;
 /swapfile none swap defaults 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next reboot.  After the reboot, when running {{ic|swapon}} you should see something similiar to the following:&lt;br /&gt;
 NAME                           TYPE SIZE USED PRIO&lt;br /&gt;
 /var/lib/systemd-swap/swapfc/1 file 512M   0B   -2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
systemd-swap will add and remove swapfiles as your memory usage dictates.&lt;br /&gt;
&lt;br /&gt;
{{note|If you don't delete your existing swap partition it will be automatically activated by systemd even though you have removed it from fstab}}&lt;br /&gt;
&lt;br /&gt;
==Using zswap with systemd-swap==&lt;br /&gt;
&lt;br /&gt;
zswap is compressed swap kept in RAM. zswap keeps the most frequently used pages in RAM and writes less frequently used pages to the swap space on disk.  In many workloads, this will result in increased swap performance and less wear and tear on SSDs.&lt;br /&gt;
&lt;br /&gt;
To enable zswap with systemd-swap, simply alter the instructions above and set Linux Kernel parameter {{ic|zswap_enabled=1}}&lt;br /&gt;
=Tuning &amp;amp; Performance Considerations=&lt;br /&gt;
&lt;br /&gt;
Although swap seems like a great way to expand memory, excessive swap use will cause severe performance degradation, as mentioned before.&lt;br /&gt;
&lt;br /&gt;
There are couple of parameters that can be used to tune swap utilization.  These are swappiness and vfs_cache_pressure.  To see your current settings for these you can use the following commands:&lt;br /&gt;
 cat /proc/sys/vm/swappiness&lt;br /&gt;
 cat /proc/sys/vm/vfs_cache_pressure&lt;br /&gt;
&lt;br /&gt;
{{ic|swappiness}} controls how likely a page is to be transferred to swap.  This value represents the percentage of the free memory before activating swap. The lower the value, the less swapping is used and the more memory pages are kept in physical memory where:&lt;br /&gt;
* 0 disables swap&lt;br /&gt;
* 60 is the default value which is ideal for a server running a lot of services&lt;br /&gt;
* 100 is very aggressive swapping.&lt;br /&gt;
&lt;br /&gt;
For ''most'' computers the recommended value is 10: Theoretically, this means to only start swapping when RAM usage reaches around 90 percent.&lt;br /&gt;
&lt;br /&gt;
{{ic|vfs_cache_pressure}} is a percentage value that controls the tendency of the kernel to ''reclaim'' the memory which is used for caching of directory and inode objects.  The default value is 100.  Increasing this value will increase the rate in which these objects are removed from the RAM cache.  Decreasing it will allow these objects to be cached in memory longer, consuming additional RAM over time.  Depending on your specific workload, increasing or decreasing this value too far can have significant negative impacts on system performance.  Experimentation is needed to find the appropriate balance and the default value is reasonable.  In general, it is more common to optimize swappiness before experimenting with vfs_cache_pressure.&lt;br /&gt;
&lt;br /&gt;
To set these values you can use the command {{ic|sysctl}}.  For example, to set the swappiness value to 10 you could use:&lt;br /&gt;
 sudo sysctl vm.swappiness=10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''There is no preset defined answer on the optimal values for these parameters.'''  Experimentation is needed to find the optimum configuration for your specific hardware and workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Swap swap]&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Zswap zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/vm/zswap.txt zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/sysctl/vm.txt swappiness and vfs_cache_pressure]&lt;br /&gt;
* The openSUSE guide to [https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.memory.html tuning memory]&lt;br /&gt;
* The [https://github.com/Nefelim4ag/systemd-swap systemd-swap page]&lt;br /&gt;
* The ZFS on Linux guide on [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device Swap Volumes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Translations:Swap/33/de&amp;diff=22327</id>
		<title>Translations:Swap/33/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Translations:Swap/33/de&amp;diff=22327"/>
		<updated>2021-04-02T00:43:34Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;Eine Auslagerungspartition ist die traditionelle Art, den Auslagerungsbereich zu verwalten.  In diesem Szenario wird eine dedizierte Partition (oder Partitionen) für die Unte...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Eine Auslagerungspartition ist die traditionelle Art, den Auslagerungsbereich zu verwalten.  In diesem Szenario wird eine dedizierte Partition (oder Partitionen) für die Unterbringung der Auslagerungsdaten erstellt.&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22326</id>
		<title>Swap/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22326"/>
		<updated>2021-04-02T00:37:35Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;=Eine Auslagerungspartition benutzen=&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Übersicht=&lt;br /&gt;
&lt;br /&gt;
Der Auslagerungsspeicher wird zur Erweiterung des für die Ausführung von Programmen verfügbaren Speichers (RAM) verwendet.&lt;br /&gt;
* Ohne Auslagerungsspeicher werden bei Speichermangel die Anwendungen ''beendet'', was zu einem Absturz des gesamten Systems führen kann.&lt;br /&gt;
* Wenn dem System Auslagerungsspeicher zur Verfügung steht, kann der Kernel weniger häufig genutzte Speicherseiten von inaktiven Anwendungen / Diensten auf die Festplatte schreiben (&amp;quot;auslagern&amp;quot;), wodurch mehr echter Arbeitsspeicher für aktive Anwendungen zur Verfügung steht.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Es gibt drei verschiedene Möglichkeiten, wie der Swap in Manjaro verwaltet werden kann:&lt;br /&gt;
* Eine Auslagerungs-Partition&lt;br /&gt;
* Eine Auslagerungs-Datei&lt;br /&gt;
* Komprimierte Auslagerung (zswap)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dieser Artikel versucht, so umfassend wie möglich zu sein, aber noch mehr Informationen finden Sie in den  [[Special:MyLanguage/#See_Also|unten verlinkten Artikel]]&lt;br /&gt;
=Brauche ich eine Auslagerung?=&lt;br /&gt;
&lt;br /&gt;
Das ist eine Frage, die nicht beantwortet werden kann, ohne einen Blick auf Ihre Konfiguration zu werfen. Selbst bei reichlich verfügbarem Speicher wird dieser oft als Auffangnetz oder sogar manchmal aufgrund spezifischer Anwendungsanforderungen verwendet, also werfen Sie einen Blick auf die folgende nicht abschließende Liste:&lt;br /&gt;
* Wenn Sie den Ruhezustand verwenden: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie Dienste haben, die nicht immer aktiv sind, aber trotzdem ständig laufen: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die anstelle von RAM direkt virtuellen Speicher für temporäre Speicherung zuweist: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die ein Speicherleck hat: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie einen Server mit 1 TB RAM haben, den Sie als Desktop verwenden, ohne dass Anwendungen virtuellen Speicher zuweisen oder Speicherlecks haben: ''Nein, Sie müssen nicht auslagern!''&lt;br /&gt;
=Wie viel Auslagerungspeicher brauche ich?=&lt;br /&gt;
&lt;br /&gt;
Die benötigte Swap-Größe ist sehr variabel und hängt von ''Ihren'' spezifischen Anwendungen und der Arbeitslast ab.  Es gibt keine allgemeingültige Formel für die Größe des Auslagerungsspeichers, ohne die Nutzung über einen bestimmten Zeitraum hinweg zu überwachen.  Ein vernünftiger Ansatzpunkt wäre:&lt;br /&gt;
* Bei weniger als 4 GB physischem Speicher (RAM) wird dringend empfohlen, dass der Swap-Speicher mindestens so groß sein sollte wie der RAM-Speicher. Außerdem wird empfohlen, dass der Swap-Speicher maximal doppelt so groß ist wie der RAM-Speicher, abhängig von der Größe des für das System verfügbaren Festplattenplatzes, wegen des abnehmenden Nutzens.&lt;br /&gt;
* Bei moderneren Systemen (&amp;gt;4 GB) sollte Ihr Auslagerungsplatz mindestens der Größe Ihres physischen Speichers (RAM) entsprechen, '''wenn Sie den Ruhezustand verwenden''', andernfalls benötigen Sie mindestens ROUNDUP(SQRT(RAM)), d.h. die Quadratwurzel Ihrer Arbeitsspeichergröße aufgerundet auf das nächste GB. Das Maximum ist auch hier das Doppelte der Arbeitsspeichergröße, ebenfalls wegen des abnehmenden Nutzens.&lt;br /&gt;
* Der einzige Nachteil, wenn Sie mehr Auslagerungsspeicher haben, als Sie tatsächlich benötigen, ist, dass der dafür reservierte Speicherplatz nicht für Anwendungs- oder Systemdaten verwendet werden kann.&lt;br /&gt;
&lt;br /&gt;
Der &amp;quot;abnehmende Nutzen&amp;quot; bedeutet, dass Sie, wenn Sie mehr Auslagerungsspeicher als das Doppelte Ihrer RAM-Größe benötigen, besser mehr RAM hinzufügen sollten, da der Zugriff auf die Festplatte (HDD) etwa 10³ langsamer ist als der Zugriff auf den RAM, so dass etwas, das 1 Sekunde dauern würde, plötzlich mehr als 15 Minuten dauert! Und auf einem Halbleiterlaufwerk (Solid State Drive, SSD) dauert derselbe Vorgang, der im RAM 1 Sekunde dauerte, auf dem SSD immer noch etwa 1 Minute!&lt;br /&gt;
&lt;br /&gt;
Unter Berücksichtigung aller oben genannten Punkte ergibt sich die folgende Tabelle:&lt;br /&gt;
&lt;br /&gt;
(die letzten 3 Spalten bezeichnen den Auslagerungsbereich)&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        1GB              1GB                 2GB      2GB&lt;br /&gt;
        2GB              2GB                 3GB      4GB&lt;br /&gt;
        3GB              3GB                 5GB      6GB&lt;br /&gt;
        4GB              4GB                 6GB      8GB&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        5GB              2GB                 7GB     10GB&lt;br /&gt;
        6GB              2GB                 8GB     12GB&lt;br /&gt;
        8GB              3GB                11GB     16GB&lt;br /&gt;
       12GB              3GB                15GB     24GB&lt;br /&gt;
       16GB              4GB                20GB     32GB&lt;br /&gt;
       24GB              5GB                29GB     48GB&lt;br /&gt;
       32GB              6GB                38GB     64GB&lt;br /&gt;
       64GB              8GB                72GB    128GB&lt;br /&gt;
      128GB             11GB               139GB    256GB&lt;br /&gt;
      256GB             16GB               272GB    512GB&lt;br /&gt;
      512GB             23GB               535GB      1TB&lt;br /&gt;
        1TB             32GB              1056GB      2TB&lt;br /&gt;
        2TB             46GB              2094GB      4TB&lt;br /&gt;
        4TB             64GB              4160GB      8TB&lt;br /&gt;
        8TB             91GB              8283GB     16TB&lt;br /&gt;
{{note|Der größte Server, den einer der Autoren dieses Wikis jemals installiert hat, hatte in der Tat 8TB RAM}}&lt;br /&gt;
=Auslagerungsinformationen anzeigen=&lt;br /&gt;
&lt;br /&gt;
Der Befehl {{ic|swapon}} zeigt Ihre aktuellen Swap-Informationen an.  Zum Beispiel:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE   USED PRIO&lt;br /&gt;
 /dev/sda7 partition  20G  44.3M   -2&lt;br /&gt;
&lt;br /&gt;
Das folgende Skript wird:&lt;br /&gt;
* zeigt an, ob zswap aktiv ist oder nicht, und wenn aktiv, gibt zswap Parameter an, wenn es mit dem Befehl {{$ic|sudo}} ausgeführt wird&lt;br /&gt;
* eine Liste aller Anwendungen / Dienste anzeigen, die Auslagerung beanspruchen und wie viel sie beanspruchen, in absteigender Reihenfolge&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Check whether running as root&lt;br /&gt;
 if [ &amp;quot;$(whoami)&amp;quot; = 'root' ]; then&lt;br /&gt;
   dmesg | grep &amp;quot;zswap:&amp;quot; | grep --silent &amp;quot;load&amp;quot;&lt;br /&gt;
   if [[ $? -eq 0 ]]; then&lt;br /&gt;
     # zswap is active&lt;br /&gt;
     echo &amp;quot;zswap information:&amp;quot;&lt;br /&gt;
     grep --recursive --color=none . /sys/kernel/debug/zswap/&lt;br /&gt;
     read -n 1 -s -r -p &amp;quot;Press any key to continue&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;[warning] zwap not active. Continuing&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;[warning] Not running as root: skipping zswap info&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 for szFile in /proc/*/status ; do&lt;br /&gt;
   awk '/VmSwap|Name/{printf $2 &amp;quot;\t&amp;quot; $3}END{ print &amp;quot;&amp;quot; }' &amp;quot;$szFile&amp;quot;&lt;br /&gt;
 done | sort --key 2 --numeric --reverse | more&lt;br /&gt;
=Eine Auslagerungspartition benutzen=&lt;br /&gt;
&lt;br /&gt;
A swap partition is the traditional way of managing swap.  In this scenario, a dedicated partition (or partitions) are created for holding swap.&lt;br /&gt;
==Creating and Enabling a Swap Partition==&lt;br /&gt;
&lt;br /&gt;
To create a swap partition, you need enough unallocated disk space to create an additional partition. If you do not have enough space, skip to the next section [[Special:MyLanguage/#Using_a_swap_file|#Using_a_swap_file]]. A swap partition can be created in any disk management / partition management tool and should be set as type {{ic|linuxswap}}.&lt;br /&gt;
&lt;br /&gt;
Once you have a swap partition you will need to initialize the swap partition with {{ic|mkswap}}.  For example, if your swap partition is {{ic|/dev/sda3}}, you could use the command:&lt;br /&gt;
 sudo mkswap /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swap partition with the {{ic|swapon}} command. Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /dev/sda3&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  It is best to use the UUID instead of the device name for this purpose.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo UUID=$(lsblk -no UUID /dev/sda3) none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you would like to have more than one swap partition, simply repeat the steps above for any additional partitions.&lt;br /&gt;
&lt;br /&gt;
{{note|Be sure to replace /dev/sda3 in the above commands with your actual swap partition.}}&lt;br /&gt;
{{tip|''If you're using a HDD'' (spinning rust) put the swap partition *at the beginning of the disk* as the speed of the disk is higher on the inside tracks. On an SSD this doesn't matter.}}&lt;br /&gt;
=Using a Swapfile=&lt;br /&gt;
&lt;br /&gt;
Using a swap partition has one major disadvantage:  Changing the size of swap or adding swap requires repartitioning the disk.  In current Linux kernels, it is possible to use a swap file instead of a dedicated partition and as from kernel 2.6 onwards there is no performance difference any more between the two.&lt;br /&gt;
&lt;br /&gt;
==Creating and Enabling a Static Swapfile==&lt;br /&gt;
{{tip|There is no reason you can't have both a swap partition and a swapfile.  This is an easy way to add more swap without repartitioning.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First create and intialize the file to hold the swap.  For example, to create a 4GB swapfile, you could use the command:&lt;br /&gt;
 sudo fallocate -l 4G /swapfile&lt;br /&gt;
 sudo mkswap /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the appropriate permissions on the file.  It should be readable and writable only by {{ic|root}}.  This can be done with the command:&lt;br /&gt;
 sudo chmod u=rw,go= /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swapfile with the {{ic|swapon}} command.  Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo /swapfile none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on BTRFS==&lt;br /&gt;
&lt;br /&gt;
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.&lt;br /&gt;
&lt;br /&gt;
Prior to running the {{ic|fallocate}} step above, you should run these commands:&lt;br /&gt;
 sudo truncate -s 0 /swapfile&lt;br /&gt;
 sudo chattr +C /swapfile&lt;br /&gt;
 sudo btrfs property set /swapfile compression none&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These commands create an empty swapfile, disable COW for that file and ensure that compression is disabled.&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on ZFS==&lt;br /&gt;
&lt;br /&gt;
zfs doesn't support swapfiles, however you can achieve a similar benefit using a zvol as a swap volume.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on how to accomplish this can be found in this [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device ZoL guide].&lt;br /&gt;
=Automated Swap Management with systemd-swap=&lt;br /&gt;
{{note|Using systemd-swap with on btrfs/zfs or with hibernation support requires special handling beyond the scope of this article}}&lt;br /&gt;
&lt;br /&gt;
It is possible to automatically manage the size of your swapfile using {{ic|systemd-swap}}.  It can create swap files dynamically based on memory needs.  It is also an easy way to enable/manage [[#Using_zswap_with_systemd-swap|zswap]]&lt;br /&gt;
&lt;br /&gt;
==Installing and Configuring systemd-swap==&lt;br /&gt;
&lt;br /&gt;
First, install and enable {{ic|systemd-swap}}:&lt;br /&gt;
 pamac install systemd-swap&lt;br /&gt;
 sudo systemctl enable systemd-swap.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next enable dynamic swap management by creating a file {{ic|/etc/systemd/swap.conf.d/myswap.conf}} with the following parameters:&lt;br /&gt;
 zswap_enabled=0&lt;br /&gt;
 zram_enabled=0&lt;br /&gt;
 swapfc_enabled=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would prefer a single command to create this file you could use:&lt;br /&gt;
 sudo bash -c 'echo -e &amp;quot;zswap_enabled=0\nzram_enabled=0\nswapfc_enabled=1&amp;quot; &amp;gt; /etc/systemd/swap.conf.d/myswap.conf'&lt;br /&gt;
&lt;br /&gt;
==Remove Other Swap==&lt;br /&gt;
&lt;br /&gt;
In order for systemd-swap to be effective you need to remove any traditional swap devices you have.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To display your current swap devices you can use the command {{ic|swapon}}.  For example, my test machine displays the following:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE USED PRIO&lt;br /&gt;
 /swapfile file        4G   0B   -2&lt;br /&gt;
 /dev/sda3 partition 8.4G   0B   -3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example there are two swap devices.  A swapfile and a swap partition.  To turn them off we can use the command {{ic|swapoff}}.&lt;br /&gt;
 sudo swapoff /swapfile&lt;br /&gt;
 sudo swapoff /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to remove them.  &lt;br /&gt;
The swap partition will need to be deleted using your favorite partitioning tool.  You can remove the swapfile by simply deleting it.&lt;br /&gt;
 sudo rm /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need to also remove any lines related to swap from {{ic|/etc/fstab}}.  Edit the file with an [[Special:MyLanguage/Viewing_and_editing_configuration_files|appropriate text editor]] and remove or comment out the lines for the swap space.  In the example above, we would remove these lines:&lt;br /&gt;
 UUID=c2430cf1-8ea9-4422-a5c5-5a38779194c3 swap           swap    defaults,noatime 0 2&lt;br /&gt;
 /swapfile none swap defaults 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next reboot.  After the reboot, when running {{ic|swapon}} you should see something similiar to the following:&lt;br /&gt;
 NAME                           TYPE SIZE USED PRIO&lt;br /&gt;
 /var/lib/systemd-swap/swapfc/1 file 512M   0B   -2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
systemd-swap will add and remove swapfiles as your memory usage dictates.&lt;br /&gt;
&lt;br /&gt;
{{note|If you don't delete your existing swap partition it will be automatically activated by systemd even though you have removed it from fstab}}&lt;br /&gt;
&lt;br /&gt;
==Using zswap with systemd-swap==&lt;br /&gt;
&lt;br /&gt;
zswap is compressed swap kept in RAM. zswap keeps the most frequently used pages in RAM and writes less frequently used pages to the swap space on disk.  In many workloads, this will result in increased swap performance and less wear and tear on SSDs.&lt;br /&gt;
&lt;br /&gt;
To enable zswap with systemd-swap, simply alter the instructions above and set Linux Kernel parameter {{ic|zswap_enabled=1}}&lt;br /&gt;
=Tuning &amp;amp; Performance Considerations=&lt;br /&gt;
&lt;br /&gt;
Although swap seems like a great way to expand memory, excessive swap use will cause severe performance degradation, as mentioned before.&lt;br /&gt;
&lt;br /&gt;
There are couple of parameters that can be used to tune swap utilization.  These are swappiness and vfs_cache_pressure.  To see your current settings for these you can use the following commands:&lt;br /&gt;
 cat /proc/sys/vm/swappiness&lt;br /&gt;
 cat /proc/sys/vm/vfs_cache_pressure&lt;br /&gt;
&lt;br /&gt;
{{ic|swappiness}} controls how likely a page is to be transferred to swap.  This value represents the percentage of the free memory before activating swap. The lower the value, the less swapping is used and the more memory pages are kept in physical memory where:&lt;br /&gt;
* 0 disables swap&lt;br /&gt;
* 60 is the default value which is ideal for a server running a lot of services&lt;br /&gt;
* 100 is very aggressive swapping.&lt;br /&gt;
&lt;br /&gt;
For ''most'' computers the recommended value is 10: Theoretically, this means to only start swapping when RAM usage reaches around 90 percent.&lt;br /&gt;
&lt;br /&gt;
{{ic|vfs_cache_pressure}} is a percentage value that controls the tendency of the kernel to ''reclaim'' the memory which is used for caching of directory and inode objects.  The default value is 100.  Increasing this value will increase the rate in which these objects are removed from the RAM cache.  Decreasing it will allow these objects to be cached in memory longer, consuming additional RAM over time.  Depending on your specific workload, increasing or decreasing this value too far can have significant negative impacts on system performance.  Experimentation is needed to find the appropriate balance and the default value is reasonable.  In general, it is more common to optimize swappiness before experimenting with vfs_cache_pressure.&lt;br /&gt;
&lt;br /&gt;
To set these values you can use the command {{ic|sysctl}}.  For example, to set the swappiness value to 10 you could use:&lt;br /&gt;
 sudo sysctl vm.swappiness=10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''There is no preset defined answer on the optimal values for these parameters.'''  Experimentation is needed to find the optimum configuration for your specific hardware and workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Swap swap]&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Zswap zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/vm/zswap.txt zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/sysctl/vm.txt swappiness and vfs_cache_pressure]&lt;br /&gt;
* The openSUSE guide to [https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.memory.html tuning memory]&lt;br /&gt;
* The [https://github.com/Nefelim4ag/systemd-swap systemd-swap page]&lt;br /&gt;
* The ZFS on Linux guide on [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device Swap Volumes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Translations:Swap/32/de&amp;diff=22325</id>
		<title>Translations:Swap/32/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Translations:Swap/32/de&amp;diff=22325"/>
		<updated>2021-04-02T00:37:35Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;=Eine Auslagerungspartition benutzen=&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Eine Auslagerungspartition benutzen=&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22324</id>
		<title>Swap/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22324"/>
		<updated>2021-04-02T00:36:47Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;eine Liste aller Anwendungen / Dienste anzeigen, die Auslagerung beanspruchen und wie viel sie beanspruchen, in absteigender Reihenfolge&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Übersicht=&lt;br /&gt;
&lt;br /&gt;
Der Auslagerungsspeicher wird zur Erweiterung des für die Ausführung von Programmen verfügbaren Speichers (RAM) verwendet.&lt;br /&gt;
* Ohne Auslagerungsspeicher werden bei Speichermangel die Anwendungen ''beendet'', was zu einem Absturz des gesamten Systems führen kann.&lt;br /&gt;
* Wenn dem System Auslagerungsspeicher zur Verfügung steht, kann der Kernel weniger häufig genutzte Speicherseiten von inaktiven Anwendungen / Diensten auf die Festplatte schreiben (&amp;quot;auslagern&amp;quot;), wodurch mehr echter Arbeitsspeicher für aktive Anwendungen zur Verfügung steht.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Es gibt drei verschiedene Möglichkeiten, wie der Swap in Manjaro verwaltet werden kann:&lt;br /&gt;
* Eine Auslagerungs-Partition&lt;br /&gt;
* Eine Auslagerungs-Datei&lt;br /&gt;
* Komprimierte Auslagerung (zswap)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dieser Artikel versucht, so umfassend wie möglich zu sein, aber noch mehr Informationen finden Sie in den  [[Special:MyLanguage/#See_Also|unten verlinkten Artikel]]&lt;br /&gt;
=Brauche ich eine Auslagerung?=&lt;br /&gt;
&lt;br /&gt;
Das ist eine Frage, die nicht beantwortet werden kann, ohne einen Blick auf Ihre Konfiguration zu werfen. Selbst bei reichlich verfügbarem Speicher wird dieser oft als Auffangnetz oder sogar manchmal aufgrund spezifischer Anwendungsanforderungen verwendet, also werfen Sie einen Blick auf die folgende nicht abschließende Liste:&lt;br /&gt;
* Wenn Sie den Ruhezustand verwenden: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie Dienste haben, die nicht immer aktiv sind, aber trotzdem ständig laufen: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die anstelle von RAM direkt virtuellen Speicher für temporäre Speicherung zuweist: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die ein Speicherleck hat: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie einen Server mit 1 TB RAM haben, den Sie als Desktop verwenden, ohne dass Anwendungen virtuellen Speicher zuweisen oder Speicherlecks haben: ''Nein, Sie müssen nicht auslagern!''&lt;br /&gt;
=Wie viel Auslagerungspeicher brauche ich?=&lt;br /&gt;
&lt;br /&gt;
Die benötigte Swap-Größe ist sehr variabel und hängt von ''Ihren'' spezifischen Anwendungen und der Arbeitslast ab.  Es gibt keine allgemeingültige Formel für die Größe des Auslagerungsspeichers, ohne die Nutzung über einen bestimmten Zeitraum hinweg zu überwachen.  Ein vernünftiger Ansatzpunkt wäre:&lt;br /&gt;
* Bei weniger als 4 GB physischem Speicher (RAM) wird dringend empfohlen, dass der Swap-Speicher mindestens so groß sein sollte wie der RAM-Speicher. Außerdem wird empfohlen, dass der Swap-Speicher maximal doppelt so groß ist wie der RAM-Speicher, abhängig von der Größe des für das System verfügbaren Festplattenplatzes, wegen des abnehmenden Nutzens.&lt;br /&gt;
* Bei moderneren Systemen (&amp;gt;4 GB) sollte Ihr Auslagerungsplatz mindestens der Größe Ihres physischen Speichers (RAM) entsprechen, '''wenn Sie den Ruhezustand verwenden''', andernfalls benötigen Sie mindestens ROUNDUP(SQRT(RAM)), d.h. die Quadratwurzel Ihrer Arbeitsspeichergröße aufgerundet auf das nächste GB. Das Maximum ist auch hier das Doppelte der Arbeitsspeichergröße, ebenfalls wegen des abnehmenden Nutzens.&lt;br /&gt;
* Der einzige Nachteil, wenn Sie mehr Auslagerungsspeicher haben, als Sie tatsächlich benötigen, ist, dass der dafür reservierte Speicherplatz nicht für Anwendungs- oder Systemdaten verwendet werden kann.&lt;br /&gt;
&lt;br /&gt;
Der &amp;quot;abnehmende Nutzen&amp;quot; bedeutet, dass Sie, wenn Sie mehr Auslagerungsspeicher als das Doppelte Ihrer RAM-Größe benötigen, besser mehr RAM hinzufügen sollten, da der Zugriff auf die Festplatte (HDD) etwa 10³ langsamer ist als der Zugriff auf den RAM, so dass etwas, das 1 Sekunde dauern würde, plötzlich mehr als 15 Minuten dauert! Und auf einem Halbleiterlaufwerk (Solid State Drive, SSD) dauert derselbe Vorgang, der im RAM 1 Sekunde dauerte, auf dem SSD immer noch etwa 1 Minute!&lt;br /&gt;
&lt;br /&gt;
Unter Berücksichtigung aller oben genannten Punkte ergibt sich die folgende Tabelle:&lt;br /&gt;
&lt;br /&gt;
(die letzten 3 Spalten bezeichnen den Auslagerungsbereich)&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        1GB              1GB                 2GB      2GB&lt;br /&gt;
        2GB              2GB                 3GB      4GB&lt;br /&gt;
        3GB              3GB                 5GB      6GB&lt;br /&gt;
        4GB              4GB                 6GB      8GB&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        5GB              2GB                 7GB     10GB&lt;br /&gt;
        6GB              2GB                 8GB     12GB&lt;br /&gt;
        8GB              3GB                11GB     16GB&lt;br /&gt;
       12GB              3GB                15GB     24GB&lt;br /&gt;
       16GB              4GB                20GB     32GB&lt;br /&gt;
       24GB              5GB                29GB     48GB&lt;br /&gt;
       32GB              6GB                38GB     64GB&lt;br /&gt;
       64GB              8GB                72GB    128GB&lt;br /&gt;
      128GB             11GB               139GB    256GB&lt;br /&gt;
      256GB             16GB               272GB    512GB&lt;br /&gt;
      512GB             23GB               535GB      1TB&lt;br /&gt;
        1TB             32GB              1056GB      2TB&lt;br /&gt;
        2TB             46GB              2094GB      4TB&lt;br /&gt;
        4TB             64GB              4160GB      8TB&lt;br /&gt;
        8TB             91GB              8283GB     16TB&lt;br /&gt;
{{note|Der größte Server, den einer der Autoren dieses Wikis jemals installiert hat, hatte in der Tat 8TB RAM}}&lt;br /&gt;
=Auslagerungsinformationen anzeigen=&lt;br /&gt;
&lt;br /&gt;
Der Befehl {{ic|swapon}} zeigt Ihre aktuellen Swap-Informationen an.  Zum Beispiel:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE   USED PRIO&lt;br /&gt;
 /dev/sda7 partition  20G  44.3M   -2&lt;br /&gt;
&lt;br /&gt;
Das folgende Skript wird:&lt;br /&gt;
* zeigt an, ob zswap aktiv ist oder nicht, und wenn aktiv, gibt zswap Parameter an, wenn es mit dem Befehl {{$ic|sudo}} ausgeführt wird&lt;br /&gt;
* eine Liste aller Anwendungen / Dienste anzeigen, die Auslagerung beanspruchen und wie viel sie beanspruchen, in absteigender Reihenfolge&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Check whether running as root&lt;br /&gt;
 if [ &amp;quot;$(whoami)&amp;quot; = 'root' ]; then&lt;br /&gt;
   dmesg | grep &amp;quot;zswap:&amp;quot; | grep --silent &amp;quot;load&amp;quot;&lt;br /&gt;
   if [[ $? -eq 0 ]]; then&lt;br /&gt;
     # zswap is active&lt;br /&gt;
     echo &amp;quot;zswap information:&amp;quot;&lt;br /&gt;
     grep --recursive --color=none . /sys/kernel/debug/zswap/&lt;br /&gt;
     read -n 1 -s -r -p &amp;quot;Press any key to continue&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;[warning] zwap not active. Continuing&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;[warning] Not running as root: skipping zswap info&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 for szFile in /proc/*/status ; do&lt;br /&gt;
   awk '/VmSwap|Name/{printf $2 &amp;quot;\t&amp;quot; $3}END{ print &amp;quot;&amp;quot; }' &amp;quot;$szFile&amp;quot;&lt;br /&gt;
 done | sort --key 2 --numeric --reverse | more&lt;br /&gt;
=Using a Swap Partition=&lt;br /&gt;
&lt;br /&gt;
A swap partition is the traditional way of managing swap.  In this scenario, a dedicated partition (or partitions) are created for holding swap.&lt;br /&gt;
==Creating and Enabling a Swap Partition==&lt;br /&gt;
&lt;br /&gt;
To create a swap partition, you need enough unallocated disk space to create an additional partition. If you do not have enough space, skip to the next section [[Special:MyLanguage/#Using_a_swap_file|#Using_a_swap_file]]. A swap partition can be created in any disk management / partition management tool and should be set as type {{ic|linuxswap}}.&lt;br /&gt;
&lt;br /&gt;
Once you have a swap partition you will need to initialize the swap partition with {{ic|mkswap}}.  For example, if your swap partition is {{ic|/dev/sda3}}, you could use the command:&lt;br /&gt;
 sudo mkswap /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swap partition with the {{ic|swapon}} command. Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /dev/sda3&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  It is best to use the UUID instead of the device name for this purpose.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo UUID=$(lsblk -no UUID /dev/sda3) none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you would like to have more than one swap partition, simply repeat the steps above for any additional partitions.&lt;br /&gt;
&lt;br /&gt;
{{note|Be sure to replace /dev/sda3 in the above commands with your actual swap partition.}}&lt;br /&gt;
{{tip|''If you're using a HDD'' (spinning rust) put the swap partition *at the beginning of the disk* as the speed of the disk is higher on the inside tracks. On an SSD this doesn't matter.}}&lt;br /&gt;
=Using a Swapfile=&lt;br /&gt;
&lt;br /&gt;
Using a swap partition has one major disadvantage:  Changing the size of swap or adding swap requires repartitioning the disk.  In current Linux kernels, it is possible to use a swap file instead of a dedicated partition and as from kernel 2.6 onwards there is no performance difference any more between the two.&lt;br /&gt;
&lt;br /&gt;
==Creating and Enabling a Static Swapfile==&lt;br /&gt;
{{tip|There is no reason you can't have both a swap partition and a swapfile.  This is an easy way to add more swap without repartitioning.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First create and intialize the file to hold the swap.  For example, to create a 4GB swapfile, you could use the command:&lt;br /&gt;
 sudo fallocate -l 4G /swapfile&lt;br /&gt;
 sudo mkswap /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the appropriate permissions on the file.  It should be readable and writable only by {{ic|root}}.  This can be done with the command:&lt;br /&gt;
 sudo chmod u=rw,go= /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swapfile with the {{ic|swapon}} command.  Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo /swapfile none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on BTRFS==&lt;br /&gt;
&lt;br /&gt;
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.&lt;br /&gt;
&lt;br /&gt;
Prior to running the {{ic|fallocate}} step above, you should run these commands:&lt;br /&gt;
 sudo truncate -s 0 /swapfile&lt;br /&gt;
 sudo chattr +C /swapfile&lt;br /&gt;
 sudo btrfs property set /swapfile compression none&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These commands create an empty swapfile, disable COW for that file and ensure that compression is disabled.&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on ZFS==&lt;br /&gt;
&lt;br /&gt;
zfs doesn't support swapfiles, however you can achieve a similar benefit using a zvol as a swap volume.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on how to accomplish this can be found in this [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device ZoL guide].&lt;br /&gt;
=Automated Swap Management with systemd-swap=&lt;br /&gt;
{{note|Using systemd-swap with on btrfs/zfs or with hibernation support requires special handling beyond the scope of this article}}&lt;br /&gt;
&lt;br /&gt;
It is possible to automatically manage the size of your swapfile using {{ic|systemd-swap}}.  It can create swap files dynamically based on memory needs.  It is also an easy way to enable/manage [[#Using_zswap_with_systemd-swap|zswap]]&lt;br /&gt;
&lt;br /&gt;
==Installing and Configuring systemd-swap==&lt;br /&gt;
&lt;br /&gt;
First, install and enable {{ic|systemd-swap}}:&lt;br /&gt;
 pamac install systemd-swap&lt;br /&gt;
 sudo systemctl enable systemd-swap.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next enable dynamic swap management by creating a file {{ic|/etc/systemd/swap.conf.d/myswap.conf}} with the following parameters:&lt;br /&gt;
 zswap_enabled=0&lt;br /&gt;
 zram_enabled=0&lt;br /&gt;
 swapfc_enabled=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would prefer a single command to create this file you could use:&lt;br /&gt;
 sudo bash -c 'echo -e &amp;quot;zswap_enabled=0\nzram_enabled=0\nswapfc_enabled=1&amp;quot; &amp;gt; /etc/systemd/swap.conf.d/myswap.conf'&lt;br /&gt;
&lt;br /&gt;
==Remove Other Swap==&lt;br /&gt;
&lt;br /&gt;
In order for systemd-swap to be effective you need to remove any traditional swap devices you have.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To display your current swap devices you can use the command {{ic|swapon}}.  For example, my test machine displays the following:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE USED PRIO&lt;br /&gt;
 /swapfile file        4G   0B   -2&lt;br /&gt;
 /dev/sda3 partition 8.4G   0B   -3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example there are two swap devices.  A swapfile and a swap partition.  To turn them off we can use the command {{ic|swapoff}}.&lt;br /&gt;
 sudo swapoff /swapfile&lt;br /&gt;
 sudo swapoff /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to remove them.  &lt;br /&gt;
The swap partition will need to be deleted using your favorite partitioning tool.  You can remove the swapfile by simply deleting it.&lt;br /&gt;
 sudo rm /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need to also remove any lines related to swap from {{ic|/etc/fstab}}.  Edit the file with an [[Special:MyLanguage/Viewing_and_editing_configuration_files|appropriate text editor]] and remove or comment out the lines for the swap space.  In the example above, we would remove these lines:&lt;br /&gt;
 UUID=c2430cf1-8ea9-4422-a5c5-5a38779194c3 swap           swap    defaults,noatime 0 2&lt;br /&gt;
 /swapfile none swap defaults 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next reboot.  After the reboot, when running {{ic|swapon}} you should see something similiar to the following:&lt;br /&gt;
 NAME                           TYPE SIZE USED PRIO&lt;br /&gt;
 /var/lib/systemd-swap/swapfc/1 file 512M   0B   -2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
systemd-swap will add and remove swapfiles as your memory usage dictates.&lt;br /&gt;
&lt;br /&gt;
{{note|If you don't delete your existing swap partition it will be automatically activated by systemd even though you have removed it from fstab}}&lt;br /&gt;
&lt;br /&gt;
==Using zswap with systemd-swap==&lt;br /&gt;
&lt;br /&gt;
zswap is compressed swap kept in RAM. zswap keeps the most frequently used pages in RAM and writes less frequently used pages to the swap space on disk.  In many workloads, this will result in increased swap performance and less wear and tear on SSDs.&lt;br /&gt;
&lt;br /&gt;
To enable zswap with systemd-swap, simply alter the instructions above and set Linux Kernel parameter {{ic|zswap_enabled=1}}&lt;br /&gt;
=Tuning &amp;amp; Performance Considerations=&lt;br /&gt;
&lt;br /&gt;
Although swap seems like a great way to expand memory, excessive swap use will cause severe performance degradation, as mentioned before.&lt;br /&gt;
&lt;br /&gt;
There are couple of parameters that can be used to tune swap utilization.  These are swappiness and vfs_cache_pressure.  To see your current settings for these you can use the following commands:&lt;br /&gt;
 cat /proc/sys/vm/swappiness&lt;br /&gt;
 cat /proc/sys/vm/vfs_cache_pressure&lt;br /&gt;
&lt;br /&gt;
{{ic|swappiness}} controls how likely a page is to be transferred to swap.  This value represents the percentage of the free memory before activating swap. The lower the value, the less swapping is used and the more memory pages are kept in physical memory where:&lt;br /&gt;
* 0 disables swap&lt;br /&gt;
* 60 is the default value which is ideal for a server running a lot of services&lt;br /&gt;
* 100 is very aggressive swapping.&lt;br /&gt;
&lt;br /&gt;
For ''most'' computers the recommended value is 10: Theoretically, this means to only start swapping when RAM usage reaches around 90 percent.&lt;br /&gt;
&lt;br /&gt;
{{ic|vfs_cache_pressure}} is a percentage value that controls the tendency of the kernel to ''reclaim'' the memory which is used for caching of directory and inode objects.  The default value is 100.  Increasing this value will increase the rate in which these objects are removed from the RAM cache.  Decreasing it will allow these objects to be cached in memory longer, consuming additional RAM over time.  Depending on your specific workload, increasing or decreasing this value too far can have significant negative impacts on system performance.  Experimentation is needed to find the appropriate balance and the default value is reasonable.  In general, it is more common to optimize swappiness before experimenting with vfs_cache_pressure.&lt;br /&gt;
&lt;br /&gt;
To set these values you can use the command {{ic|sysctl}}.  For example, to set the swappiness value to 10 you could use:&lt;br /&gt;
 sudo sysctl vm.swappiness=10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''There is no preset defined answer on the optimal values for these parameters.'''  Experimentation is needed to find the optimum configuration for your specific hardware and workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Swap swap]&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Zswap zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/vm/zswap.txt zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/sysctl/vm.txt swappiness and vfs_cache_pressure]&lt;br /&gt;
* The openSUSE guide to [https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.memory.html tuning memory]&lt;br /&gt;
* The [https://github.com/Nefelim4ag/systemd-swap systemd-swap page]&lt;br /&gt;
* The ZFS on Linux guide on [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device Swap Volumes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Translations:Swap/31/de&amp;diff=22323</id>
		<title>Translations:Swap/31/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Translations:Swap/31/de&amp;diff=22323"/>
		<updated>2021-04-02T00:36:46Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;eine Liste aller Anwendungen / Dienste anzeigen, die Auslagerung beanspruchen und wie viel sie beanspruchen, in absteigender Reihenfolge&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;eine Liste aller Anwendungen / Dienste anzeigen, die Auslagerung beanspruchen und wie viel sie beanspruchen, in absteigender Reihenfolge&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22322</id>
		<title>Swap/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22322"/>
		<updated>2021-04-02T00:36:06Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;zeigt an, ob zswap aktiv ist oder nicht, und wenn aktiv, gibt zswap Parameter an, wenn es mit dem Befehl {{$ic|sudo}} ausgeführt wird&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Übersicht=&lt;br /&gt;
&lt;br /&gt;
Der Auslagerungsspeicher wird zur Erweiterung des für die Ausführung von Programmen verfügbaren Speichers (RAM) verwendet.&lt;br /&gt;
* Ohne Auslagerungsspeicher werden bei Speichermangel die Anwendungen ''beendet'', was zu einem Absturz des gesamten Systems führen kann.&lt;br /&gt;
* Wenn dem System Auslagerungsspeicher zur Verfügung steht, kann der Kernel weniger häufig genutzte Speicherseiten von inaktiven Anwendungen / Diensten auf die Festplatte schreiben (&amp;quot;auslagern&amp;quot;), wodurch mehr echter Arbeitsspeicher für aktive Anwendungen zur Verfügung steht.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Es gibt drei verschiedene Möglichkeiten, wie der Swap in Manjaro verwaltet werden kann:&lt;br /&gt;
* Eine Auslagerungs-Partition&lt;br /&gt;
* Eine Auslagerungs-Datei&lt;br /&gt;
* Komprimierte Auslagerung (zswap)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dieser Artikel versucht, so umfassend wie möglich zu sein, aber noch mehr Informationen finden Sie in den  [[Special:MyLanguage/#See_Also|unten verlinkten Artikel]]&lt;br /&gt;
=Brauche ich eine Auslagerung?=&lt;br /&gt;
&lt;br /&gt;
Das ist eine Frage, die nicht beantwortet werden kann, ohne einen Blick auf Ihre Konfiguration zu werfen. Selbst bei reichlich verfügbarem Speicher wird dieser oft als Auffangnetz oder sogar manchmal aufgrund spezifischer Anwendungsanforderungen verwendet, also werfen Sie einen Blick auf die folgende nicht abschließende Liste:&lt;br /&gt;
* Wenn Sie den Ruhezustand verwenden: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie Dienste haben, die nicht immer aktiv sind, aber trotzdem ständig laufen: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die anstelle von RAM direkt virtuellen Speicher für temporäre Speicherung zuweist: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die ein Speicherleck hat: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie einen Server mit 1 TB RAM haben, den Sie als Desktop verwenden, ohne dass Anwendungen virtuellen Speicher zuweisen oder Speicherlecks haben: ''Nein, Sie müssen nicht auslagern!''&lt;br /&gt;
=Wie viel Auslagerungspeicher brauche ich?=&lt;br /&gt;
&lt;br /&gt;
Die benötigte Swap-Größe ist sehr variabel und hängt von ''Ihren'' spezifischen Anwendungen und der Arbeitslast ab.  Es gibt keine allgemeingültige Formel für die Größe des Auslagerungsspeichers, ohne die Nutzung über einen bestimmten Zeitraum hinweg zu überwachen.  Ein vernünftiger Ansatzpunkt wäre:&lt;br /&gt;
* Bei weniger als 4 GB physischem Speicher (RAM) wird dringend empfohlen, dass der Swap-Speicher mindestens so groß sein sollte wie der RAM-Speicher. Außerdem wird empfohlen, dass der Swap-Speicher maximal doppelt so groß ist wie der RAM-Speicher, abhängig von der Größe des für das System verfügbaren Festplattenplatzes, wegen des abnehmenden Nutzens.&lt;br /&gt;
* Bei moderneren Systemen (&amp;gt;4 GB) sollte Ihr Auslagerungsplatz mindestens der Größe Ihres physischen Speichers (RAM) entsprechen, '''wenn Sie den Ruhezustand verwenden''', andernfalls benötigen Sie mindestens ROUNDUP(SQRT(RAM)), d.h. die Quadratwurzel Ihrer Arbeitsspeichergröße aufgerundet auf das nächste GB. Das Maximum ist auch hier das Doppelte der Arbeitsspeichergröße, ebenfalls wegen des abnehmenden Nutzens.&lt;br /&gt;
* Der einzige Nachteil, wenn Sie mehr Auslagerungsspeicher haben, als Sie tatsächlich benötigen, ist, dass der dafür reservierte Speicherplatz nicht für Anwendungs- oder Systemdaten verwendet werden kann.&lt;br /&gt;
&lt;br /&gt;
Der &amp;quot;abnehmende Nutzen&amp;quot; bedeutet, dass Sie, wenn Sie mehr Auslagerungsspeicher als das Doppelte Ihrer RAM-Größe benötigen, besser mehr RAM hinzufügen sollten, da der Zugriff auf die Festplatte (HDD) etwa 10³ langsamer ist als der Zugriff auf den RAM, so dass etwas, das 1 Sekunde dauern würde, plötzlich mehr als 15 Minuten dauert! Und auf einem Halbleiterlaufwerk (Solid State Drive, SSD) dauert derselbe Vorgang, der im RAM 1 Sekunde dauerte, auf dem SSD immer noch etwa 1 Minute!&lt;br /&gt;
&lt;br /&gt;
Unter Berücksichtigung aller oben genannten Punkte ergibt sich die folgende Tabelle:&lt;br /&gt;
&lt;br /&gt;
(die letzten 3 Spalten bezeichnen den Auslagerungsbereich)&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        1GB              1GB                 2GB      2GB&lt;br /&gt;
        2GB              2GB                 3GB      4GB&lt;br /&gt;
        3GB              3GB                 5GB      6GB&lt;br /&gt;
        4GB              4GB                 6GB      8GB&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        5GB              2GB                 7GB     10GB&lt;br /&gt;
        6GB              2GB                 8GB     12GB&lt;br /&gt;
        8GB              3GB                11GB     16GB&lt;br /&gt;
       12GB              3GB                15GB     24GB&lt;br /&gt;
       16GB              4GB                20GB     32GB&lt;br /&gt;
       24GB              5GB                29GB     48GB&lt;br /&gt;
       32GB              6GB                38GB     64GB&lt;br /&gt;
       64GB              8GB                72GB    128GB&lt;br /&gt;
      128GB             11GB               139GB    256GB&lt;br /&gt;
      256GB             16GB               272GB    512GB&lt;br /&gt;
      512GB             23GB               535GB      1TB&lt;br /&gt;
        1TB             32GB              1056GB      2TB&lt;br /&gt;
        2TB             46GB              2094GB      4TB&lt;br /&gt;
        4TB             64GB              4160GB      8TB&lt;br /&gt;
        8TB             91GB              8283GB     16TB&lt;br /&gt;
{{note|Der größte Server, den einer der Autoren dieses Wikis jemals installiert hat, hatte in der Tat 8TB RAM}}&lt;br /&gt;
=Auslagerungsinformationen anzeigen=&lt;br /&gt;
&lt;br /&gt;
Der Befehl {{ic|swapon}} zeigt Ihre aktuellen Swap-Informationen an.  Zum Beispiel:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE   USED PRIO&lt;br /&gt;
 /dev/sda7 partition  20G  44.3M   -2&lt;br /&gt;
&lt;br /&gt;
Das folgende Skript wird:&lt;br /&gt;
* zeigt an, ob zswap aktiv ist oder nicht, und wenn aktiv, gibt zswap Parameter an, wenn es mit dem Befehl {{$ic|sudo}} ausgeführt wird&lt;br /&gt;
* display a list of all applications / services that take up swap and how much they take up in descending order&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Check whether running as root&lt;br /&gt;
 if [ &amp;quot;$(whoami)&amp;quot; = 'root' ]; then&lt;br /&gt;
   dmesg | grep &amp;quot;zswap:&amp;quot; | grep --silent &amp;quot;load&amp;quot;&lt;br /&gt;
   if [[ $? -eq 0 ]]; then&lt;br /&gt;
     # zswap is active&lt;br /&gt;
     echo &amp;quot;zswap information:&amp;quot;&lt;br /&gt;
     grep --recursive --color=none . /sys/kernel/debug/zswap/&lt;br /&gt;
     read -n 1 -s -r -p &amp;quot;Press any key to continue&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;[warning] zwap not active. Continuing&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;[warning] Not running as root: skipping zswap info&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 for szFile in /proc/*/status ; do&lt;br /&gt;
   awk '/VmSwap|Name/{printf $2 &amp;quot;\t&amp;quot; $3}END{ print &amp;quot;&amp;quot; }' &amp;quot;$szFile&amp;quot;&lt;br /&gt;
 done | sort --key 2 --numeric --reverse | more&lt;br /&gt;
=Using a Swap Partition=&lt;br /&gt;
&lt;br /&gt;
A swap partition is the traditional way of managing swap.  In this scenario, a dedicated partition (or partitions) are created for holding swap.&lt;br /&gt;
==Creating and Enabling a Swap Partition==&lt;br /&gt;
&lt;br /&gt;
To create a swap partition, you need enough unallocated disk space to create an additional partition. If you do not have enough space, skip to the next section [[Special:MyLanguage/#Using_a_swap_file|#Using_a_swap_file]]. A swap partition can be created in any disk management / partition management tool and should be set as type {{ic|linuxswap}}.&lt;br /&gt;
&lt;br /&gt;
Once you have a swap partition you will need to initialize the swap partition with {{ic|mkswap}}.  For example, if your swap partition is {{ic|/dev/sda3}}, you could use the command:&lt;br /&gt;
 sudo mkswap /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swap partition with the {{ic|swapon}} command. Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /dev/sda3&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  It is best to use the UUID instead of the device name for this purpose.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo UUID=$(lsblk -no UUID /dev/sda3) none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you would like to have more than one swap partition, simply repeat the steps above for any additional partitions.&lt;br /&gt;
&lt;br /&gt;
{{note|Be sure to replace /dev/sda3 in the above commands with your actual swap partition.}}&lt;br /&gt;
{{tip|''If you're using a HDD'' (spinning rust) put the swap partition *at the beginning of the disk* as the speed of the disk is higher on the inside tracks. On an SSD this doesn't matter.}}&lt;br /&gt;
=Using a Swapfile=&lt;br /&gt;
&lt;br /&gt;
Using a swap partition has one major disadvantage:  Changing the size of swap or adding swap requires repartitioning the disk.  In current Linux kernels, it is possible to use a swap file instead of a dedicated partition and as from kernel 2.6 onwards there is no performance difference any more between the two.&lt;br /&gt;
&lt;br /&gt;
==Creating and Enabling a Static Swapfile==&lt;br /&gt;
{{tip|There is no reason you can't have both a swap partition and a swapfile.  This is an easy way to add more swap without repartitioning.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First create and intialize the file to hold the swap.  For example, to create a 4GB swapfile, you could use the command:&lt;br /&gt;
 sudo fallocate -l 4G /swapfile&lt;br /&gt;
 sudo mkswap /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the appropriate permissions on the file.  It should be readable and writable only by {{ic|root}}.  This can be done with the command:&lt;br /&gt;
 sudo chmod u=rw,go= /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swapfile with the {{ic|swapon}} command.  Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo /swapfile none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on BTRFS==&lt;br /&gt;
&lt;br /&gt;
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.&lt;br /&gt;
&lt;br /&gt;
Prior to running the {{ic|fallocate}} step above, you should run these commands:&lt;br /&gt;
 sudo truncate -s 0 /swapfile&lt;br /&gt;
 sudo chattr +C /swapfile&lt;br /&gt;
 sudo btrfs property set /swapfile compression none&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These commands create an empty swapfile, disable COW for that file and ensure that compression is disabled.&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on ZFS==&lt;br /&gt;
&lt;br /&gt;
zfs doesn't support swapfiles, however you can achieve a similar benefit using a zvol as a swap volume.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on how to accomplish this can be found in this [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device ZoL guide].&lt;br /&gt;
=Automated Swap Management with systemd-swap=&lt;br /&gt;
{{note|Using systemd-swap with on btrfs/zfs or with hibernation support requires special handling beyond the scope of this article}}&lt;br /&gt;
&lt;br /&gt;
It is possible to automatically manage the size of your swapfile using {{ic|systemd-swap}}.  It can create swap files dynamically based on memory needs.  It is also an easy way to enable/manage [[#Using_zswap_with_systemd-swap|zswap]]&lt;br /&gt;
&lt;br /&gt;
==Installing and Configuring systemd-swap==&lt;br /&gt;
&lt;br /&gt;
First, install and enable {{ic|systemd-swap}}:&lt;br /&gt;
 pamac install systemd-swap&lt;br /&gt;
 sudo systemctl enable systemd-swap.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next enable dynamic swap management by creating a file {{ic|/etc/systemd/swap.conf.d/myswap.conf}} with the following parameters:&lt;br /&gt;
 zswap_enabled=0&lt;br /&gt;
 zram_enabled=0&lt;br /&gt;
 swapfc_enabled=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would prefer a single command to create this file you could use:&lt;br /&gt;
 sudo bash -c 'echo -e &amp;quot;zswap_enabled=0\nzram_enabled=0\nswapfc_enabled=1&amp;quot; &amp;gt; /etc/systemd/swap.conf.d/myswap.conf'&lt;br /&gt;
&lt;br /&gt;
==Remove Other Swap==&lt;br /&gt;
&lt;br /&gt;
In order for systemd-swap to be effective you need to remove any traditional swap devices you have.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To display your current swap devices you can use the command {{ic|swapon}}.  For example, my test machine displays the following:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE USED PRIO&lt;br /&gt;
 /swapfile file        4G   0B   -2&lt;br /&gt;
 /dev/sda3 partition 8.4G   0B   -3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example there are two swap devices.  A swapfile and a swap partition.  To turn them off we can use the command {{ic|swapoff}}.&lt;br /&gt;
 sudo swapoff /swapfile&lt;br /&gt;
 sudo swapoff /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to remove them.  &lt;br /&gt;
The swap partition will need to be deleted using your favorite partitioning tool.  You can remove the swapfile by simply deleting it.&lt;br /&gt;
 sudo rm /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need to also remove any lines related to swap from {{ic|/etc/fstab}}.  Edit the file with an [[Special:MyLanguage/Viewing_and_editing_configuration_files|appropriate text editor]] and remove or comment out the lines for the swap space.  In the example above, we would remove these lines:&lt;br /&gt;
 UUID=c2430cf1-8ea9-4422-a5c5-5a38779194c3 swap           swap    defaults,noatime 0 2&lt;br /&gt;
 /swapfile none swap defaults 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next reboot.  After the reboot, when running {{ic|swapon}} you should see something similiar to the following:&lt;br /&gt;
 NAME                           TYPE SIZE USED PRIO&lt;br /&gt;
 /var/lib/systemd-swap/swapfc/1 file 512M   0B   -2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
systemd-swap will add and remove swapfiles as your memory usage dictates.&lt;br /&gt;
&lt;br /&gt;
{{note|If you don't delete your existing swap partition it will be automatically activated by systemd even though you have removed it from fstab}}&lt;br /&gt;
&lt;br /&gt;
==Using zswap with systemd-swap==&lt;br /&gt;
&lt;br /&gt;
zswap is compressed swap kept in RAM. zswap keeps the most frequently used pages in RAM and writes less frequently used pages to the swap space on disk.  In many workloads, this will result in increased swap performance and less wear and tear on SSDs.&lt;br /&gt;
&lt;br /&gt;
To enable zswap with systemd-swap, simply alter the instructions above and set Linux Kernel parameter {{ic|zswap_enabled=1}}&lt;br /&gt;
=Tuning &amp;amp; Performance Considerations=&lt;br /&gt;
&lt;br /&gt;
Although swap seems like a great way to expand memory, excessive swap use will cause severe performance degradation, as mentioned before.&lt;br /&gt;
&lt;br /&gt;
There are couple of parameters that can be used to tune swap utilization.  These are swappiness and vfs_cache_pressure.  To see your current settings for these you can use the following commands:&lt;br /&gt;
 cat /proc/sys/vm/swappiness&lt;br /&gt;
 cat /proc/sys/vm/vfs_cache_pressure&lt;br /&gt;
&lt;br /&gt;
{{ic|swappiness}} controls how likely a page is to be transferred to swap.  This value represents the percentage of the free memory before activating swap. The lower the value, the less swapping is used and the more memory pages are kept in physical memory where:&lt;br /&gt;
* 0 disables swap&lt;br /&gt;
* 60 is the default value which is ideal for a server running a lot of services&lt;br /&gt;
* 100 is very aggressive swapping.&lt;br /&gt;
&lt;br /&gt;
For ''most'' computers the recommended value is 10: Theoretically, this means to only start swapping when RAM usage reaches around 90 percent.&lt;br /&gt;
&lt;br /&gt;
{{ic|vfs_cache_pressure}} is a percentage value that controls the tendency of the kernel to ''reclaim'' the memory which is used for caching of directory and inode objects.  The default value is 100.  Increasing this value will increase the rate in which these objects are removed from the RAM cache.  Decreasing it will allow these objects to be cached in memory longer, consuming additional RAM over time.  Depending on your specific workload, increasing or decreasing this value too far can have significant negative impacts on system performance.  Experimentation is needed to find the appropriate balance and the default value is reasonable.  In general, it is more common to optimize swappiness before experimenting with vfs_cache_pressure.&lt;br /&gt;
&lt;br /&gt;
To set these values you can use the command {{ic|sysctl}}.  For example, to set the swappiness value to 10 you could use:&lt;br /&gt;
 sudo sysctl vm.swappiness=10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''There is no preset defined answer on the optimal values for these parameters.'''  Experimentation is needed to find the optimum configuration for your specific hardware and workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Swap swap]&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Zswap zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/vm/zswap.txt zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/sysctl/vm.txt swappiness and vfs_cache_pressure]&lt;br /&gt;
* The openSUSE guide to [https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.memory.html tuning memory]&lt;br /&gt;
* The [https://github.com/Nefelim4ag/systemd-swap systemd-swap page]&lt;br /&gt;
* The ZFS on Linux guide on [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device Swap Volumes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Translations:Swap/30/de&amp;diff=22321</id>
		<title>Translations:Swap/30/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Translations:Swap/30/de&amp;diff=22321"/>
		<updated>2021-04-02T00:36:06Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;zeigt an, ob zswap aktiv ist oder nicht, und wenn aktiv, gibt zswap Parameter an, wenn es mit dem Befehl {{$ic|sudo}} ausgeführt wird&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;zeigt an, ob zswap aktiv ist oder nicht, und wenn aktiv, gibt zswap Parameter an, wenn es mit dem Befehl {{$ic|sudo}} ausgeführt wird&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22320</id>
		<title>Swap/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22320"/>
		<updated>2021-04-02T00:35:26Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Übersicht=&lt;br /&gt;
&lt;br /&gt;
Der Auslagerungsspeicher wird zur Erweiterung des für die Ausführung von Programmen verfügbaren Speichers (RAM) verwendet.&lt;br /&gt;
* Ohne Auslagerungsspeicher werden bei Speichermangel die Anwendungen ''beendet'', was zu einem Absturz des gesamten Systems führen kann.&lt;br /&gt;
* Wenn dem System Auslagerungsspeicher zur Verfügung steht, kann der Kernel weniger häufig genutzte Speicherseiten von inaktiven Anwendungen / Diensten auf die Festplatte schreiben (&amp;quot;auslagern&amp;quot;), wodurch mehr echter Arbeitsspeicher für aktive Anwendungen zur Verfügung steht.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Es gibt drei verschiedene Möglichkeiten, wie der Swap in Manjaro verwaltet werden kann:&lt;br /&gt;
* Eine Auslagerungs-Partition&lt;br /&gt;
* Eine Auslagerungs-Datei&lt;br /&gt;
* Komprimierte Auslagerung (zswap)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dieser Artikel versucht, so umfassend wie möglich zu sein, aber noch mehr Informationen finden Sie in den  [[Special:MyLanguage/#See_Also|unten verlinkten Artikel]]&lt;br /&gt;
=Brauche ich eine Auslagerung?=&lt;br /&gt;
&lt;br /&gt;
Das ist eine Frage, die nicht beantwortet werden kann, ohne einen Blick auf Ihre Konfiguration zu werfen. Selbst bei reichlich verfügbarem Speicher wird dieser oft als Auffangnetz oder sogar manchmal aufgrund spezifischer Anwendungsanforderungen verwendet, also werfen Sie einen Blick auf die folgende nicht abschließende Liste:&lt;br /&gt;
* Wenn Sie den Ruhezustand verwenden: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie Dienste haben, die nicht immer aktiv sind, aber trotzdem ständig laufen: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die anstelle von RAM direkt virtuellen Speicher für temporäre Speicherung zuweist: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die ein Speicherleck hat: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie einen Server mit 1 TB RAM haben, den Sie als Desktop verwenden, ohne dass Anwendungen virtuellen Speicher zuweisen oder Speicherlecks haben: ''Nein, Sie müssen nicht auslagern!''&lt;br /&gt;
=Wie viel Auslagerungspeicher brauche ich?=&lt;br /&gt;
&lt;br /&gt;
Die benötigte Swap-Größe ist sehr variabel und hängt von ''Ihren'' spezifischen Anwendungen und der Arbeitslast ab.  Es gibt keine allgemeingültige Formel für die Größe des Auslagerungsspeichers, ohne die Nutzung über einen bestimmten Zeitraum hinweg zu überwachen.  Ein vernünftiger Ansatzpunkt wäre:&lt;br /&gt;
* Bei weniger als 4 GB physischem Speicher (RAM) wird dringend empfohlen, dass der Swap-Speicher mindestens so groß sein sollte wie der RAM-Speicher. Außerdem wird empfohlen, dass der Swap-Speicher maximal doppelt so groß ist wie der RAM-Speicher, abhängig von der Größe des für das System verfügbaren Festplattenplatzes, wegen des abnehmenden Nutzens.&lt;br /&gt;
* Bei moderneren Systemen (&amp;gt;4 GB) sollte Ihr Auslagerungsplatz mindestens der Größe Ihres physischen Speichers (RAM) entsprechen, '''wenn Sie den Ruhezustand verwenden''', andernfalls benötigen Sie mindestens ROUNDUP(SQRT(RAM)), d.h. die Quadratwurzel Ihrer Arbeitsspeichergröße aufgerundet auf das nächste GB. Das Maximum ist auch hier das Doppelte der Arbeitsspeichergröße, ebenfalls wegen des abnehmenden Nutzens.&lt;br /&gt;
* Der einzige Nachteil, wenn Sie mehr Auslagerungsspeicher haben, als Sie tatsächlich benötigen, ist, dass der dafür reservierte Speicherplatz nicht für Anwendungs- oder Systemdaten verwendet werden kann.&lt;br /&gt;
&lt;br /&gt;
Der &amp;quot;abnehmende Nutzen&amp;quot; bedeutet, dass Sie, wenn Sie mehr Auslagerungsspeicher als das Doppelte Ihrer RAM-Größe benötigen, besser mehr RAM hinzufügen sollten, da der Zugriff auf die Festplatte (HDD) etwa 10³ langsamer ist als der Zugriff auf den RAM, so dass etwas, das 1 Sekunde dauern würde, plötzlich mehr als 15 Minuten dauert! Und auf einem Halbleiterlaufwerk (Solid State Drive, SSD) dauert derselbe Vorgang, der im RAM 1 Sekunde dauerte, auf dem SSD immer noch etwa 1 Minute!&lt;br /&gt;
&lt;br /&gt;
Unter Berücksichtigung aller oben genannten Punkte ergibt sich die folgende Tabelle:&lt;br /&gt;
&lt;br /&gt;
(die letzten 3 Spalten bezeichnen den Auslagerungsbereich)&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        1GB              1GB                 2GB      2GB&lt;br /&gt;
        2GB              2GB                 3GB      4GB&lt;br /&gt;
        3GB              3GB                 5GB      6GB&lt;br /&gt;
        4GB              4GB                 6GB      8GB&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        5GB              2GB                 7GB     10GB&lt;br /&gt;
        6GB              2GB                 8GB     12GB&lt;br /&gt;
        8GB              3GB                11GB     16GB&lt;br /&gt;
       12GB              3GB                15GB     24GB&lt;br /&gt;
       16GB              4GB                20GB     32GB&lt;br /&gt;
       24GB              5GB                29GB     48GB&lt;br /&gt;
       32GB              6GB                38GB     64GB&lt;br /&gt;
       64GB              8GB                72GB    128GB&lt;br /&gt;
      128GB             11GB               139GB    256GB&lt;br /&gt;
      256GB             16GB               272GB    512GB&lt;br /&gt;
      512GB             23GB               535GB      1TB&lt;br /&gt;
        1TB             32GB              1056GB      2TB&lt;br /&gt;
        2TB             46GB              2094GB      4TB&lt;br /&gt;
        4TB             64GB              4160GB      8TB&lt;br /&gt;
        8TB             91GB              8283GB     16TB&lt;br /&gt;
{{note|Der größte Server, den einer der Autoren dieses Wikis jemals installiert hat, hatte in der Tat 8TB RAM}}&lt;br /&gt;
=Auslagerungsinformationen anzeigen=&lt;br /&gt;
&lt;br /&gt;
Der Befehl {{ic|swapon}} zeigt Ihre aktuellen Swap-Informationen an.  Zum Beispiel:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE   USED PRIO&lt;br /&gt;
 /dev/sda7 partition  20G  44.3M   -2&lt;br /&gt;
&lt;br /&gt;
Das folgende Skript wird:&lt;br /&gt;
* show whether zswap is active or not and if active, give zswap parameters if run with the {{$ic|sudo}} command&lt;br /&gt;
* display a list of all applications / services that take up swap and how much they take up in descending order&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Check whether running as root&lt;br /&gt;
 if [ &amp;quot;$(whoami)&amp;quot; = 'root' ]; then&lt;br /&gt;
   dmesg | grep &amp;quot;zswap:&amp;quot; | grep --silent &amp;quot;load&amp;quot;&lt;br /&gt;
   if [[ $? -eq 0 ]]; then&lt;br /&gt;
     # zswap is active&lt;br /&gt;
     echo &amp;quot;zswap information:&amp;quot;&lt;br /&gt;
     grep --recursive --color=none . /sys/kernel/debug/zswap/&lt;br /&gt;
     read -n 1 -s -r -p &amp;quot;Press any key to continue&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;[warning] zwap not active. Continuing&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;[warning] Not running as root: skipping zswap info&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 for szFile in /proc/*/status ; do&lt;br /&gt;
   awk '/VmSwap|Name/{printf $2 &amp;quot;\t&amp;quot; $3}END{ print &amp;quot;&amp;quot; }' &amp;quot;$szFile&amp;quot;&lt;br /&gt;
 done | sort --key 2 --numeric --reverse | more&lt;br /&gt;
=Using a Swap Partition=&lt;br /&gt;
&lt;br /&gt;
A swap partition is the traditional way of managing swap.  In this scenario, a dedicated partition (or partitions) are created for holding swap.&lt;br /&gt;
==Creating and Enabling a Swap Partition==&lt;br /&gt;
&lt;br /&gt;
To create a swap partition, you need enough unallocated disk space to create an additional partition. If you do not have enough space, skip to the next section [[Special:MyLanguage/#Using_a_swap_file|#Using_a_swap_file]]. A swap partition can be created in any disk management / partition management tool and should be set as type {{ic|linuxswap}}.&lt;br /&gt;
&lt;br /&gt;
Once you have a swap partition you will need to initialize the swap partition with {{ic|mkswap}}.  For example, if your swap partition is {{ic|/dev/sda3}}, you could use the command:&lt;br /&gt;
 sudo mkswap /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swap partition with the {{ic|swapon}} command. Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /dev/sda3&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  It is best to use the UUID instead of the device name for this purpose.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo UUID=$(lsblk -no UUID /dev/sda3) none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you would like to have more than one swap partition, simply repeat the steps above for any additional partitions.&lt;br /&gt;
&lt;br /&gt;
{{note|Be sure to replace /dev/sda3 in the above commands with your actual swap partition.}}&lt;br /&gt;
{{tip|''If you're using a HDD'' (spinning rust) put the swap partition *at the beginning of the disk* as the speed of the disk is higher on the inside tracks. On an SSD this doesn't matter.}}&lt;br /&gt;
=Using a Swapfile=&lt;br /&gt;
&lt;br /&gt;
Using a swap partition has one major disadvantage:  Changing the size of swap or adding swap requires repartitioning the disk.  In current Linux kernels, it is possible to use a swap file instead of a dedicated partition and as from kernel 2.6 onwards there is no performance difference any more between the two.&lt;br /&gt;
&lt;br /&gt;
==Creating and Enabling a Static Swapfile==&lt;br /&gt;
{{tip|There is no reason you can't have both a swap partition and a swapfile.  This is an easy way to add more swap without repartitioning.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First create and intialize the file to hold the swap.  For example, to create a 4GB swapfile, you could use the command:&lt;br /&gt;
 sudo fallocate -l 4G /swapfile&lt;br /&gt;
 sudo mkswap /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the appropriate permissions on the file.  It should be readable and writable only by {{ic|root}}.  This can be done with the command:&lt;br /&gt;
 sudo chmod u=rw,go= /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swapfile with the {{ic|swapon}} command.  Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo /swapfile none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on BTRFS==&lt;br /&gt;
&lt;br /&gt;
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.&lt;br /&gt;
&lt;br /&gt;
Prior to running the {{ic|fallocate}} step above, you should run these commands:&lt;br /&gt;
 sudo truncate -s 0 /swapfile&lt;br /&gt;
 sudo chattr +C /swapfile&lt;br /&gt;
 sudo btrfs property set /swapfile compression none&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These commands create an empty swapfile, disable COW for that file and ensure that compression is disabled.&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on ZFS==&lt;br /&gt;
&lt;br /&gt;
zfs doesn't support swapfiles, however you can achieve a similar benefit using a zvol as a swap volume.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on how to accomplish this can be found in this [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device ZoL guide].&lt;br /&gt;
=Automated Swap Management with systemd-swap=&lt;br /&gt;
{{note|Using systemd-swap with on btrfs/zfs or with hibernation support requires special handling beyond the scope of this article}}&lt;br /&gt;
&lt;br /&gt;
It is possible to automatically manage the size of your swapfile using {{ic|systemd-swap}}.  It can create swap files dynamically based on memory needs.  It is also an easy way to enable/manage [[#Using_zswap_with_systemd-swap|zswap]]&lt;br /&gt;
&lt;br /&gt;
==Installing and Configuring systemd-swap==&lt;br /&gt;
&lt;br /&gt;
First, install and enable {{ic|systemd-swap}}:&lt;br /&gt;
 pamac install systemd-swap&lt;br /&gt;
 sudo systemctl enable systemd-swap.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next enable dynamic swap management by creating a file {{ic|/etc/systemd/swap.conf.d/myswap.conf}} with the following parameters:&lt;br /&gt;
 zswap_enabled=0&lt;br /&gt;
 zram_enabled=0&lt;br /&gt;
 swapfc_enabled=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would prefer a single command to create this file you could use:&lt;br /&gt;
 sudo bash -c 'echo -e &amp;quot;zswap_enabled=0\nzram_enabled=0\nswapfc_enabled=1&amp;quot; &amp;gt; /etc/systemd/swap.conf.d/myswap.conf'&lt;br /&gt;
&lt;br /&gt;
==Remove Other Swap==&lt;br /&gt;
&lt;br /&gt;
In order for systemd-swap to be effective you need to remove any traditional swap devices you have.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To display your current swap devices you can use the command {{ic|swapon}}.  For example, my test machine displays the following:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE USED PRIO&lt;br /&gt;
 /swapfile file        4G   0B   -2&lt;br /&gt;
 /dev/sda3 partition 8.4G   0B   -3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example there are two swap devices.  A swapfile and a swap partition.  To turn them off we can use the command {{ic|swapoff}}.&lt;br /&gt;
 sudo swapoff /swapfile&lt;br /&gt;
 sudo swapoff /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to remove them.  &lt;br /&gt;
The swap partition will need to be deleted using your favorite partitioning tool.  You can remove the swapfile by simply deleting it.&lt;br /&gt;
 sudo rm /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need to also remove any lines related to swap from {{ic|/etc/fstab}}.  Edit the file with an [[Special:MyLanguage/Viewing_and_editing_configuration_files|appropriate text editor]] and remove or comment out the lines for the swap space.  In the example above, we would remove these lines:&lt;br /&gt;
 UUID=c2430cf1-8ea9-4422-a5c5-5a38779194c3 swap           swap    defaults,noatime 0 2&lt;br /&gt;
 /swapfile none swap defaults 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next reboot.  After the reboot, when running {{ic|swapon}} you should see something similiar to the following:&lt;br /&gt;
 NAME                           TYPE SIZE USED PRIO&lt;br /&gt;
 /var/lib/systemd-swap/swapfc/1 file 512M   0B   -2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
systemd-swap will add and remove swapfiles as your memory usage dictates.&lt;br /&gt;
&lt;br /&gt;
{{note|If you don't delete your existing swap partition it will be automatically activated by systemd even though you have removed it from fstab}}&lt;br /&gt;
&lt;br /&gt;
==Using zswap with systemd-swap==&lt;br /&gt;
&lt;br /&gt;
zswap is compressed swap kept in RAM. zswap keeps the most frequently used pages in RAM and writes less frequently used pages to the swap space on disk.  In many workloads, this will result in increased swap performance and less wear and tear on SSDs.&lt;br /&gt;
&lt;br /&gt;
To enable zswap with systemd-swap, simply alter the instructions above and set Linux Kernel parameter {{ic|zswap_enabled=1}}&lt;br /&gt;
=Tuning &amp;amp; Performance Considerations=&lt;br /&gt;
&lt;br /&gt;
Although swap seems like a great way to expand memory, excessive swap use will cause severe performance degradation, as mentioned before.&lt;br /&gt;
&lt;br /&gt;
There are couple of parameters that can be used to tune swap utilization.  These are swappiness and vfs_cache_pressure.  To see your current settings for these you can use the following commands:&lt;br /&gt;
 cat /proc/sys/vm/swappiness&lt;br /&gt;
 cat /proc/sys/vm/vfs_cache_pressure&lt;br /&gt;
&lt;br /&gt;
{{ic|swappiness}} controls how likely a page is to be transferred to swap.  This value represents the percentage of the free memory before activating swap. The lower the value, the less swapping is used and the more memory pages are kept in physical memory where:&lt;br /&gt;
* 0 disables swap&lt;br /&gt;
* 60 is the default value which is ideal for a server running a lot of services&lt;br /&gt;
* 100 is very aggressive swapping.&lt;br /&gt;
&lt;br /&gt;
For ''most'' computers the recommended value is 10: Theoretically, this means to only start swapping when RAM usage reaches around 90 percent.&lt;br /&gt;
&lt;br /&gt;
{{ic|vfs_cache_pressure}} is a percentage value that controls the tendency of the kernel to ''reclaim'' the memory which is used for caching of directory and inode objects.  The default value is 100.  Increasing this value will increase the rate in which these objects are removed from the RAM cache.  Decreasing it will allow these objects to be cached in memory longer, consuming additional RAM over time.  Depending on your specific workload, increasing or decreasing this value too far can have significant negative impacts on system performance.  Experimentation is needed to find the appropriate balance and the default value is reasonable.  In general, it is more common to optimize swappiness before experimenting with vfs_cache_pressure.&lt;br /&gt;
&lt;br /&gt;
To set these values you can use the command {{ic|sysctl}}.  For example, to set the swappiness value to 10 you could use:&lt;br /&gt;
 sudo sysctl vm.swappiness=10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''There is no preset defined answer on the optimal values for these parameters.'''  Experimentation is needed to find the optimum configuration for your specific hardware and workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Swap swap]&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Zswap zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/vm/zswap.txt zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/sysctl/vm.txt swappiness and vfs_cache_pressure]&lt;br /&gt;
* The openSUSE guide to [https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.memory.html tuning memory]&lt;br /&gt;
* The [https://github.com/Nefelim4ag/systemd-swap systemd-swap page]&lt;br /&gt;
* The ZFS on Linux guide on [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device Swap Volumes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Translations:Swap/29/de&amp;diff=22319</id>
		<title>Translations:Swap/29/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Translations:Swap/29/de&amp;diff=22319"/>
		<updated>2021-04-02T00:35:26Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Das folgende Skript wird:&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22318</id>
		<title>Swap/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22318"/>
		<updated>2021-04-02T00:35:09Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;Der folgende Skript wird:&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Übersicht=&lt;br /&gt;
&lt;br /&gt;
Der Auslagerungsspeicher wird zur Erweiterung des für die Ausführung von Programmen verfügbaren Speichers (RAM) verwendet.&lt;br /&gt;
* Ohne Auslagerungsspeicher werden bei Speichermangel die Anwendungen ''beendet'', was zu einem Absturz des gesamten Systems führen kann.&lt;br /&gt;
* Wenn dem System Auslagerungsspeicher zur Verfügung steht, kann der Kernel weniger häufig genutzte Speicherseiten von inaktiven Anwendungen / Diensten auf die Festplatte schreiben (&amp;quot;auslagern&amp;quot;), wodurch mehr echter Arbeitsspeicher für aktive Anwendungen zur Verfügung steht.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Es gibt drei verschiedene Möglichkeiten, wie der Swap in Manjaro verwaltet werden kann:&lt;br /&gt;
* Eine Auslagerungs-Partition&lt;br /&gt;
* Eine Auslagerungs-Datei&lt;br /&gt;
* Komprimierte Auslagerung (zswap)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dieser Artikel versucht, so umfassend wie möglich zu sein, aber noch mehr Informationen finden Sie in den  [[Special:MyLanguage/#See_Also|unten verlinkten Artikel]]&lt;br /&gt;
=Brauche ich eine Auslagerung?=&lt;br /&gt;
&lt;br /&gt;
Das ist eine Frage, die nicht beantwortet werden kann, ohne einen Blick auf Ihre Konfiguration zu werfen. Selbst bei reichlich verfügbarem Speicher wird dieser oft als Auffangnetz oder sogar manchmal aufgrund spezifischer Anwendungsanforderungen verwendet, also werfen Sie einen Blick auf die folgende nicht abschließende Liste:&lt;br /&gt;
* Wenn Sie den Ruhezustand verwenden: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie Dienste haben, die nicht immer aktiv sind, aber trotzdem ständig laufen: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die anstelle von RAM direkt virtuellen Speicher für temporäre Speicherung zuweist: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die ein Speicherleck hat: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie einen Server mit 1 TB RAM haben, den Sie als Desktop verwenden, ohne dass Anwendungen virtuellen Speicher zuweisen oder Speicherlecks haben: ''Nein, Sie müssen nicht auslagern!''&lt;br /&gt;
=Wie viel Auslagerungspeicher brauche ich?=&lt;br /&gt;
&lt;br /&gt;
Die benötigte Swap-Größe ist sehr variabel und hängt von ''Ihren'' spezifischen Anwendungen und der Arbeitslast ab.  Es gibt keine allgemeingültige Formel für die Größe des Auslagerungsspeichers, ohne die Nutzung über einen bestimmten Zeitraum hinweg zu überwachen.  Ein vernünftiger Ansatzpunkt wäre:&lt;br /&gt;
* Bei weniger als 4 GB physischem Speicher (RAM) wird dringend empfohlen, dass der Swap-Speicher mindestens so groß sein sollte wie der RAM-Speicher. Außerdem wird empfohlen, dass der Swap-Speicher maximal doppelt so groß ist wie der RAM-Speicher, abhängig von der Größe des für das System verfügbaren Festplattenplatzes, wegen des abnehmenden Nutzens.&lt;br /&gt;
* Bei moderneren Systemen (&amp;gt;4 GB) sollte Ihr Auslagerungsplatz mindestens der Größe Ihres physischen Speichers (RAM) entsprechen, '''wenn Sie den Ruhezustand verwenden''', andernfalls benötigen Sie mindestens ROUNDUP(SQRT(RAM)), d.h. die Quadratwurzel Ihrer Arbeitsspeichergröße aufgerundet auf das nächste GB. Das Maximum ist auch hier das Doppelte der Arbeitsspeichergröße, ebenfalls wegen des abnehmenden Nutzens.&lt;br /&gt;
* Der einzige Nachteil, wenn Sie mehr Auslagerungsspeicher haben, als Sie tatsächlich benötigen, ist, dass der dafür reservierte Speicherplatz nicht für Anwendungs- oder Systemdaten verwendet werden kann.&lt;br /&gt;
&lt;br /&gt;
Der &amp;quot;abnehmende Nutzen&amp;quot; bedeutet, dass Sie, wenn Sie mehr Auslagerungsspeicher als das Doppelte Ihrer RAM-Größe benötigen, besser mehr RAM hinzufügen sollten, da der Zugriff auf die Festplatte (HDD) etwa 10³ langsamer ist als der Zugriff auf den RAM, so dass etwas, das 1 Sekunde dauern würde, plötzlich mehr als 15 Minuten dauert! Und auf einem Halbleiterlaufwerk (Solid State Drive, SSD) dauert derselbe Vorgang, der im RAM 1 Sekunde dauerte, auf dem SSD immer noch etwa 1 Minute!&lt;br /&gt;
&lt;br /&gt;
Unter Berücksichtigung aller oben genannten Punkte ergibt sich die folgende Tabelle:&lt;br /&gt;
&lt;br /&gt;
(die letzten 3 Spalten bezeichnen den Auslagerungsbereich)&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        1GB              1GB                 2GB      2GB&lt;br /&gt;
        2GB              2GB                 3GB      4GB&lt;br /&gt;
        3GB              3GB                 5GB      6GB&lt;br /&gt;
        4GB              4GB                 6GB      8GB&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        5GB              2GB                 7GB     10GB&lt;br /&gt;
        6GB              2GB                 8GB     12GB&lt;br /&gt;
        8GB              3GB                11GB     16GB&lt;br /&gt;
       12GB              3GB                15GB     24GB&lt;br /&gt;
       16GB              4GB                20GB     32GB&lt;br /&gt;
       24GB              5GB                29GB     48GB&lt;br /&gt;
       32GB              6GB                38GB     64GB&lt;br /&gt;
       64GB              8GB                72GB    128GB&lt;br /&gt;
      128GB             11GB               139GB    256GB&lt;br /&gt;
      256GB             16GB               272GB    512GB&lt;br /&gt;
      512GB             23GB               535GB      1TB&lt;br /&gt;
        1TB             32GB              1056GB      2TB&lt;br /&gt;
        2TB             46GB              2094GB      4TB&lt;br /&gt;
        4TB             64GB              4160GB      8TB&lt;br /&gt;
        8TB             91GB              8283GB     16TB&lt;br /&gt;
{{note|Der größte Server, den einer der Autoren dieses Wikis jemals installiert hat, hatte in der Tat 8TB RAM}}&lt;br /&gt;
=Auslagerungsinformationen anzeigen=&lt;br /&gt;
&lt;br /&gt;
Der Befehl {{ic|swapon}} zeigt Ihre aktuellen Swap-Informationen an.  Zum Beispiel:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE   USED PRIO&lt;br /&gt;
 /dev/sda7 partition  20G  44.3M   -2&lt;br /&gt;
&lt;br /&gt;
Der folgende Skript wird:&lt;br /&gt;
* show whether zswap is active or not and if active, give zswap parameters if run with the {{$ic|sudo}} command&lt;br /&gt;
* display a list of all applications / services that take up swap and how much they take up in descending order&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Check whether running as root&lt;br /&gt;
 if [ &amp;quot;$(whoami)&amp;quot; = 'root' ]; then&lt;br /&gt;
   dmesg | grep &amp;quot;zswap:&amp;quot; | grep --silent &amp;quot;load&amp;quot;&lt;br /&gt;
   if [[ $? -eq 0 ]]; then&lt;br /&gt;
     # zswap is active&lt;br /&gt;
     echo &amp;quot;zswap information:&amp;quot;&lt;br /&gt;
     grep --recursive --color=none . /sys/kernel/debug/zswap/&lt;br /&gt;
     read -n 1 -s -r -p &amp;quot;Press any key to continue&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;[warning] zwap not active. Continuing&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;[warning] Not running as root: skipping zswap info&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 for szFile in /proc/*/status ; do&lt;br /&gt;
   awk '/VmSwap|Name/{printf $2 &amp;quot;\t&amp;quot; $3}END{ print &amp;quot;&amp;quot; }' &amp;quot;$szFile&amp;quot;&lt;br /&gt;
 done | sort --key 2 --numeric --reverse | more&lt;br /&gt;
=Using a Swap Partition=&lt;br /&gt;
&lt;br /&gt;
A swap partition is the traditional way of managing swap.  In this scenario, a dedicated partition (or partitions) are created for holding swap.&lt;br /&gt;
==Creating and Enabling a Swap Partition==&lt;br /&gt;
&lt;br /&gt;
To create a swap partition, you need enough unallocated disk space to create an additional partition. If you do not have enough space, skip to the next section [[Special:MyLanguage/#Using_a_swap_file|#Using_a_swap_file]]. A swap partition can be created in any disk management / partition management tool and should be set as type {{ic|linuxswap}}.&lt;br /&gt;
&lt;br /&gt;
Once you have a swap partition you will need to initialize the swap partition with {{ic|mkswap}}.  For example, if your swap partition is {{ic|/dev/sda3}}, you could use the command:&lt;br /&gt;
 sudo mkswap /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swap partition with the {{ic|swapon}} command. Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /dev/sda3&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  It is best to use the UUID instead of the device name for this purpose.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo UUID=$(lsblk -no UUID /dev/sda3) none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you would like to have more than one swap partition, simply repeat the steps above for any additional partitions.&lt;br /&gt;
&lt;br /&gt;
{{note|Be sure to replace /dev/sda3 in the above commands with your actual swap partition.}}&lt;br /&gt;
{{tip|''If you're using a HDD'' (spinning rust) put the swap partition *at the beginning of the disk* as the speed of the disk is higher on the inside tracks. On an SSD this doesn't matter.}}&lt;br /&gt;
=Using a Swapfile=&lt;br /&gt;
&lt;br /&gt;
Using a swap partition has one major disadvantage:  Changing the size of swap or adding swap requires repartitioning the disk.  In current Linux kernels, it is possible to use a swap file instead of a dedicated partition and as from kernel 2.6 onwards there is no performance difference any more between the two.&lt;br /&gt;
&lt;br /&gt;
==Creating and Enabling a Static Swapfile==&lt;br /&gt;
{{tip|There is no reason you can't have both a swap partition and a swapfile.  This is an easy way to add more swap without repartitioning.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First create and intialize the file to hold the swap.  For example, to create a 4GB swapfile, you could use the command:&lt;br /&gt;
 sudo fallocate -l 4G /swapfile&lt;br /&gt;
 sudo mkswap /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the appropriate permissions on the file.  It should be readable and writable only by {{ic|root}}.  This can be done with the command:&lt;br /&gt;
 sudo chmod u=rw,go= /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swapfile with the {{ic|swapon}} command.  Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo /swapfile none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on BTRFS==&lt;br /&gt;
&lt;br /&gt;
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.&lt;br /&gt;
&lt;br /&gt;
Prior to running the {{ic|fallocate}} step above, you should run these commands:&lt;br /&gt;
 sudo truncate -s 0 /swapfile&lt;br /&gt;
 sudo chattr +C /swapfile&lt;br /&gt;
 sudo btrfs property set /swapfile compression none&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These commands create an empty swapfile, disable COW for that file and ensure that compression is disabled.&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on ZFS==&lt;br /&gt;
&lt;br /&gt;
zfs doesn't support swapfiles, however you can achieve a similar benefit using a zvol as a swap volume.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on how to accomplish this can be found in this [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device ZoL guide].&lt;br /&gt;
=Automated Swap Management with systemd-swap=&lt;br /&gt;
{{note|Using systemd-swap with on btrfs/zfs or with hibernation support requires special handling beyond the scope of this article}}&lt;br /&gt;
&lt;br /&gt;
It is possible to automatically manage the size of your swapfile using {{ic|systemd-swap}}.  It can create swap files dynamically based on memory needs.  It is also an easy way to enable/manage [[#Using_zswap_with_systemd-swap|zswap]]&lt;br /&gt;
&lt;br /&gt;
==Installing and Configuring systemd-swap==&lt;br /&gt;
&lt;br /&gt;
First, install and enable {{ic|systemd-swap}}:&lt;br /&gt;
 pamac install systemd-swap&lt;br /&gt;
 sudo systemctl enable systemd-swap.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next enable dynamic swap management by creating a file {{ic|/etc/systemd/swap.conf.d/myswap.conf}} with the following parameters:&lt;br /&gt;
 zswap_enabled=0&lt;br /&gt;
 zram_enabled=0&lt;br /&gt;
 swapfc_enabled=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would prefer a single command to create this file you could use:&lt;br /&gt;
 sudo bash -c 'echo -e &amp;quot;zswap_enabled=0\nzram_enabled=0\nswapfc_enabled=1&amp;quot; &amp;gt; /etc/systemd/swap.conf.d/myswap.conf'&lt;br /&gt;
&lt;br /&gt;
==Remove Other Swap==&lt;br /&gt;
&lt;br /&gt;
In order for systemd-swap to be effective you need to remove any traditional swap devices you have.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To display your current swap devices you can use the command {{ic|swapon}}.  For example, my test machine displays the following:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE USED PRIO&lt;br /&gt;
 /swapfile file        4G   0B   -2&lt;br /&gt;
 /dev/sda3 partition 8.4G   0B   -3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example there are two swap devices.  A swapfile and a swap partition.  To turn them off we can use the command {{ic|swapoff}}.&lt;br /&gt;
 sudo swapoff /swapfile&lt;br /&gt;
 sudo swapoff /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to remove them.  &lt;br /&gt;
The swap partition will need to be deleted using your favorite partitioning tool.  You can remove the swapfile by simply deleting it.&lt;br /&gt;
 sudo rm /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need to also remove any lines related to swap from {{ic|/etc/fstab}}.  Edit the file with an [[Special:MyLanguage/Viewing_and_editing_configuration_files|appropriate text editor]] and remove or comment out the lines for the swap space.  In the example above, we would remove these lines:&lt;br /&gt;
 UUID=c2430cf1-8ea9-4422-a5c5-5a38779194c3 swap           swap    defaults,noatime 0 2&lt;br /&gt;
 /swapfile none swap defaults 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next reboot.  After the reboot, when running {{ic|swapon}} you should see something similiar to the following:&lt;br /&gt;
 NAME                           TYPE SIZE USED PRIO&lt;br /&gt;
 /var/lib/systemd-swap/swapfc/1 file 512M   0B   -2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
systemd-swap will add and remove swapfiles as your memory usage dictates.&lt;br /&gt;
&lt;br /&gt;
{{note|If you don't delete your existing swap partition it will be automatically activated by systemd even though you have removed it from fstab}}&lt;br /&gt;
&lt;br /&gt;
==Using zswap with systemd-swap==&lt;br /&gt;
&lt;br /&gt;
zswap is compressed swap kept in RAM. zswap keeps the most frequently used pages in RAM and writes less frequently used pages to the swap space on disk.  In many workloads, this will result in increased swap performance and less wear and tear on SSDs.&lt;br /&gt;
&lt;br /&gt;
To enable zswap with systemd-swap, simply alter the instructions above and set Linux Kernel parameter {{ic|zswap_enabled=1}}&lt;br /&gt;
=Tuning &amp;amp; Performance Considerations=&lt;br /&gt;
&lt;br /&gt;
Although swap seems like a great way to expand memory, excessive swap use will cause severe performance degradation, as mentioned before.&lt;br /&gt;
&lt;br /&gt;
There are couple of parameters that can be used to tune swap utilization.  These are swappiness and vfs_cache_pressure.  To see your current settings for these you can use the following commands:&lt;br /&gt;
 cat /proc/sys/vm/swappiness&lt;br /&gt;
 cat /proc/sys/vm/vfs_cache_pressure&lt;br /&gt;
&lt;br /&gt;
{{ic|swappiness}} controls how likely a page is to be transferred to swap.  This value represents the percentage of the free memory before activating swap. The lower the value, the less swapping is used and the more memory pages are kept in physical memory where:&lt;br /&gt;
* 0 disables swap&lt;br /&gt;
* 60 is the default value which is ideal for a server running a lot of services&lt;br /&gt;
* 100 is very aggressive swapping.&lt;br /&gt;
&lt;br /&gt;
For ''most'' computers the recommended value is 10: Theoretically, this means to only start swapping when RAM usage reaches around 90 percent.&lt;br /&gt;
&lt;br /&gt;
{{ic|vfs_cache_pressure}} is a percentage value that controls the tendency of the kernel to ''reclaim'' the memory which is used for caching of directory and inode objects.  The default value is 100.  Increasing this value will increase the rate in which these objects are removed from the RAM cache.  Decreasing it will allow these objects to be cached in memory longer, consuming additional RAM over time.  Depending on your specific workload, increasing or decreasing this value too far can have significant negative impacts on system performance.  Experimentation is needed to find the appropriate balance and the default value is reasonable.  In general, it is more common to optimize swappiness before experimenting with vfs_cache_pressure.&lt;br /&gt;
&lt;br /&gt;
To set these values you can use the command {{ic|sysctl}}.  For example, to set the swappiness value to 10 you could use:&lt;br /&gt;
 sudo sysctl vm.swappiness=10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''There is no preset defined answer on the optimal values for these parameters.'''  Experimentation is needed to find the optimum configuration for your specific hardware and workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Swap swap]&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Zswap zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/vm/zswap.txt zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/sysctl/vm.txt swappiness and vfs_cache_pressure]&lt;br /&gt;
* The openSUSE guide to [https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.memory.html tuning memory]&lt;br /&gt;
* The [https://github.com/Nefelim4ag/systemd-swap systemd-swap page]&lt;br /&gt;
* The ZFS on Linux guide on [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device Swap Volumes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Translations:Swap/29/de&amp;diff=22317</id>
		<title>Translations:Swap/29/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Translations:Swap/29/de&amp;diff=22317"/>
		<updated>2021-04-02T00:35:09Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;Der folgende Skript wird:&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Der folgende Skript wird:&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22316</id>
		<title>Swap/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22316"/>
		<updated>2021-04-02T00:34:12Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;Der Befehl {{ic|swapon}} zeigt Ihre aktuellen Swap-Informationen an.  Zum Beispiel:&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Übersicht=&lt;br /&gt;
&lt;br /&gt;
Der Auslagerungsspeicher wird zur Erweiterung des für die Ausführung von Programmen verfügbaren Speichers (RAM) verwendet.&lt;br /&gt;
* Ohne Auslagerungsspeicher werden bei Speichermangel die Anwendungen ''beendet'', was zu einem Absturz des gesamten Systems führen kann.&lt;br /&gt;
* Wenn dem System Auslagerungsspeicher zur Verfügung steht, kann der Kernel weniger häufig genutzte Speicherseiten von inaktiven Anwendungen / Diensten auf die Festplatte schreiben (&amp;quot;auslagern&amp;quot;), wodurch mehr echter Arbeitsspeicher für aktive Anwendungen zur Verfügung steht.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Es gibt drei verschiedene Möglichkeiten, wie der Swap in Manjaro verwaltet werden kann:&lt;br /&gt;
* Eine Auslagerungs-Partition&lt;br /&gt;
* Eine Auslagerungs-Datei&lt;br /&gt;
* Komprimierte Auslagerung (zswap)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dieser Artikel versucht, so umfassend wie möglich zu sein, aber noch mehr Informationen finden Sie in den  [[Special:MyLanguage/#See_Also|unten verlinkten Artikel]]&lt;br /&gt;
=Brauche ich eine Auslagerung?=&lt;br /&gt;
&lt;br /&gt;
Das ist eine Frage, die nicht beantwortet werden kann, ohne einen Blick auf Ihre Konfiguration zu werfen. Selbst bei reichlich verfügbarem Speicher wird dieser oft als Auffangnetz oder sogar manchmal aufgrund spezifischer Anwendungsanforderungen verwendet, also werfen Sie einen Blick auf die folgende nicht abschließende Liste:&lt;br /&gt;
* Wenn Sie den Ruhezustand verwenden: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie Dienste haben, die nicht immer aktiv sind, aber trotzdem ständig laufen: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die anstelle von RAM direkt virtuellen Speicher für temporäre Speicherung zuweist: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die ein Speicherleck hat: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie einen Server mit 1 TB RAM haben, den Sie als Desktop verwenden, ohne dass Anwendungen virtuellen Speicher zuweisen oder Speicherlecks haben: ''Nein, Sie müssen nicht auslagern!''&lt;br /&gt;
=Wie viel Auslagerungspeicher brauche ich?=&lt;br /&gt;
&lt;br /&gt;
Die benötigte Swap-Größe ist sehr variabel und hängt von ''Ihren'' spezifischen Anwendungen und der Arbeitslast ab.  Es gibt keine allgemeingültige Formel für die Größe des Auslagerungsspeichers, ohne die Nutzung über einen bestimmten Zeitraum hinweg zu überwachen.  Ein vernünftiger Ansatzpunkt wäre:&lt;br /&gt;
* Bei weniger als 4 GB physischem Speicher (RAM) wird dringend empfohlen, dass der Swap-Speicher mindestens so groß sein sollte wie der RAM-Speicher. Außerdem wird empfohlen, dass der Swap-Speicher maximal doppelt so groß ist wie der RAM-Speicher, abhängig von der Größe des für das System verfügbaren Festplattenplatzes, wegen des abnehmenden Nutzens.&lt;br /&gt;
* Bei moderneren Systemen (&amp;gt;4 GB) sollte Ihr Auslagerungsplatz mindestens der Größe Ihres physischen Speichers (RAM) entsprechen, '''wenn Sie den Ruhezustand verwenden''', andernfalls benötigen Sie mindestens ROUNDUP(SQRT(RAM)), d.h. die Quadratwurzel Ihrer Arbeitsspeichergröße aufgerundet auf das nächste GB. Das Maximum ist auch hier das Doppelte der Arbeitsspeichergröße, ebenfalls wegen des abnehmenden Nutzens.&lt;br /&gt;
* Der einzige Nachteil, wenn Sie mehr Auslagerungsspeicher haben, als Sie tatsächlich benötigen, ist, dass der dafür reservierte Speicherplatz nicht für Anwendungs- oder Systemdaten verwendet werden kann.&lt;br /&gt;
&lt;br /&gt;
Der &amp;quot;abnehmende Nutzen&amp;quot; bedeutet, dass Sie, wenn Sie mehr Auslagerungsspeicher als das Doppelte Ihrer RAM-Größe benötigen, besser mehr RAM hinzufügen sollten, da der Zugriff auf die Festplatte (HDD) etwa 10³ langsamer ist als der Zugriff auf den RAM, so dass etwas, das 1 Sekunde dauern würde, plötzlich mehr als 15 Minuten dauert! Und auf einem Halbleiterlaufwerk (Solid State Drive, SSD) dauert derselbe Vorgang, der im RAM 1 Sekunde dauerte, auf dem SSD immer noch etwa 1 Minute!&lt;br /&gt;
&lt;br /&gt;
Unter Berücksichtigung aller oben genannten Punkte ergibt sich die folgende Tabelle:&lt;br /&gt;
&lt;br /&gt;
(die letzten 3 Spalten bezeichnen den Auslagerungsbereich)&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        1GB              1GB                 2GB      2GB&lt;br /&gt;
        2GB              2GB                 3GB      4GB&lt;br /&gt;
        3GB              3GB                 5GB      6GB&lt;br /&gt;
        4GB              4GB                 6GB      8GB&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        5GB              2GB                 7GB     10GB&lt;br /&gt;
        6GB              2GB                 8GB     12GB&lt;br /&gt;
        8GB              3GB                11GB     16GB&lt;br /&gt;
       12GB              3GB                15GB     24GB&lt;br /&gt;
       16GB              4GB                20GB     32GB&lt;br /&gt;
       24GB              5GB                29GB     48GB&lt;br /&gt;
       32GB              6GB                38GB     64GB&lt;br /&gt;
       64GB              8GB                72GB    128GB&lt;br /&gt;
      128GB             11GB               139GB    256GB&lt;br /&gt;
      256GB             16GB               272GB    512GB&lt;br /&gt;
      512GB             23GB               535GB      1TB&lt;br /&gt;
        1TB             32GB              1056GB      2TB&lt;br /&gt;
        2TB             46GB              2094GB      4TB&lt;br /&gt;
        4TB             64GB              4160GB      8TB&lt;br /&gt;
        8TB             91GB              8283GB     16TB&lt;br /&gt;
{{note|Der größte Server, den einer der Autoren dieses Wikis jemals installiert hat, hatte in der Tat 8TB RAM}}&lt;br /&gt;
=Auslagerungsinformationen anzeigen=&lt;br /&gt;
&lt;br /&gt;
Der Befehl {{ic|swapon}} zeigt Ihre aktuellen Swap-Informationen an.  Zum Beispiel:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE   USED PRIO&lt;br /&gt;
 /dev/sda7 partition  20G  44.3M   -2&lt;br /&gt;
&lt;br /&gt;
The following script will:&lt;br /&gt;
* show whether zswap is active or not and if active, give zswap parameters if run with the {{$ic|sudo}} command&lt;br /&gt;
* display a list of all applications / services that take up swap and how much they take up in descending order&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Check whether running as root&lt;br /&gt;
 if [ &amp;quot;$(whoami)&amp;quot; = 'root' ]; then&lt;br /&gt;
   dmesg | grep &amp;quot;zswap:&amp;quot; | grep --silent &amp;quot;load&amp;quot;&lt;br /&gt;
   if [[ $? -eq 0 ]]; then&lt;br /&gt;
     # zswap is active&lt;br /&gt;
     echo &amp;quot;zswap information:&amp;quot;&lt;br /&gt;
     grep --recursive --color=none . /sys/kernel/debug/zswap/&lt;br /&gt;
     read -n 1 -s -r -p &amp;quot;Press any key to continue&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;[warning] zwap not active. Continuing&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;[warning] Not running as root: skipping zswap info&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 for szFile in /proc/*/status ; do&lt;br /&gt;
   awk '/VmSwap|Name/{printf $2 &amp;quot;\t&amp;quot; $3}END{ print &amp;quot;&amp;quot; }' &amp;quot;$szFile&amp;quot;&lt;br /&gt;
 done | sort --key 2 --numeric --reverse | more&lt;br /&gt;
=Using a Swap Partition=&lt;br /&gt;
&lt;br /&gt;
A swap partition is the traditional way of managing swap.  In this scenario, a dedicated partition (or partitions) are created for holding swap.&lt;br /&gt;
==Creating and Enabling a Swap Partition==&lt;br /&gt;
&lt;br /&gt;
To create a swap partition, you need enough unallocated disk space to create an additional partition. If you do not have enough space, skip to the next section [[Special:MyLanguage/#Using_a_swap_file|#Using_a_swap_file]]. A swap partition can be created in any disk management / partition management tool and should be set as type {{ic|linuxswap}}.&lt;br /&gt;
&lt;br /&gt;
Once you have a swap partition you will need to initialize the swap partition with {{ic|mkswap}}.  For example, if your swap partition is {{ic|/dev/sda3}}, you could use the command:&lt;br /&gt;
 sudo mkswap /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swap partition with the {{ic|swapon}} command. Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /dev/sda3&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  It is best to use the UUID instead of the device name for this purpose.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo UUID=$(lsblk -no UUID /dev/sda3) none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you would like to have more than one swap partition, simply repeat the steps above for any additional partitions.&lt;br /&gt;
&lt;br /&gt;
{{note|Be sure to replace /dev/sda3 in the above commands with your actual swap partition.}}&lt;br /&gt;
{{tip|''If you're using a HDD'' (spinning rust) put the swap partition *at the beginning of the disk* as the speed of the disk is higher on the inside tracks. On an SSD this doesn't matter.}}&lt;br /&gt;
=Using a Swapfile=&lt;br /&gt;
&lt;br /&gt;
Using a swap partition has one major disadvantage:  Changing the size of swap or adding swap requires repartitioning the disk.  In current Linux kernels, it is possible to use a swap file instead of a dedicated partition and as from kernel 2.6 onwards there is no performance difference any more between the two.&lt;br /&gt;
&lt;br /&gt;
==Creating and Enabling a Static Swapfile==&lt;br /&gt;
{{tip|There is no reason you can't have both a swap partition and a swapfile.  This is an easy way to add more swap without repartitioning.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First create and intialize the file to hold the swap.  For example, to create a 4GB swapfile, you could use the command:&lt;br /&gt;
 sudo fallocate -l 4G /swapfile&lt;br /&gt;
 sudo mkswap /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the appropriate permissions on the file.  It should be readable and writable only by {{ic|root}}.  This can be done with the command:&lt;br /&gt;
 sudo chmod u=rw,go= /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swapfile with the {{ic|swapon}} command.  Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo /swapfile none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on BTRFS==&lt;br /&gt;
&lt;br /&gt;
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.&lt;br /&gt;
&lt;br /&gt;
Prior to running the {{ic|fallocate}} step above, you should run these commands:&lt;br /&gt;
 sudo truncate -s 0 /swapfile&lt;br /&gt;
 sudo chattr +C /swapfile&lt;br /&gt;
 sudo btrfs property set /swapfile compression none&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These commands create an empty swapfile, disable COW for that file and ensure that compression is disabled.&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on ZFS==&lt;br /&gt;
&lt;br /&gt;
zfs doesn't support swapfiles, however you can achieve a similar benefit using a zvol as a swap volume.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on how to accomplish this can be found in this [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device ZoL guide].&lt;br /&gt;
=Automated Swap Management with systemd-swap=&lt;br /&gt;
{{note|Using systemd-swap with on btrfs/zfs or with hibernation support requires special handling beyond the scope of this article}}&lt;br /&gt;
&lt;br /&gt;
It is possible to automatically manage the size of your swapfile using {{ic|systemd-swap}}.  It can create swap files dynamically based on memory needs.  It is also an easy way to enable/manage [[#Using_zswap_with_systemd-swap|zswap]]&lt;br /&gt;
&lt;br /&gt;
==Installing and Configuring systemd-swap==&lt;br /&gt;
&lt;br /&gt;
First, install and enable {{ic|systemd-swap}}:&lt;br /&gt;
 pamac install systemd-swap&lt;br /&gt;
 sudo systemctl enable systemd-swap.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next enable dynamic swap management by creating a file {{ic|/etc/systemd/swap.conf.d/myswap.conf}} with the following parameters:&lt;br /&gt;
 zswap_enabled=0&lt;br /&gt;
 zram_enabled=0&lt;br /&gt;
 swapfc_enabled=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would prefer a single command to create this file you could use:&lt;br /&gt;
 sudo bash -c 'echo -e &amp;quot;zswap_enabled=0\nzram_enabled=0\nswapfc_enabled=1&amp;quot; &amp;gt; /etc/systemd/swap.conf.d/myswap.conf'&lt;br /&gt;
&lt;br /&gt;
==Remove Other Swap==&lt;br /&gt;
&lt;br /&gt;
In order for systemd-swap to be effective you need to remove any traditional swap devices you have.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To display your current swap devices you can use the command {{ic|swapon}}.  For example, my test machine displays the following:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE USED PRIO&lt;br /&gt;
 /swapfile file        4G   0B   -2&lt;br /&gt;
 /dev/sda3 partition 8.4G   0B   -3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example there are two swap devices.  A swapfile and a swap partition.  To turn them off we can use the command {{ic|swapoff}}.&lt;br /&gt;
 sudo swapoff /swapfile&lt;br /&gt;
 sudo swapoff /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to remove them.  &lt;br /&gt;
The swap partition will need to be deleted using your favorite partitioning tool.  You can remove the swapfile by simply deleting it.&lt;br /&gt;
 sudo rm /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need to also remove any lines related to swap from {{ic|/etc/fstab}}.  Edit the file with an [[Special:MyLanguage/Viewing_and_editing_configuration_files|appropriate text editor]] and remove or comment out the lines for the swap space.  In the example above, we would remove these lines:&lt;br /&gt;
 UUID=c2430cf1-8ea9-4422-a5c5-5a38779194c3 swap           swap    defaults,noatime 0 2&lt;br /&gt;
 /swapfile none swap defaults 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next reboot.  After the reboot, when running {{ic|swapon}} you should see something similiar to the following:&lt;br /&gt;
 NAME                           TYPE SIZE USED PRIO&lt;br /&gt;
 /var/lib/systemd-swap/swapfc/1 file 512M   0B   -2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
systemd-swap will add and remove swapfiles as your memory usage dictates.&lt;br /&gt;
&lt;br /&gt;
{{note|If you don't delete your existing swap partition it will be automatically activated by systemd even though you have removed it from fstab}}&lt;br /&gt;
&lt;br /&gt;
==Using zswap with systemd-swap==&lt;br /&gt;
&lt;br /&gt;
zswap is compressed swap kept in RAM. zswap keeps the most frequently used pages in RAM and writes less frequently used pages to the swap space on disk.  In many workloads, this will result in increased swap performance and less wear and tear on SSDs.&lt;br /&gt;
&lt;br /&gt;
To enable zswap with systemd-swap, simply alter the instructions above and set Linux Kernel parameter {{ic|zswap_enabled=1}}&lt;br /&gt;
=Tuning &amp;amp; Performance Considerations=&lt;br /&gt;
&lt;br /&gt;
Although swap seems like a great way to expand memory, excessive swap use will cause severe performance degradation, as mentioned before.&lt;br /&gt;
&lt;br /&gt;
There are couple of parameters that can be used to tune swap utilization.  These are swappiness and vfs_cache_pressure.  To see your current settings for these you can use the following commands:&lt;br /&gt;
 cat /proc/sys/vm/swappiness&lt;br /&gt;
 cat /proc/sys/vm/vfs_cache_pressure&lt;br /&gt;
&lt;br /&gt;
{{ic|swappiness}} controls how likely a page is to be transferred to swap.  This value represents the percentage of the free memory before activating swap. The lower the value, the less swapping is used and the more memory pages are kept in physical memory where:&lt;br /&gt;
* 0 disables swap&lt;br /&gt;
* 60 is the default value which is ideal for a server running a lot of services&lt;br /&gt;
* 100 is very aggressive swapping.&lt;br /&gt;
&lt;br /&gt;
For ''most'' computers the recommended value is 10: Theoretically, this means to only start swapping when RAM usage reaches around 90 percent.&lt;br /&gt;
&lt;br /&gt;
{{ic|vfs_cache_pressure}} is a percentage value that controls the tendency of the kernel to ''reclaim'' the memory which is used for caching of directory and inode objects.  The default value is 100.  Increasing this value will increase the rate in which these objects are removed from the RAM cache.  Decreasing it will allow these objects to be cached in memory longer, consuming additional RAM over time.  Depending on your specific workload, increasing or decreasing this value too far can have significant negative impacts on system performance.  Experimentation is needed to find the appropriate balance and the default value is reasonable.  In general, it is more common to optimize swappiness before experimenting with vfs_cache_pressure.&lt;br /&gt;
&lt;br /&gt;
To set these values you can use the command {{ic|sysctl}}.  For example, to set the swappiness value to 10 you could use:&lt;br /&gt;
 sudo sysctl vm.swappiness=10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''There is no preset defined answer on the optimal values for these parameters.'''  Experimentation is needed to find the optimum configuration for your specific hardware and workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Swap swap]&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Zswap zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/vm/zswap.txt zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/sysctl/vm.txt swappiness and vfs_cache_pressure]&lt;br /&gt;
* The openSUSE guide to [https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.memory.html tuning memory]&lt;br /&gt;
* The [https://github.com/Nefelim4ag/systemd-swap systemd-swap page]&lt;br /&gt;
* The ZFS on Linux guide on [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device Swap Volumes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Translations:Swap/28/de&amp;diff=22315</id>
		<title>Translations:Swap/28/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Translations:Swap/28/de&amp;diff=22315"/>
		<updated>2021-04-02T00:34:12Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;Der Befehl {{ic|swapon}} zeigt Ihre aktuellen Swap-Informationen an.  Zum Beispiel:&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Der Befehl {{ic|swapon}} zeigt Ihre aktuellen Swap-Informationen an.  Zum Beispiel:&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22314</id>
		<title>Swap/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22314"/>
		<updated>2021-04-02T00:33:50Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;=Auslagerungsinformationen anzeigen=&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Übersicht=&lt;br /&gt;
&lt;br /&gt;
Der Auslagerungsspeicher wird zur Erweiterung des für die Ausführung von Programmen verfügbaren Speichers (RAM) verwendet.&lt;br /&gt;
* Ohne Auslagerungsspeicher werden bei Speichermangel die Anwendungen ''beendet'', was zu einem Absturz des gesamten Systems führen kann.&lt;br /&gt;
* Wenn dem System Auslagerungsspeicher zur Verfügung steht, kann der Kernel weniger häufig genutzte Speicherseiten von inaktiven Anwendungen / Diensten auf die Festplatte schreiben (&amp;quot;auslagern&amp;quot;), wodurch mehr echter Arbeitsspeicher für aktive Anwendungen zur Verfügung steht.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Es gibt drei verschiedene Möglichkeiten, wie der Swap in Manjaro verwaltet werden kann:&lt;br /&gt;
* Eine Auslagerungs-Partition&lt;br /&gt;
* Eine Auslagerungs-Datei&lt;br /&gt;
* Komprimierte Auslagerung (zswap)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dieser Artikel versucht, so umfassend wie möglich zu sein, aber noch mehr Informationen finden Sie in den  [[Special:MyLanguage/#See_Also|unten verlinkten Artikel]]&lt;br /&gt;
=Brauche ich eine Auslagerung?=&lt;br /&gt;
&lt;br /&gt;
Das ist eine Frage, die nicht beantwortet werden kann, ohne einen Blick auf Ihre Konfiguration zu werfen. Selbst bei reichlich verfügbarem Speicher wird dieser oft als Auffangnetz oder sogar manchmal aufgrund spezifischer Anwendungsanforderungen verwendet, also werfen Sie einen Blick auf die folgende nicht abschließende Liste:&lt;br /&gt;
* Wenn Sie den Ruhezustand verwenden: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie Dienste haben, die nicht immer aktiv sind, aber trotzdem ständig laufen: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die anstelle von RAM direkt virtuellen Speicher für temporäre Speicherung zuweist: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die ein Speicherleck hat: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie einen Server mit 1 TB RAM haben, den Sie als Desktop verwenden, ohne dass Anwendungen virtuellen Speicher zuweisen oder Speicherlecks haben: ''Nein, Sie müssen nicht auslagern!''&lt;br /&gt;
=Wie viel Auslagerungspeicher brauche ich?=&lt;br /&gt;
&lt;br /&gt;
Die benötigte Swap-Größe ist sehr variabel und hängt von ''Ihren'' spezifischen Anwendungen und der Arbeitslast ab.  Es gibt keine allgemeingültige Formel für die Größe des Auslagerungsspeichers, ohne die Nutzung über einen bestimmten Zeitraum hinweg zu überwachen.  Ein vernünftiger Ansatzpunkt wäre:&lt;br /&gt;
* Bei weniger als 4 GB physischem Speicher (RAM) wird dringend empfohlen, dass der Swap-Speicher mindestens so groß sein sollte wie der RAM-Speicher. Außerdem wird empfohlen, dass der Swap-Speicher maximal doppelt so groß ist wie der RAM-Speicher, abhängig von der Größe des für das System verfügbaren Festplattenplatzes, wegen des abnehmenden Nutzens.&lt;br /&gt;
* Bei moderneren Systemen (&amp;gt;4 GB) sollte Ihr Auslagerungsplatz mindestens der Größe Ihres physischen Speichers (RAM) entsprechen, '''wenn Sie den Ruhezustand verwenden''', andernfalls benötigen Sie mindestens ROUNDUP(SQRT(RAM)), d.h. die Quadratwurzel Ihrer Arbeitsspeichergröße aufgerundet auf das nächste GB. Das Maximum ist auch hier das Doppelte der Arbeitsspeichergröße, ebenfalls wegen des abnehmenden Nutzens.&lt;br /&gt;
* Der einzige Nachteil, wenn Sie mehr Auslagerungsspeicher haben, als Sie tatsächlich benötigen, ist, dass der dafür reservierte Speicherplatz nicht für Anwendungs- oder Systemdaten verwendet werden kann.&lt;br /&gt;
&lt;br /&gt;
Der &amp;quot;abnehmende Nutzen&amp;quot; bedeutet, dass Sie, wenn Sie mehr Auslagerungsspeicher als das Doppelte Ihrer RAM-Größe benötigen, besser mehr RAM hinzufügen sollten, da der Zugriff auf die Festplatte (HDD) etwa 10³ langsamer ist als der Zugriff auf den RAM, so dass etwas, das 1 Sekunde dauern würde, plötzlich mehr als 15 Minuten dauert! Und auf einem Halbleiterlaufwerk (Solid State Drive, SSD) dauert derselbe Vorgang, der im RAM 1 Sekunde dauerte, auf dem SSD immer noch etwa 1 Minute!&lt;br /&gt;
&lt;br /&gt;
Unter Berücksichtigung aller oben genannten Punkte ergibt sich die folgende Tabelle:&lt;br /&gt;
&lt;br /&gt;
(die letzten 3 Spalten bezeichnen den Auslagerungsbereich)&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        1GB              1GB                 2GB      2GB&lt;br /&gt;
        2GB              2GB                 3GB      4GB&lt;br /&gt;
        3GB              3GB                 5GB      6GB&lt;br /&gt;
        4GB              4GB                 6GB      8GB&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        5GB              2GB                 7GB     10GB&lt;br /&gt;
        6GB              2GB                 8GB     12GB&lt;br /&gt;
        8GB              3GB                11GB     16GB&lt;br /&gt;
       12GB              3GB                15GB     24GB&lt;br /&gt;
       16GB              4GB                20GB     32GB&lt;br /&gt;
       24GB              5GB                29GB     48GB&lt;br /&gt;
       32GB              6GB                38GB     64GB&lt;br /&gt;
       64GB              8GB                72GB    128GB&lt;br /&gt;
      128GB             11GB               139GB    256GB&lt;br /&gt;
      256GB             16GB               272GB    512GB&lt;br /&gt;
      512GB             23GB               535GB      1TB&lt;br /&gt;
        1TB             32GB              1056GB      2TB&lt;br /&gt;
        2TB             46GB              2094GB      4TB&lt;br /&gt;
        4TB             64GB              4160GB      8TB&lt;br /&gt;
        8TB             91GB              8283GB     16TB&lt;br /&gt;
{{note|Der größte Server, den einer der Autoren dieses Wikis jemals installiert hat, hatte in der Tat 8TB RAM}}&lt;br /&gt;
=Auslagerungsinformationen anzeigen=&lt;br /&gt;
&lt;br /&gt;
The command {{ic|swapon}} will display your current swap information.  For example:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE   USED PRIO&lt;br /&gt;
 /dev/sda7 partition  20G  44.3M   -2&lt;br /&gt;
&lt;br /&gt;
The following script will:&lt;br /&gt;
* show whether zswap is active or not and if active, give zswap parameters if run with the {{$ic|sudo}} command&lt;br /&gt;
* display a list of all applications / services that take up swap and how much they take up in descending order&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Check whether running as root&lt;br /&gt;
 if [ &amp;quot;$(whoami)&amp;quot; = 'root' ]; then&lt;br /&gt;
   dmesg | grep &amp;quot;zswap:&amp;quot; | grep --silent &amp;quot;load&amp;quot;&lt;br /&gt;
   if [[ $? -eq 0 ]]; then&lt;br /&gt;
     # zswap is active&lt;br /&gt;
     echo &amp;quot;zswap information:&amp;quot;&lt;br /&gt;
     grep --recursive --color=none . /sys/kernel/debug/zswap/&lt;br /&gt;
     read -n 1 -s -r -p &amp;quot;Press any key to continue&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;[warning] zwap not active. Continuing&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;[warning] Not running as root: skipping zswap info&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 for szFile in /proc/*/status ; do&lt;br /&gt;
   awk '/VmSwap|Name/{printf $2 &amp;quot;\t&amp;quot; $3}END{ print &amp;quot;&amp;quot; }' &amp;quot;$szFile&amp;quot;&lt;br /&gt;
 done | sort --key 2 --numeric --reverse | more&lt;br /&gt;
=Using a Swap Partition=&lt;br /&gt;
&lt;br /&gt;
A swap partition is the traditional way of managing swap.  In this scenario, a dedicated partition (or partitions) are created for holding swap.&lt;br /&gt;
==Creating and Enabling a Swap Partition==&lt;br /&gt;
&lt;br /&gt;
To create a swap partition, you need enough unallocated disk space to create an additional partition. If you do not have enough space, skip to the next section [[Special:MyLanguage/#Using_a_swap_file|#Using_a_swap_file]]. A swap partition can be created in any disk management / partition management tool and should be set as type {{ic|linuxswap}}.&lt;br /&gt;
&lt;br /&gt;
Once you have a swap partition you will need to initialize the swap partition with {{ic|mkswap}}.  For example, if your swap partition is {{ic|/dev/sda3}}, you could use the command:&lt;br /&gt;
 sudo mkswap /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swap partition with the {{ic|swapon}} command. Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /dev/sda3&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  It is best to use the UUID instead of the device name for this purpose.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo UUID=$(lsblk -no UUID /dev/sda3) none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you would like to have more than one swap partition, simply repeat the steps above for any additional partitions.&lt;br /&gt;
&lt;br /&gt;
{{note|Be sure to replace /dev/sda3 in the above commands with your actual swap partition.}}&lt;br /&gt;
{{tip|''If you're using a HDD'' (spinning rust) put the swap partition *at the beginning of the disk* as the speed of the disk is higher on the inside tracks. On an SSD this doesn't matter.}}&lt;br /&gt;
=Using a Swapfile=&lt;br /&gt;
&lt;br /&gt;
Using a swap partition has one major disadvantage:  Changing the size of swap or adding swap requires repartitioning the disk.  In current Linux kernels, it is possible to use a swap file instead of a dedicated partition and as from kernel 2.6 onwards there is no performance difference any more between the two.&lt;br /&gt;
&lt;br /&gt;
==Creating and Enabling a Static Swapfile==&lt;br /&gt;
{{tip|There is no reason you can't have both a swap partition and a swapfile.  This is an easy way to add more swap without repartitioning.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First create and intialize the file to hold the swap.  For example, to create a 4GB swapfile, you could use the command:&lt;br /&gt;
 sudo fallocate -l 4G /swapfile&lt;br /&gt;
 sudo mkswap /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the appropriate permissions on the file.  It should be readable and writable only by {{ic|root}}.  This can be done with the command:&lt;br /&gt;
 sudo chmod u=rw,go= /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swapfile with the {{ic|swapon}} command.  Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo /swapfile none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on BTRFS==&lt;br /&gt;
&lt;br /&gt;
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.&lt;br /&gt;
&lt;br /&gt;
Prior to running the {{ic|fallocate}} step above, you should run these commands:&lt;br /&gt;
 sudo truncate -s 0 /swapfile&lt;br /&gt;
 sudo chattr +C /swapfile&lt;br /&gt;
 sudo btrfs property set /swapfile compression none&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These commands create an empty swapfile, disable COW for that file and ensure that compression is disabled.&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on ZFS==&lt;br /&gt;
&lt;br /&gt;
zfs doesn't support swapfiles, however you can achieve a similar benefit using a zvol as a swap volume.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on how to accomplish this can be found in this [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device ZoL guide].&lt;br /&gt;
=Automated Swap Management with systemd-swap=&lt;br /&gt;
{{note|Using systemd-swap with on btrfs/zfs or with hibernation support requires special handling beyond the scope of this article}}&lt;br /&gt;
&lt;br /&gt;
It is possible to automatically manage the size of your swapfile using {{ic|systemd-swap}}.  It can create swap files dynamically based on memory needs.  It is also an easy way to enable/manage [[#Using_zswap_with_systemd-swap|zswap]]&lt;br /&gt;
&lt;br /&gt;
==Installing and Configuring systemd-swap==&lt;br /&gt;
&lt;br /&gt;
First, install and enable {{ic|systemd-swap}}:&lt;br /&gt;
 pamac install systemd-swap&lt;br /&gt;
 sudo systemctl enable systemd-swap.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next enable dynamic swap management by creating a file {{ic|/etc/systemd/swap.conf.d/myswap.conf}} with the following parameters:&lt;br /&gt;
 zswap_enabled=0&lt;br /&gt;
 zram_enabled=0&lt;br /&gt;
 swapfc_enabled=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would prefer a single command to create this file you could use:&lt;br /&gt;
 sudo bash -c 'echo -e &amp;quot;zswap_enabled=0\nzram_enabled=0\nswapfc_enabled=1&amp;quot; &amp;gt; /etc/systemd/swap.conf.d/myswap.conf'&lt;br /&gt;
&lt;br /&gt;
==Remove Other Swap==&lt;br /&gt;
&lt;br /&gt;
In order for systemd-swap to be effective you need to remove any traditional swap devices you have.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To display your current swap devices you can use the command {{ic|swapon}}.  For example, my test machine displays the following:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE USED PRIO&lt;br /&gt;
 /swapfile file        4G   0B   -2&lt;br /&gt;
 /dev/sda3 partition 8.4G   0B   -3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example there are two swap devices.  A swapfile and a swap partition.  To turn them off we can use the command {{ic|swapoff}}.&lt;br /&gt;
 sudo swapoff /swapfile&lt;br /&gt;
 sudo swapoff /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to remove them.  &lt;br /&gt;
The swap partition will need to be deleted using your favorite partitioning tool.  You can remove the swapfile by simply deleting it.&lt;br /&gt;
 sudo rm /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need to also remove any lines related to swap from {{ic|/etc/fstab}}.  Edit the file with an [[Special:MyLanguage/Viewing_and_editing_configuration_files|appropriate text editor]] and remove or comment out the lines for the swap space.  In the example above, we would remove these lines:&lt;br /&gt;
 UUID=c2430cf1-8ea9-4422-a5c5-5a38779194c3 swap           swap    defaults,noatime 0 2&lt;br /&gt;
 /swapfile none swap defaults 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next reboot.  After the reboot, when running {{ic|swapon}} you should see something similiar to the following:&lt;br /&gt;
 NAME                           TYPE SIZE USED PRIO&lt;br /&gt;
 /var/lib/systemd-swap/swapfc/1 file 512M   0B   -2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
systemd-swap will add and remove swapfiles as your memory usage dictates.&lt;br /&gt;
&lt;br /&gt;
{{note|If you don't delete your existing swap partition it will be automatically activated by systemd even though you have removed it from fstab}}&lt;br /&gt;
&lt;br /&gt;
==Using zswap with systemd-swap==&lt;br /&gt;
&lt;br /&gt;
zswap is compressed swap kept in RAM. zswap keeps the most frequently used pages in RAM and writes less frequently used pages to the swap space on disk.  In many workloads, this will result in increased swap performance and less wear and tear on SSDs.&lt;br /&gt;
&lt;br /&gt;
To enable zswap with systemd-swap, simply alter the instructions above and set Linux Kernel parameter {{ic|zswap_enabled=1}}&lt;br /&gt;
=Tuning &amp;amp; Performance Considerations=&lt;br /&gt;
&lt;br /&gt;
Although swap seems like a great way to expand memory, excessive swap use will cause severe performance degradation, as mentioned before.&lt;br /&gt;
&lt;br /&gt;
There are couple of parameters that can be used to tune swap utilization.  These are swappiness and vfs_cache_pressure.  To see your current settings for these you can use the following commands:&lt;br /&gt;
 cat /proc/sys/vm/swappiness&lt;br /&gt;
 cat /proc/sys/vm/vfs_cache_pressure&lt;br /&gt;
&lt;br /&gt;
{{ic|swappiness}} controls how likely a page is to be transferred to swap.  This value represents the percentage of the free memory before activating swap. The lower the value, the less swapping is used and the more memory pages are kept in physical memory where:&lt;br /&gt;
* 0 disables swap&lt;br /&gt;
* 60 is the default value which is ideal for a server running a lot of services&lt;br /&gt;
* 100 is very aggressive swapping.&lt;br /&gt;
&lt;br /&gt;
For ''most'' computers the recommended value is 10: Theoretically, this means to only start swapping when RAM usage reaches around 90 percent.&lt;br /&gt;
&lt;br /&gt;
{{ic|vfs_cache_pressure}} is a percentage value that controls the tendency of the kernel to ''reclaim'' the memory which is used for caching of directory and inode objects.  The default value is 100.  Increasing this value will increase the rate in which these objects are removed from the RAM cache.  Decreasing it will allow these objects to be cached in memory longer, consuming additional RAM over time.  Depending on your specific workload, increasing or decreasing this value too far can have significant negative impacts on system performance.  Experimentation is needed to find the appropriate balance and the default value is reasonable.  In general, it is more common to optimize swappiness before experimenting with vfs_cache_pressure.&lt;br /&gt;
&lt;br /&gt;
To set these values you can use the command {{ic|sysctl}}.  For example, to set the swappiness value to 10 you could use:&lt;br /&gt;
 sudo sysctl vm.swappiness=10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''There is no preset defined answer on the optimal values for these parameters.'''  Experimentation is needed to find the optimum configuration for your specific hardware and workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Swap swap]&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Zswap zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/vm/zswap.txt zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/sysctl/vm.txt swappiness and vfs_cache_pressure]&lt;br /&gt;
* The openSUSE guide to [https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.memory.html tuning memory]&lt;br /&gt;
* The [https://github.com/Nefelim4ag/systemd-swap systemd-swap page]&lt;br /&gt;
* The ZFS on Linux guide on [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device Swap Volumes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Translations:Swap/27/de&amp;diff=22313</id>
		<title>Translations:Swap/27/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Translations:Swap/27/de&amp;diff=22313"/>
		<updated>2021-04-02T00:33:50Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;=Auslagerungsinformationen anzeigen=&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Auslagerungsinformationen anzeigen=&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22312</id>
		<title>Swap/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22312"/>
		<updated>2021-04-02T00:33:23Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;Der größte Server, den einer der Autoren dieses Wikis jemals installiert hat, hatte in der Tat 8TB RAM&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Übersicht=&lt;br /&gt;
&lt;br /&gt;
Der Auslagerungsspeicher wird zur Erweiterung des für die Ausführung von Programmen verfügbaren Speichers (RAM) verwendet.&lt;br /&gt;
* Ohne Auslagerungsspeicher werden bei Speichermangel die Anwendungen ''beendet'', was zu einem Absturz des gesamten Systems führen kann.&lt;br /&gt;
* Wenn dem System Auslagerungsspeicher zur Verfügung steht, kann der Kernel weniger häufig genutzte Speicherseiten von inaktiven Anwendungen / Diensten auf die Festplatte schreiben (&amp;quot;auslagern&amp;quot;), wodurch mehr echter Arbeitsspeicher für aktive Anwendungen zur Verfügung steht.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Es gibt drei verschiedene Möglichkeiten, wie der Swap in Manjaro verwaltet werden kann:&lt;br /&gt;
* Eine Auslagerungs-Partition&lt;br /&gt;
* Eine Auslagerungs-Datei&lt;br /&gt;
* Komprimierte Auslagerung (zswap)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dieser Artikel versucht, so umfassend wie möglich zu sein, aber noch mehr Informationen finden Sie in den  [[Special:MyLanguage/#See_Also|unten verlinkten Artikel]]&lt;br /&gt;
=Brauche ich eine Auslagerung?=&lt;br /&gt;
&lt;br /&gt;
Das ist eine Frage, die nicht beantwortet werden kann, ohne einen Blick auf Ihre Konfiguration zu werfen. Selbst bei reichlich verfügbarem Speicher wird dieser oft als Auffangnetz oder sogar manchmal aufgrund spezifischer Anwendungsanforderungen verwendet, also werfen Sie einen Blick auf die folgende nicht abschließende Liste:&lt;br /&gt;
* Wenn Sie den Ruhezustand verwenden: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie Dienste haben, die nicht immer aktiv sind, aber trotzdem ständig laufen: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die anstelle von RAM direkt virtuellen Speicher für temporäre Speicherung zuweist: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die ein Speicherleck hat: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie einen Server mit 1 TB RAM haben, den Sie als Desktop verwenden, ohne dass Anwendungen virtuellen Speicher zuweisen oder Speicherlecks haben: ''Nein, Sie müssen nicht auslagern!''&lt;br /&gt;
=Wie viel Auslagerungspeicher brauche ich?=&lt;br /&gt;
&lt;br /&gt;
Die benötigte Swap-Größe ist sehr variabel und hängt von ''Ihren'' spezifischen Anwendungen und der Arbeitslast ab.  Es gibt keine allgemeingültige Formel für die Größe des Auslagerungsspeichers, ohne die Nutzung über einen bestimmten Zeitraum hinweg zu überwachen.  Ein vernünftiger Ansatzpunkt wäre:&lt;br /&gt;
* Bei weniger als 4 GB physischem Speicher (RAM) wird dringend empfohlen, dass der Swap-Speicher mindestens so groß sein sollte wie der RAM-Speicher. Außerdem wird empfohlen, dass der Swap-Speicher maximal doppelt so groß ist wie der RAM-Speicher, abhängig von der Größe des für das System verfügbaren Festplattenplatzes, wegen des abnehmenden Nutzens.&lt;br /&gt;
* Bei moderneren Systemen (&amp;gt;4 GB) sollte Ihr Auslagerungsplatz mindestens der Größe Ihres physischen Speichers (RAM) entsprechen, '''wenn Sie den Ruhezustand verwenden''', andernfalls benötigen Sie mindestens ROUNDUP(SQRT(RAM)), d.h. die Quadratwurzel Ihrer Arbeitsspeichergröße aufgerundet auf das nächste GB. Das Maximum ist auch hier das Doppelte der Arbeitsspeichergröße, ebenfalls wegen des abnehmenden Nutzens.&lt;br /&gt;
* Der einzige Nachteil, wenn Sie mehr Auslagerungsspeicher haben, als Sie tatsächlich benötigen, ist, dass der dafür reservierte Speicherplatz nicht für Anwendungs- oder Systemdaten verwendet werden kann.&lt;br /&gt;
&lt;br /&gt;
Der &amp;quot;abnehmende Nutzen&amp;quot; bedeutet, dass Sie, wenn Sie mehr Auslagerungsspeicher als das Doppelte Ihrer RAM-Größe benötigen, besser mehr RAM hinzufügen sollten, da der Zugriff auf die Festplatte (HDD) etwa 10³ langsamer ist als der Zugriff auf den RAM, so dass etwas, das 1 Sekunde dauern würde, plötzlich mehr als 15 Minuten dauert! Und auf einem Halbleiterlaufwerk (Solid State Drive, SSD) dauert derselbe Vorgang, der im RAM 1 Sekunde dauerte, auf dem SSD immer noch etwa 1 Minute!&lt;br /&gt;
&lt;br /&gt;
Unter Berücksichtigung aller oben genannten Punkte ergibt sich die folgende Tabelle:&lt;br /&gt;
&lt;br /&gt;
(die letzten 3 Spalten bezeichnen den Auslagerungsbereich)&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        1GB              1GB                 2GB      2GB&lt;br /&gt;
        2GB              2GB                 3GB      4GB&lt;br /&gt;
        3GB              3GB                 5GB      6GB&lt;br /&gt;
        4GB              4GB                 6GB      8GB&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        5GB              2GB                 7GB     10GB&lt;br /&gt;
        6GB              2GB                 8GB     12GB&lt;br /&gt;
        8GB              3GB                11GB     16GB&lt;br /&gt;
       12GB              3GB                15GB     24GB&lt;br /&gt;
       16GB              4GB                20GB     32GB&lt;br /&gt;
       24GB              5GB                29GB     48GB&lt;br /&gt;
       32GB              6GB                38GB     64GB&lt;br /&gt;
       64GB              8GB                72GB    128GB&lt;br /&gt;
      128GB             11GB               139GB    256GB&lt;br /&gt;
      256GB             16GB               272GB    512GB&lt;br /&gt;
      512GB             23GB               535GB      1TB&lt;br /&gt;
        1TB             32GB              1056GB      2TB&lt;br /&gt;
        2TB             46GB              2094GB      4TB&lt;br /&gt;
        4TB             64GB              4160GB      8TB&lt;br /&gt;
        8TB             91GB              8283GB     16TB&lt;br /&gt;
{{note|Der größte Server, den einer der Autoren dieses Wikis jemals installiert hat, hatte in der Tat 8TB RAM}}&lt;br /&gt;
=Displaying Swap Information=&lt;br /&gt;
&lt;br /&gt;
The command {{ic|swapon}} will display your current swap information.  For example:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE   USED PRIO&lt;br /&gt;
 /dev/sda7 partition  20G  44.3M   -2&lt;br /&gt;
&lt;br /&gt;
The following script will:&lt;br /&gt;
* show whether zswap is active or not and if active, give zswap parameters if run with the {{$ic|sudo}} command&lt;br /&gt;
* display a list of all applications / services that take up swap and how much they take up in descending order&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Check whether running as root&lt;br /&gt;
 if [ &amp;quot;$(whoami)&amp;quot; = 'root' ]; then&lt;br /&gt;
   dmesg | grep &amp;quot;zswap:&amp;quot; | grep --silent &amp;quot;load&amp;quot;&lt;br /&gt;
   if [[ $? -eq 0 ]]; then&lt;br /&gt;
     # zswap is active&lt;br /&gt;
     echo &amp;quot;zswap information:&amp;quot;&lt;br /&gt;
     grep --recursive --color=none . /sys/kernel/debug/zswap/&lt;br /&gt;
     read -n 1 -s -r -p &amp;quot;Press any key to continue&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;[warning] zwap not active. Continuing&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;[warning] Not running as root: skipping zswap info&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 for szFile in /proc/*/status ; do&lt;br /&gt;
   awk '/VmSwap|Name/{printf $2 &amp;quot;\t&amp;quot; $3}END{ print &amp;quot;&amp;quot; }' &amp;quot;$szFile&amp;quot;&lt;br /&gt;
 done | sort --key 2 --numeric --reverse | more&lt;br /&gt;
=Using a Swap Partition=&lt;br /&gt;
&lt;br /&gt;
A swap partition is the traditional way of managing swap.  In this scenario, a dedicated partition (or partitions) are created for holding swap.&lt;br /&gt;
==Creating and Enabling a Swap Partition==&lt;br /&gt;
&lt;br /&gt;
To create a swap partition, you need enough unallocated disk space to create an additional partition. If you do not have enough space, skip to the next section [[Special:MyLanguage/#Using_a_swap_file|#Using_a_swap_file]]. A swap partition can be created in any disk management / partition management tool and should be set as type {{ic|linuxswap}}.&lt;br /&gt;
&lt;br /&gt;
Once you have a swap partition you will need to initialize the swap partition with {{ic|mkswap}}.  For example, if your swap partition is {{ic|/dev/sda3}}, you could use the command:&lt;br /&gt;
 sudo mkswap /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swap partition with the {{ic|swapon}} command. Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /dev/sda3&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  It is best to use the UUID instead of the device name for this purpose.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo UUID=$(lsblk -no UUID /dev/sda3) none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you would like to have more than one swap partition, simply repeat the steps above for any additional partitions.&lt;br /&gt;
&lt;br /&gt;
{{note|Be sure to replace /dev/sda3 in the above commands with your actual swap partition.}}&lt;br /&gt;
{{tip|''If you're using a HDD'' (spinning rust) put the swap partition *at the beginning of the disk* as the speed of the disk is higher on the inside tracks. On an SSD this doesn't matter.}}&lt;br /&gt;
=Using a Swapfile=&lt;br /&gt;
&lt;br /&gt;
Using a swap partition has one major disadvantage:  Changing the size of swap or adding swap requires repartitioning the disk.  In current Linux kernels, it is possible to use a swap file instead of a dedicated partition and as from kernel 2.6 onwards there is no performance difference any more between the two.&lt;br /&gt;
&lt;br /&gt;
==Creating and Enabling a Static Swapfile==&lt;br /&gt;
{{tip|There is no reason you can't have both a swap partition and a swapfile.  This is an easy way to add more swap without repartitioning.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First create and intialize the file to hold the swap.  For example, to create a 4GB swapfile, you could use the command:&lt;br /&gt;
 sudo fallocate -l 4G /swapfile&lt;br /&gt;
 sudo mkswap /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the appropriate permissions on the file.  It should be readable and writable only by {{ic|root}}.  This can be done with the command:&lt;br /&gt;
 sudo chmod u=rw,go= /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swapfile with the {{ic|swapon}} command.  Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo /swapfile none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on BTRFS==&lt;br /&gt;
&lt;br /&gt;
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.&lt;br /&gt;
&lt;br /&gt;
Prior to running the {{ic|fallocate}} step above, you should run these commands:&lt;br /&gt;
 sudo truncate -s 0 /swapfile&lt;br /&gt;
 sudo chattr +C /swapfile&lt;br /&gt;
 sudo btrfs property set /swapfile compression none&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These commands create an empty swapfile, disable COW for that file and ensure that compression is disabled.&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on ZFS==&lt;br /&gt;
&lt;br /&gt;
zfs doesn't support swapfiles, however you can achieve a similar benefit using a zvol as a swap volume.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on how to accomplish this can be found in this [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device ZoL guide].&lt;br /&gt;
=Automated Swap Management with systemd-swap=&lt;br /&gt;
{{note|Using systemd-swap with on btrfs/zfs or with hibernation support requires special handling beyond the scope of this article}}&lt;br /&gt;
&lt;br /&gt;
It is possible to automatically manage the size of your swapfile using {{ic|systemd-swap}}.  It can create swap files dynamically based on memory needs.  It is also an easy way to enable/manage [[#Using_zswap_with_systemd-swap|zswap]]&lt;br /&gt;
&lt;br /&gt;
==Installing and Configuring systemd-swap==&lt;br /&gt;
&lt;br /&gt;
First, install and enable {{ic|systemd-swap}}:&lt;br /&gt;
 pamac install systemd-swap&lt;br /&gt;
 sudo systemctl enable systemd-swap.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next enable dynamic swap management by creating a file {{ic|/etc/systemd/swap.conf.d/myswap.conf}} with the following parameters:&lt;br /&gt;
 zswap_enabled=0&lt;br /&gt;
 zram_enabled=0&lt;br /&gt;
 swapfc_enabled=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would prefer a single command to create this file you could use:&lt;br /&gt;
 sudo bash -c 'echo -e &amp;quot;zswap_enabled=0\nzram_enabled=0\nswapfc_enabled=1&amp;quot; &amp;gt; /etc/systemd/swap.conf.d/myswap.conf'&lt;br /&gt;
&lt;br /&gt;
==Remove Other Swap==&lt;br /&gt;
&lt;br /&gt;
In order for systemd-swap to be effective you need to remove any traditional swap devices you have.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To display your current swap devices you can use the command {{ic|swapon}}.  For example, my test machine displays the following:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE USED PRIO&lt;br /&gt;
 /swapfile file        4G   0B   -2&lt;br /&gt;
 /dev/sda3 partition 8.4G   0B   -3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example there are two swap devices.  A swapfile and a swap partition.  To turn them off we can use the command {{ic|swapoff}}.&lt;br /&gt;
 sudo swapoff /swapfile&lt;br /&gt;
 sudo swapoff /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to remove them.  &lt;br /&gt;
The swap partition will need to be deleted using your favorite partitioning tool.  You can remove the swapfile by simply deleting it.&lt;br /&gt;
 sudo rm /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need to also remove any lines related to swap from {{ic|/etc/fstab}}.  Edit the file with an [[Special:MyLanguage/Viewing_and_editing_configuration_files|appropriate text editor]] and remove or comment out the lines for the swap space.  In the example above, we would remove these lines:&lt;br /&gt;
 UUID=c2430cf1-8ea9-4422-a5c5-5a38779194c3 swap           swap    defaults,noatime 0 2&lt;br /&gt;
 /swapfile none swap defaults 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next reboot.  After the reboot, when running {{ic|swapon}} you should see something similiar to the following:&lt;br /&gt;
 NAME                           TYPE SIZE USED PRIO&lt;br /&gt;
 /var/lib/systemd-swap/swapfc/1 file 512M   0B   -2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
systemd-swap will add and remove swapfiles as your memory usage dictates.&lt;br /&gt;
&lt;br /&gt;
{{note|If you don't delete your existing swap partition it will be automatically activated by systemd even though you have removed it from fstab}}&lt;br /&gt;
&lt;br /&gt;
==Using zswap with systemd-swap==&lt;br /&gt;
&lt;br /&gt;
zswap is compressed swap kept in RAM. zswap keeps the most frequently used pages in RAM and writes less frequently used pages to the swap space on disk.  In many workloads, this will result in increased swap performance and less wear and tear on SSDs.&lt;br /&gt;
&lt;br /&gt;
To enable zswap with systemd-swap, simply alter the instructions above and set Linux Kernel parameter {{ic|zswap_enabled=1}}&lt;br /&gt;
=Tuning &amp;amp; Performance Considerations=&lt;br /&gt;
&lt;br /&gt;
Although swap seems like a great way to expand memory, excessive swap use will cause severe performance degradation, as mentioned before.&lt;br /&gt;
&lt;br /&gt;
There are couple of parameters that can be used to tune swap utilization.  These are swappiness and vfs_cache_pressure.  To see your current settings for these you can use the following commands:&lt;br /&gt;
 cat /proc/sys/vm/swappiness&lt;br /&gt;
 cat /proc/sys/vm/vfs_cache_pressure&lt;br /&gt;
&lt;br /&gt;
{{ic|swappiness}} controls how likely a page is to be transferred to swap.  This value represents the percentage of the free memory before activating swap. The lower the value, the less swapping is used and the more memory pages are kept in physical memory where:&lt;br /&gt;
* 0 disables swap&lt;br /&gt;
* 60 is the default value which is ideal for a server running a lot of services&lt;br /&gt;
* 100 is very aggressive swapping.&lt;br /&gt;
&lt;br /&gt;
For ''most'' computers the recommended value is 10: Theoretically, this means to only start swapping when RAM usage reaches around 90 percent.&lt;br /&gt;
&lt;br /&gt;
{{ic|vfs_cache_pressure}} is a percentage value that controls the tendency of the kernel to ''reclaim'' the memory which is used for caching of directory and inode objects.  The default value is 100.  Increasing this value will increase the rate in which these objects are removed from the RAM cache.  Decreasing it will allow these objects to be cached in memory longer, consuming additional RAM over time.  Depending on your specific workload, increasing or decreasing this value too far can have significant negative impacts on system performance.  Experimentation is needed to find the appropriate balance and the default value is reasonable.  In general, it is more common to optimize swappiness before experimenting with vfs_cache_pressure.&lt;br /&gt;
&lt;br /&gt;
To set these values you can use the command {{ic|sysctl}}.  For example, to set the swappiness value to 10 you could use:&lt;br /&gt;
 sudo sysctl vm.swappiness=10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''There is no preset defined answer on the optimal values for these parameters.'''  Experimentation is needed to find the optimum configuration for your specific hardware and workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Swap swap]&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Zswap zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/vm/zswap.txt zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/sysctl/vm.txt swappiness and vfs_cache_pressure]&lt;br /&gt;
* The openSUSE guide to [https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.memory.html tuning memory]&lt;br /&gt;
* The [https://github.com/Nefelim4ag/systemd-swap systemd-swap page]&lt;br /&gt;
* The ZFS on Linux guide on [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device Swap Volumes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Translations:Swap/26/de&amp;diff=22311</id>
		<title>Translations:Swap/26/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Translations:Swap/26/de&amp;diff=22311"/>
		<updated>2021-04-02T00:33:23Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: Created page with &amp;quot;Der größte Server, den einer der Autoren dieses Wikis jemals installiert hat, hatte in der Tat 8TB RAM&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Der größte Server, den einer der Autoren dieses Wikis jemals installiert hat, hatte in der Tat 8TB RAM&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22310</id>
		<title>Swap/de</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Swap/de&amp;diff=22310"/>
		<updated>2021-04-02T00:31:49Z</updated>

		<summary type="html">&lt;p&gt;Megavolt: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Übersicht=&lt;br /&gt;
&lt;br /&gt;
Der Auslagerungsspeicher wird zur Erweiterung des für die Ausführung von Programmen verfügbaren Speichers (RAM) verwendet.&lt;br /&gt;
* Ohne Auslagerungsspeicher werden bei Speichermangel die Anwendungen ''beendet'', was zu einem Absturz des gesamten Systems führen kann.&lt;br /&gt;
* Wenn dem System Auslagerungsspeicher zur Verfügung steht, kann der Kernel weniger häufig genutzte Speicherseiten von inaktiven Anwendungen / Diensten auf die Festplatte schreiben (&amp;quot;auslagern&amp;quot;), wodurch mehr echter Arbeitsspeicher für aktive Anwendungen zur Verfügung steht.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Es gibt drei verschiedene Möglichkeiten, wie der Swap in Manjaro verwaltet werden kann:&lt;br /&gt;
* Eine Auslagerungs-Partition&lt;br /&gt;
* Eine Auslagerungs-Datei&lt;br /&gt;
* Komprimierte Auslagerung (zswap)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dieser Artikel versucht, so umfassend wie möglich zu sein, aber noch mehr Informationen finden Sie in den  [[Special:MyLanguage/#See_Also|unten verlinkten Artikel]]&lt;br /&gt;
=Brauche ich eine Auslagerung?=&lt;br /&gt;
&lt;br /&gt;
Das ist eine Frage, die nicht beantwortet werden kann, ohne einen Blick auf Ihre Konfiguration zu werfen. Selbst bei reichlich verfügbarem Speicher wird dieser oft als Auffangnetz oder sogar manchmal aufgrund spezifischer Anwendungsanforderungen verwendet, also werfen Sie einen Blick auf die folgende nicht abschließende Liste:&lt;br /&gt;
* Wenn Sie den Ruhezustand verwenden: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie Dienste haben, die nicht immer aktiv sind, aber trotzdem ständig laufen: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die anstelle von RAM direkt virtuellen Speicher für temporäre Speicherung zuweist: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie eine Anwendung haben, die ein Speicherleck hat: ''ja, Sie müssen auslagern!''&lt;br /&gt;
* Wenn Sie einen Server mit 1 TB RAM haben, den Sie als Desktop verwenden, ohne dass Anwendungen virtuellen Speicher zuweisen oder Speicherlecks haben: ''Nein, Sie müssen nicht auslagern!''&lt;br /&gt;
=Wie viel Auslagerungspeicher brauche ich?=&lt;br /&gt;
&lt;br /&gt;
Die benötigte Swap-Größe ist sehr variabel und hängt von ''Ihren'' spezifischen Anwendungen und der Arbeitslast ab.  Es gibt keine allgemeingültige Formel für die Größe des Auslagerungsspeichers, ohne die Nutzung über einen bestimmten Zeitraum hinweg zu überwachen.  Ein vernünftiger Ansatzpunkt wäre:&lt;br /&gt;
* Bei weniger als 4 GB physischem Speicher (RAM) wird dringend empfohlen, dass der Swap-Speicher mindestens so groß sein sollte wie der RAM-Speicher. Außerdem wird empfohlen, dass der Swap-Speicher maximal doppelt so groß ist wie der RAM-Speicher, abhängig von der Größe des für das System verfügbaren Festplattenplatzes, wegen des abnehmenden Nutzens.&lt;br /&gt;
* Bei moderneren Systemen (&amp;gt;4 GB) sollte Ihr Auslagerungsplatz mindestens der Größe Ihres physischen Speichers (RAM) entsprechen, '''wenn Sie den Ruhezustand verwenden''', andernfalls benötigen Sie mindestens ROUNDUP(SQRT(RAM)), d.h. die Quadratwurzel Ihrer Arbeitsspeichergröße aufgerundet auf das nächste GB. Das Maximum ist auch hier das Doppelte der Arbeitsspeichergröße, ebenfalls wegen des abnehmenden Nutzens.&lt;br /&gt;
* Der einzige Nachteil, wenn Sie mehr Auslagerungsspeicher haben, als Sie tatsächlich benötigen, ist, dass der dafür reservierte Speicherplatz nicht für Anwendungs- oder Systemdaten verwendet werden kann.&lt;br /&gt;
&lt;br /&gt;
Der &amp;quot;abnehmende Nutzen&amp;quot; bedeutet, dass Sie, wenn Sie mehr Auslagerungsspeicher als das Doppelte Ihrer RAM-Größe benötigen, besser mehr RAM hinzufügen sollten, da der Zugriff auf die Festplatte (HDD) etwa 10³ langsamer ist als der Zugriff auf den RAM, so dass etwas, das 1 Sekunde dauern würde, plötzlich mehr als 15 Minuten dauert! Und auf einem Halbleiterlaufwerk (Solid State Drive, SSD) dauert derselbe Vorgang, der im RAM 1 Sekunde dauerte, auf dem SSD immer noch etwa 1 Minute!&lt;br /&gt;
&lt;br /&gt;
Unter Berücksichtigung aller oben genannten Punkte ergibt sich die folgende Tabelle:&lt;br /&gt;
&lt;br /&gt;
(die letzten 3 Spalten bezeichnen den Auslagerungsbereich)&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        1GB              1GB                 2GB      2GB&lt;br /&gt;
        2GB              2GB                 3GB      4GB&lt;br /&gt;
        3GB              3GB                 5GB      6GB&lt;br /&gt;
        4GB              4GB                 6GB      8GB&lt;br /&gt;
&lt;br /&gt;
        Arbeitsspeicher   Kein Ruhezustand   Mit Ruhezustand   Maximum&lt;br /&gt;
        5GB              2GB                 7GB     10GB&lt;br /&gt;
        6GB              2GB                 8GB     12GB&lt;br /&gt;
        8GB              3GB                11GB     16GB&lt;br /&gt;
       12GB              3GB                15GB     24GB&lt;br /&gt;
       16GB              4GB                20GB     32GB&lt;br /&gt;
       24GB              5GB                29GB     48GB&lt;br /&gt;
       32GB              6GB                38GB     64GB&lt;br /&gt;
       64GB              8GB                72GB    128GB&lt;br /&gt;
      128GB             11GB               139GB    256GB&lt;br /&gt;
      256GB             16GB               272GB    512GB&lt;br /&gt;
      512GB             23GB               535GB      1TB&lt;br /&gt;
        1TB             32GB              1056GB      2TB&lt;br /&gt;
        2TB             46GB              2094GB      4TB&lt;br /&gt;
        4TB             64GB              4160GB      8TB&lt;br /&gt;
        8TB             91GB              8283GB     16TB&lt;br /&gt;
{{note|The largest server one of the authors of this wiki has ever installed had, indeed, 8TB of RAM}}&lt;br /&gt;
=Displaying Swap Information=&lt;br /&gt;
&lt;br /&gt;
The command {{ic|swapon}} will display your current swap information.  For example:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE   USED PRIO&lt;br /&gt;
 /dev/sda7 partition  20G  44.3M   -2&lt;br /&gt;
&lt;br /&gt;
The following script will:&lt;br /&gt;
* show whether zswap is active or not and if active, give zswap parameters if run with the {{$ic|sudo}} command&lt;br /&gt;
* display a list of all applications / services that take up swap and how much they take up in descending order&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #Check whether running as root&lt;br /&gt;
 if [ &amp;quot;$(whoami)&amp;quot; = 'root' ]; then&lt;br /&gt;
   dmesg | grep &amp;quot;zswap:&amp;quot; | grep --silent &amp;quot;load&amp;quot;&lt;br /&gt;
   if [[ $? -eq 0 ]]; then&lt;br /&gt;
     # zswap is active&lt;br /&gt;
     echo &amp;quot;zswap information:&amp;quot;&lt;br /&gt;
     grep --recursive --color=none . /sys/kernel/debug/zswap/&lt;br /&gt;
     read -n 1 -s -r -p &amp;quot;Press any key to continue&amp;quot;&lt;br /&gt;
   else&lt;br /&gt;
     echo &amp;quot;[warning] zwap not active. Continuing&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 else&lt;br /&gt;
   echo &amp;quot;[warning] Not running as root: skipping zswap info&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 for szFile in /proc/*/status ; do&lt;br /&gt;
   awk '/VmSwap|Name/{printf $2 &amp;quot;\t&amp;quot; $3}END{ print &amp;quot;&amp;quot; }' &amp;quot;$szFile&amp;quot;&lt;br /&gt;
 done | sort --key 2 --numeric --reverse | more&lt;br /&gt;
=Using a Swap Partition=&lt;br /&gt;
&lt;br /&gt;
A swap partition is the traditional way of managing swap.  In this scenario, a dedicated partition (or partitions) are created for holding swap.&lt;br /&gt;
==Creating and Enabling a Swap Partition==&lt;br /&gt;
&lt;br /&gt;
To create a swap partition, you need enough unallocated disk space to create an additional partition. If you do not have enough space, skip to the next section [[Special:MyLanguage/#Using_a_swap_file|#Using_a_swap_file]]. A swap partition can be created in any disk management / partition management tool and should be set as type {{ic|linuxswap}}.&lt;br /&gt;
&lt;br /&gt;
Once you have a swap partition you will need to initialize the swap partition with {{ic|mkswap}}.  For example, if your swap partition is {{ic|/dev/sda3}}, you could use the command:&lt;br /&gt;
 sudo mkswap /dev/sda3&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swap partition with the {{ic|swapon}} command. Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /dev/sda3&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  It is best to use the UUID instead of the device name for this purpose.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo UUID=$(lsblk -no UUID /dev/sda3) none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you would like to have more than one swap partition, simply repeat the steps above for any additional partitions.&lt;br /&gt;
&lt;br /&gt;
{{note|Be sure to replace /dev/sda3 in the above commands with your actual swap partition.}}&lt;br /&gt;
{{tip|''If you're using a HDD'' (spinning rust) put the swap partition *at the beginning of the disk* as the speed of the disk is higher on the inside tracks. On an SSD this doesn't matter.}}&lt;br /&gt;
=Using a Swapfile=&lt;br /&gt;
&lt;br /&gt;
Using a swap partition has one major disadvantage:  Changing the size of swap or adding swap requires repartitioning the disk.  In current Linux kernels, it is possible to use a swap file instead of a dedicated partition and as from kernel 2.6 onwards there is no performance difference any more between the two.&lt;br /&gt;
&lt;br /&gt;
==Creating and Enabling a Static Swapfile==&lt;br /&gt;
{{tip|There is no reason you can't have both a swap partition and a swapfile.  This is an easy way to add more swap without repartitioning.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First create and intialize the file to hold the swap.  For example, to create a 4GB swapfile, you could use the command:&lt;br /&gt;
 sudo fallocate -l 4G /swapfile&lt;br /&gt;
 sudo mkswap /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the appropriate permissions on the file.  It should be readable and writable only by {{ic|root}}.  This can be done with the command:&lt;br /&gt;
 sudo chmod u=rw,go= /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to enable the swapfile with the {{ic|swapon}} command.  Following our example above this could be done with:&lt;br /&gt;
 sudo swapon /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the swap is enabled at boot we can add an entry to {{ic|/etc/fstab}}.  You can add the line to fstab manually or using the command:&lt;br /&gt;
 sudo bash -c &amp;quot;echo /swapfile none swap defaults 0 0 &amp;gt;&amp;gt; /etc/fstab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on BTRFS==&lt;br /&gt;
&lt;br /&gt;
As of kernel 5.0 and higher, swapfiles are supported on btfrs.  They still require some special handling in addition to the above steps.&lt;br /&gt;
&lt;br /&gt;
Prior to running the {{ic|fallocate}} step above, you should run these commands:&lt;br /&gt;
 sudo truncate -s 0 /swapfile&lt;br /&gt;
 sudo chattr +C /swapfile&lt;br /&gt;
 sudo btrfs property set /swapfile compression none&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These commands create an empty swapfile, disable COW for that file and ensure that compression is disabled.&lt;br /&gt;
&lt;br /&gt;
==Swapfiles on ZFS==&lt;br /&gt;
&lt;br /&gt;
zfs doesn't support swapfiles, however you can achieve a similar benefit using a zvol as a swap volume.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on how to accomplish this can be found in this [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device ZoL guide].&lt;br /&gt;
=Automated Swap Management with systemd-swap=&lt;br /&gt;
{{note|Using systemd-swap with on btrfs/zfs or with hibernation support requires special handling beyond the scope of this article}}&lt;br /&gt;
&lt;br /&gt;
It is possible to automatically manage the size of your swapfile using {{ic|systemd-swap}}.  It can create swap files dynamically based on memory needs.  It is also an easy way to enable/manage [[#Using_zswap_with_systemd-swap|zswap]]&lt;br /&gt;
&lt;br /&gt;
==Installing and Configuring systemd-swap==&lt;br /&gt;
&lt;br /&gt;
First, install and enable {{ic|systemd-swap}}:&lt;br /&gt;
 pamac install systemd-swap&lt;br /&gt;
 sudo systemctl enable systemd-swap.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next enable dynamic swap management by creating a file {{ic|/etc/systemd/swap.conf.d/myswap.conf}} with the following parameters:&lt;br /&gt;
 zswap_enabled=0&lt;br /&gt;
 zram_enabled=0&lt;br /&gt;
 swapfc_enabled=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would prefer a single command to create this file you could use:&lt;br /&gt;
 sudo bash -c 'echo -e &amp;quot;zswap_enabled=0\nzram_enabled=0\nswapfc_enabled=1&amp;quot; &amp;gt; /etc/systemd/swap.conf.d/myswap.conf'&lt;br /&gt;
&lt;br /&gt;
==Remove Other Swap==&lt;br /&gt;
&lt;br /&gt;
In order for systemd-swap to be effective you need to remove any traditional swap devices you have.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To display your current swap devices you can use the command {{ic|swapon}}.  For example, my test machine displays the following:&lt;br /&gt;
 swapon&lt;br /&gt;
 NAME      TYPE      SIZE USED PRIO&lt;br /&gt;
 /swapfile file        4G   0B   -2&lt;br /&gt;
 /dev/sda3 partition 8.4G   0B   -3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example there are two swap devices.  A swapfile and a swap partition.  To turn them off we can use the command {{ic|swapoff}}.&lt;br /&gt;
 sudo swapoff /swapfile&lt;br /&gt;
 sudo swapoff /dev/sda3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we need to remove them.  &lt;br /&gt;
The swap partition will need to be deleted using your favorite partitioning tool.  You can remove the swapfile by simply deleting it.&lt;br /&gt;
 sudo rm /swapfile&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need to also remove any lines related to swap from {{ic|/etc/fstab}}.  Edit the file with an [[Special:MyLanguage/Viewing_and_editing_configuration_files|appropriate text editor]] and remove or comment out the lines for the swap space.  In the example above, we would remove these lines:&lt;br /&gt;
 UUID=c2430cf1-8ea9-4422-a5c5-5a38779194c3 swap           swap    defaults,noatime 0 2&lt;br /&gt;
 /swapfile none swap defaults 0 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next reboot.  After the reboot, when running {{ic|swapon}} you should see something similiar to the following:&lt;br /&gt;
 NAME                           TYPE SIZE USED PRIO&lt;br /&gt;
 /var/lib/systemd-swap/swapfc/1 file 512M   0B   -2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
systemd-swap will add and remove swapfiles as your memory usage dictates.&lt;br /&gt;
&lt;br /&gt;
{{note|If you don't delete your existing swap partition it will be automatically activated by systemd even though you have removed it from fstab}}&lt;br /&gt;
&lt;br /&gt;
==Using zswap with systemd-swap==&lt;br /&gt;
&lt;br /&gt;
zswap is compressed swap kept in RAM. zswap keeps the most frequently used pages in RAM and writes less frequently used pages to the swap space on disk.  In many workloads, this will result in increased swap performance and less wear and tear on SSDs.&lt;br /&gt;
&lt;br /&gt;
To enable zswap with systemd-swap, simply alter the instructions above and set Linux Kernel parameter {{ic|zswap_enabled=1}}&lt;br /&gt;
=Tuning &amp;amp; Performance Considerations=&lt;br /&gt;
&lt;br /&gt;
Although swap seems like a great way to expand memory, excessive swap use will cause severe performance degradation, as mentioned before.&lt;br /&gt;
&lt;br /&gt;
There are couple of parameters that can be used to tune swap utilization.  These are swappiness and vfs_cache_pressure.  To see your current settings for these you can use the following commands:&lt;br /&gt;
 cat /proc/sys/vm/swappiness&lt;br /&gt;
 cat /proc/sys/vm/vfs_cache_pressure&lt;br /&gt;
&lt;br /&gt;
{{ic|swappiness}} controls how likely a page is to be transferred to swap.  This value represents the percentage of the free memory before activating swap. The lower the value, the less swapping is used and the more memory pages are kept in physical memory where:&lt;br /&gt;
* 0 disables swap&lt;br /&gt;
* 60 is the default value which is ideal for a server running a lot of services&lt;br /&gt;
* 100 is very aggressive swapping.&lt;br /&gt;
&lt;br /&gt;
For ''most'' computers the recommended value is 10: Theoretically, this means to only start swapping when RAM usage reaches around 90 percent.&lt;br /&gt;
&lt;br /&gt;
{{ic|vfs_cache_pressure}} is a percentage value that controls the tendency of the kernel to ''reclaim'' the memory which is used for caching of directory and inode objects.  The default value is 100.  Increasing this value will increase the rate in which these objects are removed from the RAM cache.  Decreasing it will allow these objects to be cached in memory longer, consuming additional RAM over time.  Depending on your specific workload, increasing or decreasing this value too far can have significant negative impacts on system performance.  Experimentation is needed to find the appropriate balance and the default value is reasonable.  In general, it is more common to optimize swappiness before experimenting with vfs_cache_pressure.&lt;br /&gt;
&lt;br /&gt;
To set these values you can use the command {{ic|sysctl}}.  For example, to set the swappiness value to 10 you could use:&lt;br /&gt;
 sudo sysctl vm.swappiness=10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''There is no preset defined answer on the optimal values for these parameters.'''  Experimentation is needed to find the optimum configuration for your specific hardware and workload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Swap swap]&lt;br /&gt;
* The Arch Wiki page on [https://wiki.archlinux.org/index.php/Zswap zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/vm/zswap.txt zswap]&lt;br /&gt;
* The Linux kernel documentation on [https://www.kernel.org/doc/Documentation/sysctl/vm.txt swappiness and vfs_cache_pressure]&lt;br /&gt;
* The openSUSE guide to [https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.memory.html tuning memory]&lt;br /&gt;
* The [https://github.com/Nefelim4ag/systemd-swap systemd-swap page]&lt;br /&gt;
* The ZFS on Linux guide on [https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device Swap Volumes]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Contents Page]]&lt;/div&gt;</summary>
		<author><name>Megavolt</name></author>
	</entry>
</feed>