dhesi@sun505.UUCP (Rahul Dhesi) (09/16/89)
This question is probably specific to SunOS 4.x, unless 4.3BSD-tahoe has this feature too. SunOS 4.x allows you to specify not only a disk partition for swapping, but also a file created with mkfile(8). If I were doing it, I would have the kernel map the blocks in the file to a range of physical blocks on disk just once, and then do all swapping directly to physical blocks on disk. This would make swapping to a file as efficient as swapping to a partition. (My concern is purely with disks local to a Sun workstation, not with swapping over a network.) On the other hand, if swapping to a file involves some run-time mapping, it will be slower than using a swap partition. The Sun manuals are silent on the issue of performance. Question: Are the two equally efficient, or is swapping to a file less efficient? Please post or email your response as you consider appropriate. -- Rahul Dhesi <dhesi%cirrusl@oliveb.ATC.olivetti.com> UUCP: oliveb!cirrusl!dhesi
deboor@buddy.Berkeley.EDU (Adam R de Boor) (09/17/89)
Given that if you increase the size of a file once you've given it to the kernel as swap space, the kernel doesn't recognize the increase (or a decrease, which has led to some interesting panics), I assume the mapping to the physical disk blocks is done once for a local file. That's just speculation arrived at empirically... a