Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Size of the swap partition' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Size of the swap partition
Authored by: folkert on Aug 09, '04 03:13:00PM
i am too lazy to write up a full hint, but since the original poster mentioned a swap partition of one gigabyte...

i also chose a 1GB swap partition, only to find that the dynamic_pager does not make the most efficient use of it with default settings. dynamic_pager seems to have two modes of allocating new virtual memory, one where it doubles the size of the new swapfile with each file, and one where the size of the swapfile is fixed. now, with a one gig partition and a variable swapfile size, the following happpened: dynamic_pager happily created pages when needed, but, after a little over .75GB of VM where in use, refused to create a new swapfile because the size of the new file was slightly larger than the remaining space. the answer i found for my system was to start dynamic_pager with parameters
dynamic_pager -F ${swapdir}/swapfile -S 67108864 -H 33554432 -L 134217728

where -S means 'create swapfiles with a size of 64MB', -H 33554432 means 'create a new file when less than 32MB of free swapfile memory available' and -L 134217728 means 'discard a swapfile if more than 128MB of swapfile memory are unused'.

of course, the actual sizes i chose could be rather braindead. for further reading, try man dynamic_pager.
cheers,
-folkert.

---
$ hexdump /mach_kernel|head -1
0000000 feed face 0000 0012 0000 0000 0000 0002


[ Reply to This | # ]

Size of the swap partition
Authored by: sjk on Aug 12, '04 02:11:19PM
See huge swap files in 10.3.4 ?? on Apple Discussions for more about that topic.

[ Reply to This | # ]