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.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
No Swap?
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
If the node is based on rhel5, i think it does not support swap, only burst.
@LiquidHost The host node can swap still. That's what I'm asking about.... not the VMs.
@Corey
Oh, I missunderstood what you meant. Thought you was talking about the VMs theirself.
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.
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....
@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.
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.
Yep, that's the kind of service we're trying to run here.
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....