Hello,

This question is frequently posed by those new to Linux: "Where has all my ram
gone?!"

The answer is disk caching!

I'd like to do some testing where I'll be firing up about 7 virtual machines
on my workstation. I'm using qemu+kvm, which does a good job about not
grabbing ram until it is used. That way, I can fire up 7 VMs, each allowed to
use up to 512 MB of ram. I'm still below my actual physical ram capacity of
4GB, but I'd like to still have use of any ram that I can on the host. As long
as my VMs don't allocate any memory, I should be fine. The disk caching
feature of Linux will guarantee that over time, with use, each VM will
eventually make full use of the 512MB of ram.

If there's a way to disable that feature in Linux altogether, I can have some
spare ram on the host at the cost of performance of the guest VMs which is
acceptable in my situation.

I've found the /proc/sys/vm/drop_caches location, but I'm not clear on whether
this is a one-shot drop, or if it'll actually disable caching. If it's a one
shot drop, it isn't terribly useful, but will help some if I drop once a
minute with cron. If needed, I'm happy to recompile the kernel, but I'd rather
not have to.

If I'm overlooking another feature of qemu-kvm that'd make my life easier, I'd
love to know about it. I do believe that since each VM is running the same
version of Linux, that kvm can do some shared memory magic, but I don't know
if I have to explicitly request that feature.


Thanks!

Jeff Anderson

Attachment: pgphCXwaJVOAV.pgp
Description: PGP signature

--------------------
BYU Unix Users Group 
http://uug.byu.edu/ 

The opinions expressed in this message are the responsibility of their
author.  They are not endorsed by BYU, the BYU CS Department or BYU-UUG. 
___________________________________________________________________
List Info (unsubscribe here): http://uug.byu.edu/mailman/listinfo/uug-list

Reply via email to