Does creating the swapfile on a journaled filesystem (e.g. ext3 or reiser) incur a significant performance hit?
and answer
None at all. The kernel generates a map of swap offset -> disk blocks at swapon time and from then on uses that map to perform swap I/O directly against the underlying disk queue, bypassing all caching, metadata and filesystem code.
[1] Klaus Knopper, "Questions and Answers", Linux Magazine Polish ed., 3(25) March 2006, pp 38-40.
[2] Andre Morton et al., "Swap partition vs swap file" thread Linux-Kernel Mailing List, July 2005.
No comments:
Post a Comment