Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


No Swap?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

No Swap?

CoreyCorey Member
edited July 2012 in General

I noticed a few providers here turning swap off completely on their nodes. What is the logic behind that? Linux is very smart with SWAP and will put crap in there that doesn't need to be accessed very often (if at all) so that it can save some room for disk cache in the ram.

Kernel maintainer Andrew Morton has said that he runs his desktop machines with a swappiness of 100, stating that "My point is that decreasing the tendency of the kernel to swap stuff out is wrong. You really don't want hundreds of megabytes of BloatyApp's untouched memory floating about in the machine. Get it out on the disk, use the memory for something useful."

Comments

  • AlexBarakovAlexBarakov Patron Provider, Veteran

    If the node is based on rhel5, i think it does not support swap, only burst.

  • CoreyCorey Member

    @LiquidHost The host node can swap still. That's what I'm asking about.... not the VMs.

  • AlexBarakovAlexBarakov Patron Provider, Veteran

    @Corey
    Oh, I missunderstood what you meant. Thought you was talking about the VMs theirself.

  • DamianDamian Member
    edited July 2012

    @Corey said: You really don't want hundreds of megabytes of BloatyApp's untouched memory floating about in the machine. Get it out on the disk, use the memory for something useful.

    On our systems, disk i/o is at a premium, whereas memory is a plentiful resource. I'd rather not waste disk i/o swapping untouched(untouched being an operative word, even...) memory to disk; it can just live in memory.

  • ^^ Same. SWAP is pointless these days since ram is so cheap.

  • sleddogsleddog Member
    edited July 2012

    @Damian said: On our systems, disk i/o is at a premium, whereas memory is a plentiful resource. I'd rather not waste disk i/o swapping untouched(untouched being an operative word, even...) memory to disk; it can just live in memory.

    So in your OpenVz setup, is vswap actually swap (on disk) or memory? On my often-idle 32MB, if I restart all services I'll have 9MB memory usage and 0 vswap. A few hours later it'll be 7MB memory used and 2MB vswap....

  • CoreyCorey Member

    @Damian and @BassHost Because it's really going to take a lot of disk IO to swap a few 100mb INTO swap every now and then? It isn't likely going to be taking that back out of swap.

    Ram is cheap? Really since when? You have to buy an architecture that will first support a crap ton of ram (expensive).. then you have to buy all that ram (just as expensive as disks), when you could just put a few GB of unused crap into swap.

  • DamianDamian Member

    @sleddog said: So in your OpenVz setup, is vswap actually swap (on disk) or memory? On my often-idle 32MB, if I restart all services I'll have 9MB memory usage and 0 vswap. A few hours later it'll be 7MB memory used and 2MB vswap....

    Vswap lives in memory. Even though it's called vswap, it doesn't touch disk, and Openvz accounts for it by artificially slowing down the container as vswap gets used.

    http://wiki.openvz.org/VSwap has more information on it's mechanism of function.

    @Corey said: Ram is cheap? Really since when? You have to buy an architecture that will first support a crap ton of ram (expensive).. then you have to buy all that ram (just as expensive as disks

    Yep, that's the kind of service we're trying to run here.

  • @Damian said: Vswap lives in memory. Even though it's called vswap, it doesn't touch disk, and Openvz accounts for it by artificially slowing down the container as vswap gets used.

    But why vswap-out memory when I'm nowhere near my real memory limit? I could understand it if I pushed the container near it's memory limit, causing it to vswap, but that's not the case. Pity there's no 'vswappiness' setting within the container....

Sign In or Register to comment.