how to maximize performance?
Roger Rose
rlr at alumni.colorado.edu
Sun Jun 30 05:15:49 AEST 1991
> The process image in swap is contiguous, it is not scattered all over
> in blocks like the file system files are. Therefore, seek-time is relatively
> unimportant for swap. The files are contiguous in swap because speed is
> critical.
> ...
> Your friend who suggested "swap blocks are small" might be thinking
> about demand paging, where the system is able to page out individual
> blocks instead of swapping the entire process. Seek time would be an
> important consideration for a paging area, but not for swap.
The first statement is true for systems which swap, but my understanding
is that even modern Sys-V's demand-page. (Most of my exposure is to
BSD where even the paged space is fairly contiguous, since it's
preallocated at process creation.)
Assuming that I'm not mistaken that '386 ports of SVR3 (specifically
386ix) support demand-paging and only swap when they get starved for
memory, don't they use the same "swap" area for paged and swapped
memory? If so, then seek time is still important.
There may be ways of minimizing the importance of seek time on paged
systems. Overallocating the page space may help minimize fragmentation
problems depending on what the page/swap activity looks like. Also, if
the system supports multiple swap partitions and both the device-driver
and virtual memory systems support overlapped I/O, then throughput can
frequently be improved by allocating small swap partitions on each
disk.
Of course, the first thing to do is observe the virtual memory stats
while the system is running. If you're not swapping and any
significant paging activity is zero-fill or reclaiming stale pages,
then there's little reason to be concerned about access to the swap
area of the disk.
--
Roger Rose {rlr at boulder.colorado.edu}
More information about the Comp.unix.questions
mailing list