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


Click here to return to the 'Swap partition' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Swap partition
Authored by: SOX on Nov 12, '02 04:23:14PM

Enabling the journalling diminshes the write speed by about 10%. (the read speed is unaffected). This loss is trivial except for write intensive tasks. On such task it Swap (paging). And there is no reason to journal swap that I can think of.
However unless swap is actually on another disk partition I'm not sure if you can disable journaling just on the swap file system that is on the same as the root partition. Sure you could issue a command not to journal the swap file system (disksutil disableJournal). but would this have the desired effect?? that is if one is not journalling every write to the partition's metadata does this offere any crash proteection. And likewise after a crash will the whole partition have to be FSCKed if any part of it was not journaled. My guess is that the answer here is that you have to journal a whole partition or none of it.

Thus it seems to me that moving the swap to its own partition is an evn better idea than it was before. So what is the current wisdom and HOWTO on safely making a swap under 10.2. Searching at mac osxhints reveals several strategies that broke under 10.2, and some contradictory advice that seems to be a bit flakey



[ Reply to This | # ]
Swap partition
Authored by: Anonymous on Nov 13, '02 12:27:38AM

Maybe so, maybe not. Once the swap mechanism allocates a chunk o' disk (I think in 80MB chunks -- can't rememebr, maybe 800? Doesn't matter. Big chunks, anyway), it uses some extremely low level API to read/write pages of memory to the swapfiles.

In particular, the APIs used are designed to work in relatively large and very regularly sized chunks (pages and multiples therein) while also continue to work during low level interrupts [pagein/pageout requests at bottom end of the kernel].

As well, the swapfiles are inherently volatile. That is, the state and contents of the swap files have no meaning once a system has been shutdown-- purposefully or because of a failure.

As such, I would not be at all surprised if the journaling support in OS X does not actually journal writes to the swapfiles as there would be no point in doing so.

This is, of course, completely conjecture. I have no idea if this is actually the case and, frankly, if it is even possible.

Anyone checked if the source is in the Darwin repository and bothered reading it yet??



[ Reply to This | # ]