Swap Optimizing examples (Example for Os X.2 jAGUAR-FreeBsd)


 
Thread Tools Search this Thread
Special Forums Hardware Filesystems, Disks and Memory Swap Optimizing examples (Example for Os X.2 jAGUAR-FreeBsd)
# 1  
Old 02-04-2003
Swap Optimizing examples (Example for Os X.2 jAGUAR-FreeBsd)

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
# 2  
Old 02-04-2003
If you are answer , question thanx to notify me

This search is important for me..

I search how to optimize Memory block since the beginning of OS X

I find that my "Method" is Good

I have better performance than The equalivent Computer running with 1go de ram (my computer has 384 mo ram)

Thanx for your comments

And I wrote a next threads in US

For all (Unix, Linux, OS X)

Hoozone
# 3  
Old 02-04-2003
Hoozone,

Forum rules are that posts shall be in the English language. My apologies. Please do not intrepret the rules as a negative comment on the French language or French culture. We have chosen English as the communications method.

Please, if you don't mind, translate your post to English and repost. Thanks. Neo
# 4  
Old 02-04-2003
Ok Neo

That's your minds..

No Prob =)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Explain the output of swap -s and swap -l

Hi Solaris Folks :), I need to calculate the swap usage on solaris server, please let me understand the output of below swap -s and swap -l commands. $swap -s total: 1774912k bytes allocated + 240616k reserved = 2015528k used, 14542512k available $swap -l swapfile dev swaplo... (6 Replies)
Discussion started by: seenuvasan1985
6 Replies

2. Shell Programming and Scripting

Need lot of examples

Hi, I need a word doc or pdf which contains lots of Shell Programming samples... This is for my open book examination, thanks in advance.. (2 Replies)
Discussion started by: karthikeayan
2 Replies

3. Shell Programming and Scripting

lwp-request examples

Hi; Can i have ne sample examples of of using " lwp-request" in shell script. Is it necessary to have perl installed already in linux box for using this; Thnks; (2 Replies)
Discussion started by: ajaypadvi
2 Replies

4. HP-UX

Swap device file and swap sapce

Hi I have an integrity machine rx7620 and rx8640 running hp-ux 11.31. I'm planning to fine tune the system: - I would like to know when does the memory swap space spill over to the device swap space? - And how much % of memory swap utilization should be specified (swap space device... (6 Replies)
Discussion started by: lamoul
6 Replies

5. Programming

Application crashes in FreeBSD 7.1 while working ok in FreeBSD 6.3

Hello there, My mulithreaded application (which is too large to represent the source code here) is crashing after installing FreeBSD 7.1-RELEASE/amd64. It worked properly on others machines (Dual Cores with 4GB of RAM - FreeBSD 6.2-RELEASE/i386). The current machine has 2x Core 2 Duo... (1 Reply)
Discussion started by: Seenquev
1 Replies

6. UNIX for Dummies Questions & Answers

SimpleAWK Examples

Can Anyone please give me some simple AWK Examples to clearly understand the usage and syntax of the command. Thanks (2 Replies)
Discussion started by: unxusr123
2 Replies

7. Solaris

Swap config - Mirror swap or not?

Hello and thanks in advance. I have a Sun box with raid 1 on the O/S disks using solaris svm. I want to unmirror my swap partition, and add the slice on the second disk as an additional swap device. This would give me twice as much swap space. I have been warned not to do this by some... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

8. Shell Programming and Scripting

need examples?

Can someone give me an example of two shells? (1 Reply)
Discussion started by: wmosley2
1 Replies

9. News, Links, Events and Announcements

Apple OS X (10.2) Jaguar and the Rendezvous Protocol

Apple launches new software I'm about to change over my desktop office environment to Apple!!! This is getting very interesting. Congratulations to Apple!!!! We Love Ya!!!! PS: PLEASE LOWER YOUR PRICES ON SOFTWARE AND WE WILL LOVE YOU MUCH MORE :) (1 Reply)
Discussion started by: Neo
1 Replies

10. UNIX for Advanced & Expert Users

looking for .profile examples

I'm looking for some 'well documented' .profile examples (8 Replies)
Discussion started by: JimC
8 Replies
Login or Register to Ask a Question