Hallo Liste, ich hab in einem (älteren?) Einsteiger-Buch mal davon gelesen, dass mehr als 128 MB Swap auf einer Partition keinen Sinn machen, da Linux nicht mehr MB über dieser Grenze nutzt/verwalten kann. Wenn man dennoch mehr als die 128 MB Swap nutzen möchte, sollte man mehrere Swap-Partitionen anlegen. Ich habe bei meiner Installation (SuSE 7.1, komplett) einfach mal einen großen Swap-Bereich von 512 MB angegeben und überleg' jetzt, ob das nicht vielleicht für die Katz' war...andererseits konnte ich im SuSE-Handbuch aber nichts finden, das gegen Swap-Partitionen jenseits der 128 MB-Grenze spricht (sondern nur die Bemerkung, dass die alte Regel Swap=2*RAM inzwischen etwas in die Jahre gekommen ist...). Kann mir jemand sagen, ob die Angabe mit der 128 MB-Grenze stimmt? MfG, Christian
Christian Marker wrote:
Hallo Liste,
ich hab in einem (älteren?) Einsteiger-Buch mal davon gelesen, dass mehr als 128 MB Swap auf einer Partition keinen Sinn machen, da Linux nicht mehr MB über dieser Grenze nutzt/verwalten kann. Wenn man dennoch mehr als die 128 MB Swap nutzen möchte, sollte man mehrere Swap-Partitionen anlegen. Ich habe bei meiner Installation (SuSE 7.1, komplett) einfach mal einen großen Swap-Bereich von 512 MB angegeben und überleg' jetzt, ob das nicht vielleicht für die Katz' war...andererseits konnte ich im SuSE-Handbuch aber nichts finden, das gegen Swap-Partitionen jenseits der 128 MB-Grenze spricht (sondern nur die Bemerkung, dass die alte Regel Swap=2*RAM inzwischen etwas in die Jahre gekommen ist...).
Du mußt zwischen Swap-Datei und Swap-Partition unterscheiden. Die Swap-Datei ist nur eine entsprechend große Datei im ganz normalen Linux-Dateisystem (ähnlich wie bei Windows). Bei der Swap-Datei glaube ich gab es mal eine 128-MB-Grenze, kann ich aber nicht mit gewißheit sagen. Aber Swap-Dateien kommen kaum zu Anwendung. Bei Swap-Paritionen wird eine ganze Partition als Swap-Bereich eingerichtet. Hier gibt es theoretisch keine Grenzen. Ich selbst habe eine 256MB-Partition. Die habe ich noch nie gefüllt (gut ich habe auch 512MB RAM). Die Regel Swap=2xRAM ist aus meiner Sicht aufgehoben. SIe stammt aus einer Zeit wo sich der RAM-Speicher bei 4 bis 32 MB tummelte. Dennis
* Dennis Boller <d.boller@gmx.net> textete am 14.06.01:
Christian Marker wrote:
[Swap-Partiton max. 128MB]
Bei der Swap-Datei glaube ich gab es mal eine 128-MB-Grenze, kann ich aber nicht mit gewißheit sagen. Aber Swap-Dateien kommen kaum zu Anwendung.
Bei älteren Kernelversionen (IIRC bis einschließlich 2.0.*) gab es diese Grenze. cu flo -- nach pinkelspielen, sado- und kannibalo- witzen nun auchnoch neco witze. die wahrheit ist in deja news. [Herlu in dau]
Hallo Liste,
ich hab in einem (älteren?) Einsteiger-Buch mal davon gelesen, dass mehr als 128 MB Swap auf einer Partition keinen Sinn machen, da Linux nicht mehr MB über dieser Grenze nutzt/verwalten kann. Wenn man dennoch mehr als die 128 MB Swap nutzen möchte, sollte man mehrere Swap-Partitionen anlegen. Ich habe bei meiner Installation (SuSE 7.1, komplett) einfach mal einen großen Swap-Bereich von 512 MB angegeben und überleg' jetzt, ob das nicht vielleicht für die Katz' war...andererseits konnte ich im SuSE-Handbuch aber nichts finden, das gegen Swap-Partitionen jenseits der 128 MB-Grenze spricht (sondern nur die Bemerkung, dass die alte Regel Swap=2*RAM inzwischen etwas in die Jahre gekommen ist...).
Kann mir jemand sagen, ob die Angabe mit der 128 MB-Grenze stimmt?
Nein, der aktuelle Kernel kann größere Swap-Partitionen verwalten. Zur Größe: die 2xRAM Regel ist wirklich etwas veraltet. Ich würde folgendes vorschlagen: <=128MB Swap=2xRAM
128MB Swap=RAM
hängt natürlich sehr von dem ab was Du machst. Ich habe zur Zeit 320MB RAM und 256MB Swap. Der Swap wurde bisher aber bestenfalls angekratzt. Verwende doch z.B. mal XOSview, der zeigt dir auch die Benutzung des swap ständig an, dann kannst Du nach einiger Zeit die Swap-Partition anpassen. Gruß Christian
Christian Herzyk wrote:
Zur Größe: die 2xRAM Regel ist wirklich etwas veraltet. Ich würde folgendes vorschlagen: <=128MB Swap=2xRAM
128MB Swap=RAM
hängt natürlich sehr von dem ab was Du machst. Ich habe zur Zeit 320MB RAM und 256MB Swap. Der Swap wurde bisher aber bestenfalls angekratzt. Verwende doch z.B. mal XOSview, der zeigt dir auch die Benutzung des swap ständig an, dann kannst Du nach einiger Zeit die Swap-Partition anpassen.
Da muss ich mich mal einmischen. Also, ich habe 256 MB RAM und nach der "alten" Regel 2x, x=RAM in MB habe ich also 512 MB Swap. Für manche Aufgaben reicht es *nicht*. z.B.: rene@ReneEngelhard:~> html2ps -Wb Grokking_the_Gimp.html Reading Grokking_the_Gimp.html [...] Getötet da läuft bei (mit Nachverfolgung mit xosview) mir der Speicher und das Swap voll und der Kernel killt die am meisten aktivsten Prozesse (dass sind in den Fall perl und gs die die Konvertierung machen) und dann is nix mehr.... Zu sehen an folgendem Eintrag in die /var/log/messages (eine zeile) Sep 14 14:26:24 ReneEngelhard kernel: Out of memory: Killed process 1037 (perl) Ich glaube, ich muss den Swap mal höher schrauben.. (mal sehen wieviel, erstmal versuche ich 3x, x=RAM in MB) Rene P.S.: Ja, ich will das umwandeln, da eine Papierform einfach bequemer ist. Genau das gleiche Problem habe ich bei der Java-APi, KDE-API etc. P.S.S.: Ja, ich weiss das das ein sch.... Hostname ist, aber dann habe ich 1) keine Probleme mit der Msg-Id mehr, die habe ich aber ja schon nicht mehr 2) brauche ich das für meinen Anschluß an das HRZ-Netz so.....
Rene Engelhard wrote:
Christian Herzyk wrote:
Zur Größe: die 2xRAM Regel ist wirklich etwas veraltet. Ich würde folgendes vorschlagen: <=128MB Swap=2xRAM
128MB Swap=RAM
[...snip...] da läuft bei (mit Nachverfolgung mit xosview) mir der Speicher und das Swap voll und der Kernel killt die am meisten aktivsten Prozesse (dass sind in den Fall perl und gs die die Konvertierung machen) und dann is nix mehr....
Zu sehen an folgendem Eintrag in die /var/log/messages (eine zeile)
Sep 14 14:26:24 ReneEngelhard kernel: Out of memory: Killed process 1037 (perl)
Ich glaube, ich muss den Swap mal höher schrauben.. (mal sehen wieviel, erstmal versuche ich 3x, x=RAM in MB)
Swap hin Swap her. Bei den heutigen Speicherpreisen gibt es wohl kaum noch ein Argument gegen viel RAM auf dem Board. In HL bekommt man mancherorts 768 MB (3x256MB) für gerade mal 225 DM. Ich habe erst letzte Woche auf 512 MB aufgerüstet. Am Montag werden weitere 256 MB folgen. Mein Swap ist unverändert bei 256 MB und wird dort bleiben. Die Regel 3xRAM bzw. 1xRAM für >128MB ignoriere ich mal ganz frech. Ich sehe ehrlich gesagt keinen Sinn in 768 MB Swap. Allerdings bin ich sowieso einer derjenigen, die lieber eine Anwendung x-mal schließen und neu starten, anstatt sie im Hintergrund laufen zu lassen. Und auch Ressourcen fressende Prozesse kommen bei auch nur selten vor. Den Kommentar "Out of memory: Killed process ..." kenne ich aber. Dennis
Rene Engelhard wrote:
Christian Herzyk wrote:
Zur Größe: die 2xRAM Regel ist wirklich etwas veraltet. Ich würde folgendes vorschlagen: <=128MB Swap=2xRAM
128MB Swap=RAM
hängt natürlich sehr von dem ab was Du machst. Ich habe zur Zeit 320MB RAM und 256MB Swap. Der Swap wurde bisher aber bestenfalls angekratzt. Verwende doch z.B. mal XOSview, der zeigt dir auch die Benutzung des swap ständig an, dann kannst Du nach einiger Zeit die Swap-Partition anpassen.
Da muss ich mich mal einmischen. Also, ich habe 256 MB RAM und nach der "alten" Regel 2x, x=RAM in MB habe ich also 512 MB Swap. Für manche Aufgaben reicht es *nicht*.
[Beispiel]
Das hat doch Christian geschrieben. Ich zitiere nochmal: "Es hängt natürlich sehr von dem ab was Du machst." Wenn man nicht gerade Bildbearbeitung, html2ps auf riesige Dateien *g* o.ae. Sachen macht, dann reicht i.d.R. bei 256MB Speicher eine Swap-Partition von 256MB allemal aus. Wenn man ne grosse Swap-Partition braucht, weil dauernd (und viel) geswappt wird, dann sollte man IMHO mal besser ueber das Aufruesten des Hauptspeichers nachdenken. OK, bei heutigen Festplatten, die alle in Groessen von 30GB und mehr daherkommen (zumindest IDE), spielt es auch keine sehr grosse Rolle mehr, ob ich 200MB oder 500MB Swap-Partitionen anlege, das kann man sicher eruebrigen. Wenn mir meine zunaechst kleine Swap-Partition mal nicht mehr ausreichen sollte, dann kann ich ja immer noch 'ne zweite an- legen. Wenn aber haeufig geswappt wird, dann tut man sich selbst mit mehr Hauptspeicher einen groesseren Gefallen.... Gruesse, Thomson -- Thomas Hertweck, Geophysicist Geophysical Institute, Karlsruhe University (TH) Hertzstr. 16, D-76187 Karlsruhe, Germany
Thomas Hertweck wrote:
Rene Engelhard wrote:
Christian Herzyk wrote:
Zur Größe: die 2xRAM Regel ist wirklich etwas veraltet. Ich würde folgendes vorschlagen: <=128MB Swap=2xRAM
128MB Swap=RAM
hängt natürlich sehr von dem ab was Du machst. Ich habe zur Zeit 320MB RAM und 256MB Swap. Der Swap wurde bisher aber bestenfalls angekratzt. Verwende doch z.B. mal XOSview, der zeigt dir auch die Benutzung des swap ständig an, dann kannst Du nach einiger Zeit die Swap-Partition anpassen.
Da muss ich mich mal einmischen. Also, ich habe 256 MB RAM und nach der "alten" Regel 2x, x=RAM in MB habe ich also 512 MB Swap. Für manche Aufgaben reicht es *nicht*.
[Beispiel]
Das hat doch Christian geschrieben. Ich zitiere nochmal: "Es hängt natürlich sehr von dem ab was Du machst."
Shit. Überlesen. *schäm*
Wenn man nicht gerade Bildbearbeitung, html2ps auf riesige Dateien *g* o.ae. Sachen macht, dann reicht i.d.R. bei 256MB Speicher eine Swap-Partition von 256MB allemal aus. Wenn man ne grosse Swap-Partition braucht, weil dauernd (und viel) geswappt wird, dann sollte man IMHO mal besser ueber das Aufruesten des Hauptspeichers nachdenken.
Geht bei mir leider nicht. 256 MB ist Max. :-(
OK, bei heutigen Festplatten, die alle in Groessen von 30GB und mehr daherkommen (zumindest IDE), spielt es auch keine sehr grosse Rolle mehr, ob ich 200MB oder 500MB Swap-Partitionen anlege, das kann man sicher eruebrigen.
Ich hab nur 'ne 20 GB Platte. Und Platten sind bei mir leider nicht so günstig (Laptop)
Wenn mir meine zunaechst kleine Swap-Partition mal nicht mehr ausreichen sollte, dann kann ich ja immer noch 'ne zweite an- legen. Wenn aber haeufig geswappt wird, dann tut man sich selbst mit mehr Hauptspeicher einen groesseren Gefallen....
s.o. PatitionMagic vergrößert gerade auf 768 (3x , x=256 MB RAM) Mal schauen, ob ich für dieses und die div. API's mehr brauche... Rene
* Rene Engelhard <mail@rene-engelhard.de> textete am 14.09.01:
Thomas Hertweck wrote:
Wenn mir meine zunaechst kleine Swap-Partition mal nicht mehr ausreichen sollte, dann kann ich ja immer noch 'ne zweite an- legen. Wenn aber haeufig geswappt wird, dann tut man sich selbst mit mehr Hauptspeicher einen groesseren Gefallen....
s.o. PatitionMagic vergrößert gerade auf 768 (3x , x=256 MB RAM) Mal schauen, ob ich für dieses und die div. API's mehr brauche...
Mit Hauptspeicher war wohl der RAM gemeint. cu flo -- Mach mir das mal vor. Ich schlage vor du legst dich aufs gleis. Wenn ich dann im Fernsehen den Bericht gesehen habe werd ich mal kurz grübeln und dann lachen. [firetechnics in daa]
Christian Marker schrieb am Freitag den 14. September 2001:
ich hab in einem (älteren?) Einsteiger-Buch mal davon gelesen, dass mehr als 128 MB Swap auf einer Partition keinen Sinn machen, da Linux nicht mehr MB über dieser Grenze nutzt/verwalten kann. Wenn man dennoch mehr als die 128 MB Swap nutzen möchte, sollte man mehrere Swap-Partitionen anlegen.
Kommt darauf an, welchen Kernel Du einsetzt. Aus dem Changelog für den 2.2er Kernel: Among other changes made in the development of Linux kernel 2.2, the 128 meg limit on IA32 swap partition sizes has been eliminated.
jenseits der 128 MB-Grenze spricht (sondern nur die Bemerkung, dass die alte Regel Swap=2*RAM inzwischen etwas in die Jahre gekommen ist...).
IMHO wird an der Swap-Verwaltung noch viel gebastelt. Ich habe hier einen 2.4.7er Kernel laufen und komme bei normaler Arbeit nicht über 9MB Swap. Testweise hatte ich mal einen 2.4.9 laufen und der erzeugte bei in etwa gleicher Arbeit einen Swap von 300MB. Sinnvoll ist natürlich, wenn entprechendes Swapping zu erwarten ist, die Swappartitions auf mehrere pysikalische Festplatten zu verteilen und die gleiche Swappriorität zu verpassen. Wie das Swapverhalten im Kernel weiter entwickelt wird, kann ich leider nicht sagen. Gruß Jens -- .. may the Tux be with you! #130250
participants (7)
-
Christian Herzyk
-
Christian Marker
-
Dennis Boller
-
Florian Gross
-
Jens Tautenhahn
-
Rene Engelhard
-
Thomas Hertweck