Re: linux memory settings on OL 6.2 ( red hat compatible )

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Sat, 8 Sep 2012 00:15:58 +0000 (UTC)
Message-ID: <pan.2012.09.08.00.15.18_at_gmail.com>



On Thu, 06 Sep 2012 11:06:05 -0700, John Hurley wrote:

> echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled echo
> never > /sys/kernel/mm/redhat_transparent_hugepage/defrag

You are smart. Transparent huge pages mechanism is still in its infancy. I have the same thing in my rc.local script. Speaking of sys, you should also enable deadline scheduler for the disks that will be used by Oracle:

echo deadline >/sys/block/sdb/queue/scheduler

Substitute your own devices for "sdb".

>
> We are using huge pages for Oracle SGA ( so automatic sizing crud turned
> off ... all manual settings ). Aside from the usual settings for kernel
> stuff in /etc/sysctl.conf for an oracle database we have ( again ...
> preliminary testing ) these settings in effect now:
>
> #
> vm.swappiness = 10 vm.vfs_cache_pressure = 200 vm.pagecache = 1 5 10
> vm.min_free_kbytes = 81920 vm.nr_hugepages = 28672 EOF

With such a large memory, you don't want to throw out inodes and directory entries quickly. I would set something like vm.vfs_cache_pressure = 20 to retain them as long as possible. That will give you the benefit of the caching. The "open" system service is an expensive operation and with 96GB of RAM you can afford to keep them around a little longer. The "pagecache" parameter is obsolete and should be omitted. You should use dirty_* parameters instead. Also, you want to set page-cluster to 5. That will cause swapper to try swapping out chunks of 32 (2**5) pages in a single IO operation, if possible. I would also set overcommit_memory to 1, to prevent OOM killer from activating.

-- 
Mladen Gogala
The Oracle Whisperer
http://mgogala.freehostia.com
Received on Fri Sep 07 2012 - 19:15:58 CDT

Original text of this message