On Mon, Apr 04, 2011 at 03:02:19PM -0600, Jeff Anderson wrote: > > This question is frequently posed by those new to Linux: "Where has all my ram > gone?!" > > The answer is disk caching!
Which, of course, is almost always a good thing. > 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. That might end up being a really big drop in performance. In this situation, I would be inclined to buy an extra 4 GB of RAM rather than try to disable the cache. I can kind of see why you would want to do this with virtual machines, but I think Linux's caching was designed with the assumption that RAM is wasted if it's not being used for something. I don't know of a way to do what you want, but I would be curious in hearing about it if you find an answer. -- Andrew McNabb http://www.mcnabbs.org/andrew/ PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868 -------------------- 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
