Simon Reber <s.re...@lcsys.ch> wrote: > I see some strange behavior on one of our servers, running an Oracle > Database and a special XML database. > Looking at the swap usage, using `free` command it tells me that about 4 > GB of swap is being used: > $ free -m
Let's break that down, easy to digest ... > Mem: > 72439 total > 64262 used > 8177 free > 0 shared > 618 buffers > 56177 cached > > Swap: > 32767 total > 3932 used > 28835 free First off, any time you have >>8GiB RAM, you should be tuning your VM. The defaults are designed for much lower RAM. NOTE: RHEL6 includes "tuned" profiles to auto-tune for various configurations. Secondly, you're on Oracle. Right there you have free memory, yet are using swap. I seriously doubt your Min Free (vm.min_free_kbytes) is 8GiB (likely <<1GiB default). So the immediate culprit usually becomes Swap Aggressiveness (vm.swappiness), where the default is 60 and aggressively pages out memory to swap. Turn that sucker down to 1. Third, it looks like you're reading a crapload (56GiB cached), and not writing much (<1GiB buffers). That usually means you don't need to immediately tune your VM for buffers. You should be capturing Disk I/O and paging statistics with your sar, or at least leave a vmstat running if you not using sar (or don't have Disk I/O and related paging statistics captured by sysstat). However ... > ... load average: 0.05, 0.09, 0.08 But the fact that your load averages are low is likely an indicator that you're not waiting on I/O much. Understand with >>8GiB RAM and a database or other program/service with regular, if not random, writes, you don't want to leave the default dirty buffers to 30s/5m, 10%/40% ("wakeup"/"force" flush). With 72GiB RAM, that means it doesn't even bother to attempt to write until it hits 7.2GiB within 30s, and then only when the system isn't busy. If the system is busy, and it usually is on a database server, that means it doesn't actually force a flush of buffers until 28.8GiB or 5 minutes. You can easily fill up RAM very fast with nearly 30GiB of commits in 5 minutes, and then spend countless minutes flushing. If the writes are random, and not just sequential, let alone your buffer on your storage is not nearly sufficient to handle 30GiB, you can spend some serious I/O wait there. Just FYI, but I don't think your symptoms suggest such at all. I think you only need to tune swappiness way, way down. That's highly recommended for Oracle any way. -- bjs P.S. There are several usage cases where swap is typically unnecessary at all. You still want to create it for dumps or other things, but can disable it with Swappiness (vm.swappiness) set to 0. It can always be re-enabled. -- Bryan J Smith - Professional, Technical Annoyance http://www.linkedin.com/in/bjsmith _______________________________________________ rhelv5-list mailing list rhelv5-list@redhat.com https://www.redhat.com/mailman/listinfo/rhelv5-list