<div dir="ltr"><div>Yup, that's exactly how it works. But there are some caveats... since it is used as swap any disruption on the underlying drives can cause the system to lock-up (i.e. system can get stuck trying to page-in random programs). So swap should only be configured on permanent storage devices and not on things like usb keys (unless the usb drive is the only storage for the entire system).<br><br></div><div>The second caveat is that although you can configure multiple swap devices of dissimilar size, the interleaving mechanisms only work well when the swap devices are each roughly the same size.<br><br></div><div>There are very few situations where one might need more than one swap drive, particularly if the swap device is a SSD. We generally configure one swap device (on the SSD) even on our builder machines which use swap heavily for tmpfs mounts. The only machine we have two swap devices configured for is our 48-core opteron. That is mainly used in conjuction with the 128G of ram as a disk cache (aka swapcache) to help cache a couple of terrabytes of hard drive storage for the grok data sets.<br></div><div><br></div>-Matt<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 2, 2016 at 9:17 AM, Freddie Cash <span dir="ltr"><<a href="mailto:fjwcash@gmail.com" target="_blank">fjwcash@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><div class="gmail_default" style="font-family:courier new,monospace"><span style="font-family:arial,sans-serif">On Mon, May 2, 2016 at 12:56 AM, PeerCorps Trust Fund </span><span dir="ltr" style="font-family:arial,sans-serif"><<a href="mailto:ipc@peercorpstrust.org" target="_blank">ipc@peercorpstrust.org</a>></span><span style="font-family:arial,sans-serif"> wrote:</span><br></div></span><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Reading the online man pages concerning swapcache, there are a few references to the interleaving of swap devices.<br>
<br>
I am curious as to how this works in practice and how is it set up? Is this somehow similar to striping swap across the two devices?</blockquote><div><br></div></span><div><div class="gmail_default" style="font-family:'courier new',monospace;display:inline">Create a swap partition on diskA.</div></div><div><div class="gmail_default" style="font-family:'courier new',monospace;display:inline">Create a swap partition on diskB.</div></div><div><div class="gmail_default" style="font-family:'courier new',monospace;display:inline">Create a swap partition on diskC.</div></div><div><div class="gmail_default" style="font-family:'courier new',monospace;display:inline"><br></div></div><div><div class="gmail_default" style="font-family:'courier new',monospace;display:inline">Kernel will write swap data out to </div> <div class="gmail_default" style="font-family:'courier new',monospace;display:inline">diskA, then diskB, then diskC, in parallel, similar to how a RAID0 stripe works. It's all handled automatically inside the kernel swap subsystem.</div></div></div><span class="HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div>Freddie Cash<br><a href="mailto:fjwcash@gmail.com" target="_blank">fjwcash@gmail.com</a></div>
</font></span></div></div>
</blockquote></div><br></div>