On Thu, Feb 11, 2010 at 2:18 PM, Offer Baruch <[email protected]> wrote: > Hi all, > > One of the problems with Linux under VM (not just z/VM I guess) is that no > matter how much memory you allocate to the guest it will consume it all as > cache. > It just seems reasonable to be able to limit this cache to a user defined > value leaving the rest of it for the applications. > Sadly I couldn't find a parameter to enforce this limit. > So, my question is, is there a way to limit the cache? If not, why? > Obviously this caching method is just not good enough under VM. > Decreasing and increasing memory for a guest is quite disruptive and adding > 100M to an oracle guest just looks bad :-)
Bear in mind that Oracle SGA lives in page cache. So I assume you're talking about the other stuff there... Did you already set swappiness to 0 on the system? Especially since Oracle servers drop from queue when idle (last time I looked) that would be a good setting for Linux on z/VM. The default swappiness of 60 encourages Linux memory management to keep recent stuff in cache, even when the means swapping out anonymous memory. The effect is that when Oracle is reading data from disk, Linux thinks it's a cool idea to cache that because it was read recently, thus force portions of Oracle SGA and PGA out to swap. Most likely significant portions of SGA and PGA will behave LRU as well, so you have two LRU on top of each other: the worst of both worlds. And look at using raw devices with Oracle ASM (not raw partitions, but the /dev/raw* devices). Those bypass the Linux block device layer and page cache, thus avoiding the double buffering. Rob -- Rob van der Heij Velocity Software http://www.velocitysoftware.com/ ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
