*BSD News Article 57463


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!news.sprintlink.net!news1!not-for-mail
From: root@dyson.iquest.net (John S. Dyson)
Subject: Re: Too much swap???
X-Nntp-Posting-Host: dyson.iquest.net
Message-ID: <4apmqo$1hk@dyson.iquest.net>
Sender: news@iquest.net (News Admin)
Organization: John S. Dyson's home machine
References: <4adhdf$ft9@itchy.itsnet.com> <4af2oq$790@uriah.heep.sax.de> <4ahoj7$cte@news.ro.com> <4aovmp$4of@vulture.dmem.strath.ac.uk>
Date: Thu, 14 Dec 1995 17:27:52 GMT
Lines: 28

In article <4aovmp$4of@vulture.dmem.strath.ac.uk>,
Neil Brendan Clark <nbc@vulture.dmem.strath.ac.uk> wrote:
>Mike R. Prevost <mprevost@ro.com> wrote:
>>
>>I'm wondering now multiple swap partitions work.  Are they somehow in 
>>order? -- like when the first one runs out does it use the second one or 
>>what?
>
>As far as I can ascertain the disks are "interleaved" or whatever the technical
>term is - i.e. the system attempts to distribute the load between the numerous
>swap partitions since (at least with SCSI) DMA transfers are possible leading
>to greater performance. The reality certainly seems to bear this out.
>
>I am, however, unable to shed any light on the algorithms used to this end.
>
The interleaving occurs in vm_swap.c.  Actually, 16 page segments are
interleaved.  It so happens that appears to be a good tradeoff of overlapped
I/O and I/O size.  (Better interleaving would occur if the segment size was
say, one page -- but the I/O size is so small that the transfer rate is
overwhelmed by rotational latencies and other overhead.)  Of course, some
sort of volume manager type driver would be better than the vm_swap device....
Pageouts are mostly asynchronous -- so multiple output requests will
be scheduled across drives.

John
dyson@freebsd.org