Hi..
I have search how to optimize and configure Swap file into another partition on Jaguar.
The steps are in french (for this moment and the next thread will be in US)
. How to delocalize and Configuring your Swap under OS X Jaguar (server+Client)
.How to configure your partition size for optimizing your sytem
French steps :
••• Pour delocaliser sa swap sous Jaguar, rien de plus simple •••
Creer une partition de disque dediée entierement a votre Swap. Il est preferable de creer cette partition sur une autre disque , si vous le pouvez, de preference plus rapide que votre Master. Nommer votre partition comme vous le souhaiter
Determiner Votre besoin en Swap. A cet egard, une formule me parait satisfaisante : (Ram-256)*0.25+512 soit concretement par l'exemple :
Si j'ai 384 mo de ram == (384-256)*1.25+512=672mo br>
Ceci etant, apres avoir determiner la taille* de votre Swap et apres avoir creer une partition a cet effet, voyons du coté terminal.
• Ouvrez votre terminal
• Lister vos disques et leurs chemins d'acces via la fonction 'df ' en tapant df -k
• Le listing de vos disques apparait. Retrouver le chemin de votre partition montée et dediée a votre Swap du style /Volumes/ nom de la partition [ Pour ma part c'est /Volumes/Swap ]
• Ensuite ouvrez un nouveau shell cmd+n puis loguer vous en root su
• Une fois logguer en root editer le fichier "rc" via la commande pico /etc/rc
• Chercher la ligne update en faisant 9 fois crtl+v qui se situe juste avant
##
# Start the virtual memory system.
##
ConsoleMessage "Starting virtual memory"
#swapdir=/private/var/vm swapdir=/Volumes/Swap/vm (cf : richard wourms)
• Une fois localiser placer vous juste en dessous de update et passer une ligne en appuyant sur entree.
• Copier et coller ces lignes juste apres update en laissant toujours une ligne d'espace entre update pour le debut et ## # Start the virtual memory system.
##
# Mount any remaining filesystems
##
if [ ! -f /var/db/volinfo.database ]; then Uninitialized_VSDB=-YES-; fi
if [ "${AUTODISKMOUNT:=-YES-}" != "-NO-" ]; then
ConsoleMessage "Mounting media"
case ${AUTODISKMOUNT} in
-REMOVABLE-)
autodiskmountflags="-a" ;; # Mount removeable media
*)
autodiskmountflags="" ;;
esac
autodiskmount -v ${autodiskmountflags}
fi
if [ "${Uninitialized_VSDB:=-NO-}" = "-YES-" ]; then vsdbutil -i; fi
• Votre fichier devrait alors ressembler a ceci :
update
##
# Mount any remaining filesystems
##
if [ ! -f /var/db/volinfo.database ]; then Uninitialized_VSDB=-YES-; fi
if [ "${AUTODISKMOUNT:=-YES-}" != "-NO-" ]; then
ConsoleMessage "Mounting media"
case ${AUTODISKMOUNT} in
-REMOVABLE-)
autodiskmountflags="-a" ;; # Mount removeable media
*)
autodiskmountflags="" ;;
esac
autodiskmount -v ${autodiskmountflags}
fi
if [ "${Uninitialized_VSDB:=-NO-}" = "-YES-" ]; then vsdbutil -i; fi
##
# Start the virtual memory system.
##
ConsoleMessage "Starting virtual memory"
#swapdir=/private/var/vm
• Ensuite passons au directories de la swap... la ligne nous interressant et celle ci "swapdir=/private/var/vm"
Rajouter une ligne en dessous de ce type swapdir=/Volumes/votre partition/vm et rajouter un # a la ligne superieur comme ceci :
#swapdir=/private/var/vm
swapdir=/Volumes/votre partition/vm
•Ensuite rendez vous a la ligne
dynamic_pager -H 40000000 -L 160000000 -S 80000000 -F ${swapdir}/swapfile
• rajouter une ligne un '#' devant et rajouter une ligne en dessous de ce type :
#dynamic_pager -H 40000000 -L 160000000 -S 80000000 -F ${swapdir}/swapfile
dynamic_pager -H 40000000 -L 160000000 -S 80000000 -F ${swapdir}/swapfile
Desormais affecté les valeurs en fonction de votre Swap : reprenons mon exemple : j'ai 384mo ram ma partition de swap fera 672 mo
Donc les elements a changer sont -H -L -S correspondant chacun mathematiquement -H /4 -L *2 et -S*1 donc 672mo fera 672*1024^2
Exemple : 672(taille swap) *1024^2=704643072= -S ...... 704643072*2=1409286144= -L ..... 704643072/2=352321536= -H
Au final cela doit vous donner un peu pres cela :
#dynamic_pager -H 40000000 -L 160000000 -S 80000000 -F ${swapdir}/swapfile
dynamic_pager -H 352321536 -L 1409286144 -S 704643072 -F ${swapdir}/swapfile
Ne vous reste plus qu'a rebooter... et le tour est jouer..
Nota important : Verifier bien la taille de votre partition creee ... Si vous rentrez des valeurs > a votre Partition , votre mac ne risque de ne pas booter et apres redemarrage ed conserver son fichier original car il ne peut creer le fichier swap sur la partition. Il vaut mieux creer une partition legerement > a la taille de votre swap desirée.
* Sirilus (cf forum macbooster) me faisait remarquer, a juste titre, que si votre ram est > ou = a 512mo environ, il ne serrait pas pas necessaire voir dangereux pour la stabilité de votre OS de modifier la taille du swap. Donc si vous avez plus de 512 mo de ram laisser les valeurs de swap d'origine (80mo). Cependant, rien ne vous empeche, bien au contraire si vous le pouvez, de la delocaliser vers une autre partition.
Sous jaguar, je n'ai eu aucun souci de Swap, de Kernel panique, ou autre problemes recensés ou non. Cependant, j'ai noté tout de meme des gains de performance legerement meilleur qu'avec ma swap d'origine. Pour tester votre Mac essayer ceci
www.bitcom.ch et telecharger le freeware Cocoa bench.
Il n'empeche que en ayant reparametré ma Swap, mes perfs sont > a un G4 733 (le meme que moi) avec 1go de ram physique.
.../... Si vous rencontrer des problemes , poster vos comments ici. Les risques liés a ce tutorial existe si de mauvaises manipulations sont faites. En root ne faites pas n'importe quoi.
Hoozone(frederic.Perin)
Nextly in US