If it does, then how do you justify the overheads incurred (journaling etc.)? If it does not, then how come the pagefile gets fragmented? Additionally, would increasing the cluster size improve pagefile performance (cluster slack space is a non-issue)?
views:
376answers:
2You can see filemon or procmon (sysinternals.com) to see the OS writing to the pagefile - so it must use the appropriate filesystem semantics.
If you're swapping because of memory pressure, you've already lost the performance battle and the overheads aren't going to significantly add to the loss (but they will mean your filesystem remains uncorrupted). If the swapping isn't performance critical, who cares about a marginal performance hit for journalling?
Cluster size is unlikely to be an issue because that just maps from index->storage on the disk. The pagefile only very rarely changes size so the index will hardly ever change.
The system uses file system calls to access the pagefile, as it must. The overhead for journaling and such is essentially nil. Journaling only comes into effect when the file system structure is changed, not for individual reads or writes. By default XP uses a semi-fixed pagefile with the initial size set at 1.5 x the size of physical memory. Under normal conditions the pagefile will never be smaller than this. If this size is adequate, and with a reasonable RAM size this will almost always be the case, the pagefile will never be resized. Only in this unlikely event will new clusters be allocated for the pagefile and there will be a possibility for fragmentation. Upon a reboot, or sooner, all extensions to the pagefile will be released and it will revert to it's initial size. Under normal conditions fragmentation does not occur. If the pagefile is initially unfragmented and resizing does not occur the pagefile will NEVER fragment.
The pagefile is used on a more or less continuous basis to hold rarely used data. These writes take place during quite times of low CPU and disk access so do not impact performance. Since the data involved is rarely used pagefile access rarely impacts performance to a serious degree. The pagefile is not simply an overflow area that is used when memory runs short. In most cases the pagefile improves performance by freeing RAM from the need to handle static data for long periods of time.