Am Donnerstag, 21. Februar 2008 schrieb David Haller:
Hallo,
Am Don, 21 Feb 2008, gooly@gmx.at schrieb: [..]
Daher habe ich - nachdem ich das File erzeugt habe - in boot.local folgendes 'reingeschrieben: test -s /pfad/swap.file && swapon -v -p 111 /pfad/swap.file
Danach schaut 'mein cat' dann so aus: #> cat /proc/swaps Filename Type Size Used Priority /dev/hda1 partition 1052216 0 42 /pfad/swap.file file 1052216 0 111
rufe ich jetzt top auf sehe ich dort die Summe beider also 2104432. Wird _jetzt_, nach meinem swapon in boot.local, bereits die 111 vor der 42 bevorzugt
Du hast die Prioritäten genau falschrum vergeben. So wird das swapfile bevorzugt.
Dann ist's das was ich will. Die Partition ist eine (langsame, kleine) FlashCard, das Swapfile auf einer (wechsel-)hd kann größer sein. Swap ist aber eh meistens auf 0 (keine Graphik, KDE, ..)
=== man 2 swapon === [..] Higher numbers mean higher priority.
Swap pages are allocated from areas in priority order, highest priority first. For areas with different priori ties, a higher-priority area is exhausted before using a lower-priority area. If two or more areas have the same priority, and it is the highest priority available, pages are allocated on a round-robin basis between them.
===
Negative Zahlen werden dabei AFAIK per "Überlauf" auf die höchsten Prioritäten umgebogen, d.h. -1 = 32767, -2 = 32766 usw.
aha!
oder muss ich das 'Swap-Prgogramm' (welches) auch noch restarten?
Nein. swapon reicht.
gut!
Anders gefragt, genügt meine Zeile, dass sich das swap.file vor die Partition schiebt oder nicht?
Ja, allerdings ist die Partition schneller, sollte also bevorzugt werden.
Ich weiss. Aber meine Partition ist aber keine 'normale'
Nimm für's swapfile z.B. '-p 10'.
Du kannst das swapfile auch in der fstab fest eintragen.
Dann gibt's Probleme, wenn die Platte mit dem swap.file mal nicht da ist.
Dank und lg, calli