Re: [Xen-devel] Re: [XEN] using shmfs for swapspace

From: Adam Heath (doogie_at_brainfood.com)
Date: 01/03/05

  • Next message: Jean Delvare: "Re: Ticket #1851 - PATCH (take 2) for adm1026.c, kernel 2.6.10-bk6"
    Date:	Mon, 3 Jan 2005 15:07:42 -0600 (CST)
    To: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
    
    

    On Mon, 3 Jan 2005, Luke Kenneth Casson Leighton wrote:

    > On Mon, Jan 03, 2005 at 01:31:34PM -0500, Joseph Fannin wrote:
    > > On Sun, Jan 02, 2005 at 04:26:52PM +0000, Luke Kenneth Casson Leighton wrote:
    > > [...]
    > > > this is presumed to be infinitely better than forcing the swapspace to
    > > > be always on disk, especially with the guests only being allocated
    > > > 32mbyte of physical RAM.
    > >
    > > I'd be interested in knowing how a tmpfs that's gone far into swap
    > > performs compared to a more normal on-disk fs. I don't know if anyone
    > > has ever looked into it. Is it comparable, or is tmpfs's ability to
    > > swap more a last-resort escape hatch?
    > >
    > > This is the part where I would add something valuable to this
    > > conversation, if I were going to do that. (But no.)
    >
    > :)
    >
    > okay.
    >
    > some kind person from ibm pointed out that of course if you use a
    > file-based swap file (in xen terminology,
    > disk=['file:/xen/guest1-swapfile,/dev/sda2,rw'] which means "publish
    > guest1-swapfile on the DOM0 VM as /dev/sda2 hard drive on the
    > guest1 VM) then you of course end up using the linux filesystem cache
    > on DOM0 which is of course RAM-based.
    >
    > so this tends to suggest a strategy where you allocate as
    > much memory as you can afford to the DOM0 VM, and as little
    > as you can afford to the guests, and make the guest swap
    > files bigger to compensate.

    But the guest kernels need real ram to run programs in.

    The problem with dom0 doing the caching, is that dom0 has no idea about the
    usage pattern for the swap. It's just a plain file to dom0. Only each guest
    kernel knows how to combine swap reads/writes correctly.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Jean Delvare: "Re: Ticket #1851 - PATCH (take 2) for adm1026.c, kernel 2.6.10-bk6"

    Relevant Pages

    • Re: Orinoco card fails on resume with 2.6.2 (race condition?)
      ... strange timer state, but I dunno. ... the system goes into a swap ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • MM patches (was Re: why swap at all?)
      ... A bit of swap out, ... main ones that applie here is my split active lists patch (search ... hitting memory pressure. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Andrea VM changes
      ... and it was a surprise memory hog due to the usual GCC surprises. ... The obvious answer is to turn off swap, but I like to have some swap ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • RE: why swap at all?
      ... If one has 16GB of ram, would he or she want to use swap? ... Real Programmers consider "what you see is what you get" to be just as ... Please read the FAQ at http://www.tux.org/lkml/ ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: kswapd in tight loop 2.6.9-rc3-bk-recent
      ... The kswapd1 process was pegging the cpu at 99% ... and 2GB of swap. ... there was a bunch of RAM sitting free too (about half a gig if memory ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)