<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Optmierungen Archives - yourdevice.ch - Deine Anlaufstelle für Linux, OpenSource Software und Co</title>
	<atom:link href="https://yourdevice.ch/tag/optmierungen/feed/" rel="self" type="application/rss+xml" />
	<link>https://yourdevice.ch/tag/optmierungen/</link>
	<description></description>
	<lastBuildDate>Sun, 08 Feb 2026 10:16:16 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.5</generator>

<image>
	<url>https://yourdevice.ch/wp-content/uploads/2022/11/cropped-ydlogo-e1667602958877-32x32.png</url>
	<title>Optmierungen Archives - yourdevice.ch - Deine Anlaufstelle für Linux, OpenSource Software und Co</title>
	<link>https://yourdevice.ch/tag/optmierungen/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Mehr Leistung bei wenig RAM: Swap &#038; zRAM unter Linux</title>
		<link>https://yourdevice.ch/mehr-leistung-bei-wenig-ram-swap-zram-unter-linux/</link>
					<comments>https://yourdevice.ch/mehr-leistung-bei-wenig-ram-swap-zram-unter-linux/#respond</comments>
		
		<dc:creator><![CDATA[Mario]]></dc:creator>
		<pubDate>Wed, 11 Feb 2026 08:00:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Anleitungen]]></category>
		<category><![CDATA[Optmierungen]]></category>
		<guid isPermaLink="false">https://yourdevice.ch/?p=19946</guid>

					<description><![CDATA[<p>Linux-Nutzer auf älteren Geräten kennen eventuell das Problem: Der Rechner hat wenig Arbeitsspeicher (z. B. 4–8 GB), mehrere Programme laufen parallel, vielleicht sogar eine oder mehrere virtuelle Maschinen – und plötzlich wird...</p>
<p>The post <a href="https://yourdevice.ch/mehr-leistung-bei-wenig-ram-swap-zram-unter-linux/">Mehr Leistung bei wenig RAM: Swap &#038; zRAM unter Linux</a> appeared first on <a href="https://yourdevice.ch">yourdevice.ch - Deine Anlaufstelle für Linux, OpenSource Software und Co</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Linux-Nutzer auf älteren Geräten kennen eventuell das Problem: Der Rechner hat wenig Arbeitsspeicher (z. B. 4–8 GB), mehrere Programme laufen parallel, vielleicht sogar eine oder mehrere virtuelle Maschinen – und plötzlich wird alles träge. Fenster reagieren verzögert, der Browser friert ein oder das System wirkt instabil. Später nach unmengen Ruckler meldet sich je nach Distribution, dass der <a href="https://de.wikipedia.org/wiki/Linux_(Kernel)">Linux Kernel</a> diverse Programme beenden musste, da der <a href="https://yourdevice.ch/linux-mit-hoher-ram-auslastung-normal/" type="post" id="11936">Arbeitsspeicher</a> ausgegangen ist.</p>



<p class="wp-block-paragraph">Die gute Nachricht: <strong>Linux bietet mit Swap und zRAM sehr effektive Werkzeuge</strong>, um genau solche Situationen deutlich zu entschärfen. Richtig eingerichtet sorgen sie dafür, dass das System stabil bleibt, weniger einfriert und sich insgesamt flüssiger anfühlt – selbst bei knappen RAM-Ressourcen.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img fetchpriority="high" decoding="async" width="1024" height="683" src="https://yourdevice.ch/wp-content/uploads/2026/02/swap_zram_title-1024x683.png" alt="" class="wp-image-19949" srcset="https://yourdevice.ch/wp-content/uploads/2026/02/swap_zram_title-1024x683.png 1024w, https://yourdevice.ch/wp-content/uploads/2026/02/swap_zram_title-300x200.png 300w, https://yourdevice.ch/wp-content/uploads/2026/02/swap_zram_title-768x512.png 768w, https://yourdevice.ch/wp-content/uploads/2026/02/swap_zram_title-500x333.png 500w, https://yourdevice.ch/wp-content/uploads/2026/02/swap_zram_title.png 1536w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p class="wp-block-paragraph"><strong>Dieses Tutorial erklärt:</strong></p>



<ul class="wp-block-list">
<li>was Swap und zRAM sind</li>



<li>worin der Unterschied liegt</li>



<li>warum die Kombination sinnvoll ist</li>



<li>wie man beides korrekt einrichtet</li>



<li>wie man überprüft, ob alles richtig funktioniert</li>
</ul>



<p class="wp-block-paragraph">Das Ganze ist bewusst <strong>einsteigerfreundlich</strong>, aber technisch korrekt gehalten.</p>





<h2 class="wp-block-heading">Was ist Swap</h2>



<p class="wp-block-paragraph"><strong>Swap</strong> ist Auslagerungsspeicher. Wenn der physische Arbeitsspeicher (RAM) knapp wird, kann Linux Speicherbereiche auf ein langsameres Medium auslagern – meist eine SSD oder HDD.</p>



<h3 class="wp-block-heading">Vorteile von Swap</h3>



<ul class="wp-block-list">
<li>verhindert Abstürze durch Speichermangel (OOM-Killer)</li>



<li>sorgt dafür, dass das System weiterläuft</li>



<li>ideal als Sicherheitsnetz</li>
</ul>



<h3 class="wp-block-heading">Nachteile von Swap</h3>



<ul class="wp-block-list">
<li>deutlich langsamer als RAM</li>



<li>kann bei starker Nutzung zu Rucklern führen</li>
</ul>



<p class="wp-block-paragraph">Swap ist wichtig, aber <strong>allein nicht optimal für Performance</strong>.</p>



<h2 class="wp-block-heading">Was ist zRAM</h2>



<p class="wp-block-paragraph"><strong>zRAM</strong> ist komprimierter Arbeitsspeicher.</p>



<p class="wp-block-paragraph">Dabei wird ein Teil des RAMs als komprimiertes Blockgerät genutzt. Daten werden also <strong>nicht auf die Festplatte</strong>, sondern <strong>komprimiert im RAM selbst</strong> abgelegt.</p>



<h3 class="wp-block-heading">Vorteile von zRAM</h3>



<ul class="wp-block-list">
<li>extrem schnell (bleibt im RAM)</li>



<li>sehr gut komprimierbar (oft 1.5–2.5×)</li>



<li>ideal für inaktive Speicherbereiche</li>



<li>reduziert SSD-Swap massiv</li>
</ul>



<h3 class="wp-block-heading">Nachteile von zRAM</h3>



<ul class="wp-block-list">
<li>benötigt etwas CPU-Leistung</li>



<li>kann keinen echten RAM ersetzen</li>
</ul>



<p class="wp-block-paragraph">zRAM ist <strong>kein Ersatz für RAM</strong>, aber ein sehr effizienter Puffer.</p>



<h2 class="wp-block-heading">Warum Swap UND zRAM kombinieren</h2>



<p class="wp-block-paragraph">Die beste Lösung ist eine <strong>zweistufige Speicherstrategie</strong>:</p>



<ol class="wp-block-list">
<li><strong>zRAM</strong> als schneller, komprimierter Zwischenspeicher</li>



<li><strong>klassischer Swap</strong> als Notfallreserve</li>
</ol>



<p class="wp-block-paragraph">Linux nutzt automatisch zuerst den Swap mit der <strong>höheren Priorität</strong> – also zRAM – und greift nur im Ernstfall auf die SSD zurück.</p>



<p class="wp-block-paragraph"><strong>Ergebnis:</strong></p>



<ul class="wp-block-list">
<li>weniger Freezes</li>



<li>stabileres Multitasking</li>



<li>deutlich bessere Reaktionsfähigkeit</li>
</ul>



<h2 class="wp-block-heading">Schritt 1: Vorhandenen Swap prüfen</h2>



<pre class="wp-block-code"><code>swapon --show</code></pre>



<p class="wp-block-paragraph">oder:</p>



<pre class="wp-block-code"><code>free -h</code></pre>



<p class="wp-block-paragraph">Wenn kein Swap vorhanden ist oder ihr neu starten wollt, geht es weiter mit Schritt 2. Solltet ihr bereits eine Swap Partition haben, überspringt Schritt 2, und macht weiter mit Schritt 3.</p>



<h2 class="wp-block-heading">Schritt 2: Swapfile anlegen (Beispiel: 4 GB)</h2>



<p class="wp-block-paragraph">Gebt diese Befehle einzeln in die Konsole ein:</p>



<pre class="wp-block-code"><code>sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile</code></pre>



<p class="wp-block-paragraph">Danach dauerhaft aktivieren in der <strong>fstab</strong> Datei:</p>



<pre class="wp-block-code"><code>sudo nano /etc/fstab</code></pre>



<p class="wp-block-paragraph">Eintrag hinzufügen:</p>



<pre class="wp-block-code"><code>/swapfile none swap sw 0 0</code></pre>



<p class="wp-block-paragraph">Speichern mit <strong>strg+o</strong> und beenden mit <strong>strg-x</strong></p>



<h2 class="wp-block-heading">Schritt 3: zRAM installieren</h2>



<p class="wp-block-paragraph">Unter Ubuntu, KDE Neon und ähnlichen Debian Systemen:</p>



<pre class="wp-block-code"><code>sudo apt install zram-tools</code></pre>



<p class="wp-block-paragraph">Konfiguration öffnen:</p>



<pre class="wp-block-code"><code>sudo nano /etc/default/zramswap</code></pre>



<p class="wp-block-paragraph">Empfohlene Grundeinstellung am Ende der Datei setzen:</p>



<pre class="wp-block-code"><code>ENABLED=true
PERCENT=40
PRIORITY=100</code></pre>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img decoding="async" width="1024" height="728" src="https://yourdevice.ch/wp-content/uploads/2026/02/linux_zram_settings-1024x728.png" alt="" class="wp-image-19950" style="width:750px" srcset="https://yourdevice.ch/wp-content/uploads/2026/02/linux_zram_settings-1024x728.png 1024w, https://yourdevice.ch/wp-content/uploads/2026/02/linux_zram_settings-300x213.png 300w, https://yourdevice.ch/wp-content/uploads/2026/02/linux_zram_settings-768x546.png 768w, https://yourdevice.ch/wp-content/uploads/2026/02/linux_zram_settings-1536x1092.png 1536w, https://yourdevice.ch/wp-content/uploads/2026/02/linux_zram_settings-500x355.png 500w, https://yourdevice.ch/wp-content/uploads/2026/02/linux_zram_settings.png 1604w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<h3 class="wp-block-heading">Erklärung:</h3>



<ul class="wp-block-list">
<li><strong>PERCENT=40</strong> → 40 % des RAMs als zRAM</li>



<li><strong>PRIORITY=100</strong> → zRAM wird vor dem Swap genutzt</li>
</ul>



<p class="wp-block-paragraph">Dienst neu starten:</p>



<pre class="wp-block-code"><code>sudo systemctl restart zramswap</code></pre>



<h2 class="wp-block-heading">Schritt 4: Swappiness sinnvoll setzen</h2>



<p class="wp-block-paragraph">Swappiness steuert, wie früh Linux Swap nutzt, sollte der Arbeitspeicher eine bestimmte Auslastung erreichen.</p>



<p class="wp-block-paragraph">Empfehlung für Desktop + wenig RAM:</p>



<pre class="wp-block-code"><code>sudo sysctl vm.swappiness=80</code></pre>



<p class="wp-block-paragraph">Dauerhaft:</p>



<pre class="wp-block-code"><code>sudo nano /etc/sysctl.conf</code></pre>



<p class="wp-block-paragraph">Eintrag:</p>



<pre class="wp-block-code"><code>vm.swappiness=80</code></pre>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img decoding="async" width="1024" height="728" src="https://yourdevice.ch/wp-content/uploads/2026/02/linux_swappiness_setzen-1024x728.png" alt="" class="wp-image-19947" style="width:750px" srcset="https://yourdevice.ch/wp-content/uploads/2026/02/linux_swappiness_setzen-1024x728.png 1024w, https://yourdevice.ch/wp-content/uploads/2026/02/linux_swappiness_setzen-300x213.png 300w, https://yourdevice.ch/wp-content/uploads/2026/02/linux_swappiness_setzen-768x546.png 768w, https://yourdevice.ch/wp-content/uploads/2026/02/linux_swappiness_setzen-1536x1092.png 1536w, https://yourdevice.ch/wp-content/uploads/2026/02/linux_swappiness_setzen-500x355.png 500w, https://yourdevice.ch/wp-content/uploads/2026/02/linux_swappiness_setzen.png 1604w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p class="wp-block-paragraph">Danach die Einstellungen mit:</p>



<pre class="wp-block-code"><code>sudo sysctl -p</code></pre>



<p class="wp-block-paragraph">direkt aktivieren</p>



<h2 class="wp-block-heading">Schritt 5: Überprüfen, ob alles korrekt läuft</h2>



<h3 class="wp-block-heading">Swap-Status anzeigen</h3>



<pre class="wp-block-code"><code>swapon --show</code></pre>



<p class="wp-block-paragraph">Erwartetes Ergebnis:</p>



<ul class="wp-block-list">
<li>zRAM mit hoher Priorität</li>



<li>Swapfile mit niedriger Priorität</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="728" src="https://yourdevice.ch/wp-content/uploads/2026/02/linux_show_swapon-1024x728.png" alt="" class="wp-image-19948" style="width:750px" srcset="https://yourdevice.ch/wp-content/uploads/2026/02/linux_show_swapon-1024x728.png 1024w, https://yourdevice.ch/wp-content/uploads/2026/02/linux_show_swapon-300x213.png 300w, https://yourdevice.ch/wp-content/uploads/2026/02/linux_show_swapon-768x546.png 768w, https://yourdevice.ch/wp-content/uploads/2026/02/linux_show_swapon-1536x1092.png 1536w, https://yourdevice.ch/wp-content/uploads/2026/02/linux_show_swapon-500x355.png 500w, https://yourdevice.ch/wp-content/uploads/2026/02/linux_show_swapon.png 1604w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p class="wp-block-paragraph"><code>/dev/zram0</code></p>



<ul class="wp-block-list">
<li><strong>6 GB zRAM</strong> → passt zu <code>PERCENT=40</code></li>



<li><strong>PRIO 100</strong> → wird <strong>immer zuerst benutzt</strong></li>



<li><code>USED 0B</code> → aktuell genug RAM, kein Druck</li>
</ul>



<p class="wp-block-paragraph"><code>/swapfile</code></p>



<ul class="wp-block-list">
<li><strong>4 GB SSD-Swap</strong></li>



<li><strong>PRIO -2</strong> → klassischer Fallback</li>



<li>wird <strong>erst benutzt</strong>, wenn zRAM voll ist</li>
</ul>



<p class="wp-block-paragraph"><strong>Genau die richtige Reihenfolge</strong>, die Einstellungen sind korrekt gesetzt.</p>



<h3 class="wp-block-heading">Speicherverhalten beobachten</h3>



<pre class="wp-block-code"><code>free -h</code></pre>



<p class="wp-block-paragraph">oder live:</p>



<pre class="wp-block-code"><code>watch -n 1 swapon --show</code></pre>



<p class="wp-block-paragraph">Gesundes Verhalten:</p>



<ul class="wp-block-list">
<li>zRAM wird genutzt</li>



<li>SSD-Swap bleibt möglichst leer</li>



<li>System bleibt bedienbar</li>
</ul>



<h2 class="wp-block-heading">Typische Empfehlungen nach RAM-Größe</h2>



<h3 class="wp-block-heading">4–8 GB RAM</h3>



<ul class="wp-block-list">
<li>zRAM: 50 %</li>



<li>Swapfile: 2–4 GB</li>
</ul>



<h3 class="wp-block-heading">16 GB RAM</h3>



<ul class="wp-block-list">
<li>zRAM: 30–40 %</li>



<li>Swapfile: 4–8 GB</li>
</ul>



<h3 class="wp-block-heading">32 GB RAM</h3>



<ul class="wp-block-list">
<li>zRAM: optional</li>



<li>Swapfile: klein oder nur als Fallback</li>
</ul>



<h2 class="wp-block-heading">Fazit</h2>



<p class="wp-block-paragraph">Swap und zRAM sind <strong>keine Notlösungen</strong>, sondern bewusst entwickelte Werkzeuge im Linux-Kernel.</p>



<p class="wp-block-paragraph">Richtig kombiniert sorgen sie für:</p>



<ul class="wp-block-list">
<li>mehr Stabilität</li>



<li>weniger Einfrieren</li>



<li>bessere Alltagstauglichkeit</li>
</ul>



<p class="wp-block-paragraph">Gerade auf Systemen mit wenig RAM ist diese Konfiguration oft der <strong>größte Performance-Gewinn ohne neue Hardware</strong>.</p>



<p class="wp-block-paragraph">Wenn trotz zRAM und Swap dauerhaft alles ausgelastet ist, gilt trotzdem: Kein Tuning ersetzt fehlenden Arbeitsspeicher. Aber bis zu diesem Punkt holt diese Methode <strong>das Maximum aus eurem System heraus</strong>.</p>
<p>The post <a href="https://yourdevice.ch/mehr-leistung-bei-wenig-ram-swap-zram-unter-linux/">Mehr Leistung bei wenig RAM: Swap &#038; zRAM unter Linux</a> appeared first on <a href="https://yourdevice.ch">yourdevice.ch - Deine Anlaufstelle für Linux, OpenSource Software und Co</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://yourdevice.ch/mehr-leistung-bei-wenig-ram-swap-zram-unter-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
