Joerg Thuemmler wrote:
was genau ist der Swapper??
kswapd im wesentlichen.
Ich weiß, der Swapper ist für das Ein/Auslagern von Prozessen verantwortlich, aber ich benötige detailierter Informationen darüber.
Ein/Auslagern von Speicherseiten im Allgemeinen. Es kann z.B. auch shared memory sein.
IMHO wird auf die sogenannt "SWAP-Partition" ausgelagert!? Ist das korrekt? (Denke, sonst würde sie nicht so heißen)
Es kann auch eine Datei sein. Und unter Unix ist, wie man weiß, so ziemlich alles eine Datei. Ergo können alle möglichen Geräte zum Swappen verwendet werden. Mit etwas Bastelei kann man auch über Netz swappen.
Vorteile? Du kannst Programmen mehr virtuellen Speicher gaben, als du physikalischen Speicher hast.
Im allgemeinen ist es sinnvoll, Daten auszulagern, die sehr lange nicht mehr benutzt wurden. Es gibt verschiedene Algorithmen, die versuchen, diesen Vorgang zu optimieren.
Nachteile? Ja nach Aulagerungsmedium kann swappen seeehr lange dauern :-)
Swapspace ist kein Ersatz für RAM. Swappen dauert um den Faktor länger, den das Spawmedium langsamer ist als Dein RAM. Wenn die Maschine ständig Speicherseiten auslagern muß, kommt dies einem Stillstand gleich.
Ist "swapping" ein Grund dafür, daß ein Multitasking System möglich macht?
Nein. Du kannst das Swapverhalten übrigens über einige Dateien unter /proc/sys/vm/ einstellen. Insbesondere freepages ist interessant, wenn Du das System ständig am Limit fährst, aber doch häufiger mal kurzfristig einigen freien Speicher brauchst. Damit das System dann nicht erst zu Swappen beginnt, kannst Du hier die Zahl der freien Speicherseiten erhöhen, die durch "sanftes Swapping" freigeräumt werden. Das bringt natürlich nichts, wenn die Prozesse permanent mehr Speicher verlangen als verfügbar ist. Aber doch einiges, wenn viele Prozesse (wie auf Desktops üblich) über längere Zeit "schlafen". - Matthias