[dundee] VMWare Server 2.0

Andrew Clayton andrew at digital-domain.net
Thu Oct 2 14:22:50 UTC 2008


On Thu, 2 Oct 2008 12:51:32 +0000 (GMT), Lee Hughes wrote:

> just reading about vmware, it says it need 
>    'needs proprietary kernel modules'
> 
> I don't like the sound of that ;-).
> 
> Thing that gets me about virtual machines is memory usage, it all
> well and good on a single machine (non vm)  you can have say 1GB of
> ram and setup 2GB of swap space, but linux seems rather lazy about
> claiming and reclaiming memory, if I look at my own machine I have
> 1GB of ram,  and currently using 787MB of swap! This would cause
> havoc in a virtual environment.... okay I need a memory upgrade.
> 
> Until linux applications constrain their memory use , or they can be
> given hints on maximum or minimum  memory use then using any virtual
> machine technology that support paging to disk, is a no no.
> 
> paging to disk is not usually a bit problem, as only one machine is
> effected, and that machine has already exhausted it's memory  , so a
> slow down is expected. Misbehaving VM's that are paging will effect
> performance of all vm's on that system.

Don't use swap. Or experiment
with /proc/sys/vm/{overcommit_memory,overcommit_ratio}

> Take Apache for example, this always seems to grow in size, it will
> fork() more depending on it's load, using more memory in the process,

Last I looked this could be limited.

> I've never seen it release memory , unless you restart the entire
> process. :-(. Obviously you can tune it, but be great if this, and
> other app were aware they we're being virtualised, and tuned their
> memory allocation accordingly.. .
> So, perhaps applications should become more vm aware? Programmers
> should stop thinking that memory is infiite resources, and stop
> assuming that if they allocate more memory than is available then,
> the kernel/libc will just 'sort it out for them'. Memory leaks on one
> vm's app's could potential effect others.. 
> 
> Linux still suffers from memory leaks , they get fixed, I was told
> once that the unix mount command leaks lots of memory, sure you only
> ever run it, it does it job and it quits (linux then reclaims memory)
> but that's not excuse for sloppy code.
> 
> Java VM seems a bit more promising, at least you can force garbage
> collection in low memory situations.
> 
> But what is the solution to this, large disk administrators setup up
> temp area's, where users can create very large working files but for
> a limited amount of time? Perhaps this needs to be implemented in
> memory management too?  Okay, mr apache you can double your memory
> size for but only for x amount of time.
>
> Openvz seems to stay away from virtual memory, and allows you you to
> allocate min and max pages, but it's rather a black magic  do with
> your wetting your finger and putting it the air.

Take a look at the control cgroups stuff currently being merged into
mainline. http://lwn.net/Articles/256389/
http://lwn.net/Articles/243795/

> For my installed I've just pack as much ram as possible in , to avoid
> unnecessary swapping.
> 
> I'd be interested about commercial vm solutions, do they have a magic
> bullet for memory management?

Andrew



More information about the dundee mailing list