Re: Maximize Number of Instances on RHEL 7.9
Date: Sat, 7 Oct 2023 22:17:42 +0300
Message-ID: <CACGsLCJWsmMQXzCEjEVRUtfcXBQEQ538wh0KOf9_aP7FOTM9bA_at_mail.gmail.com>
Not an AIX aficionado but it's even cooler <https://www.ibm.com/docs/en/aix/7.2?topic=performance-multiple-page-size-support> than that: 4K, 64K, 16M, and 16G (huge indeed). Linux can do 1G pages but Oracle doesn't support it officially for some reason.
On Sat, Oct 7, 2023 at 9:52 PM Jonathan Lewis <jlewisoracle_at_gmail.com> wrote:
>
> 2MB, not 2GB.
> The latter would be a bit brutal for a 4GB SGA.
>
> Maybe someone could remind me, but I think AIX has 3 possible sizes, with
> 2GB the biggest and (I think) 4MB as the intermediate.
>
> Regards
> Jonathan Lewis
>
>
> On Sat, 7 Oct 2023 at 19:17, Mladen Gogala <gogala.mladen_at_gmail.com>
> wrote:
>
>> On 10/7/23 12:40, Jared Still wrote:
>>
>> One of the things I am curious about is why no hugepages?
>>
>> I'm not aware of hugepages being non-useful due to small SGA size.
>>
>> With so many instances I would think it rather a good feature to employ.
>>
>>
>> Well, let's clarify. Huge pages are usually neither swapped out nor paged
>> out. Swapping out and paging out are two different processes which can be
>> very expensive. Both processes include I/O requests and waiting for the
>> process to complete. Second, huge pages are usually 2 GB in size (we're
>> talking Linux x86_64) which means that the page table indexing the shared
>> segment needs one entry per 2GB page. Without huge pages, page table need
>> one entry per 4KB. In other words, huge pages can save quite a bit of
>> memory as the page tables indexing huge pages are 524288 times smaller than
>> the page tables comprised of 4KB pages. Of course, if the SGA is small,
>> savings are a lot smaller, but they still do exist.
>>
>> Please, do not forget that huge pages are allocated on system startup and
>> cannot be used for small pages memory. If you allocate 16GB of pages for
>> Oracle, you cannot use it for other, more useful stuff, like Diablo4 or
>> GTA5. There is a variety of huge pages, called "transparrent huge pages",
>> but Oracle cannot use them. As a matter of fact, it is advised to disable
>> transparent huge pages with Oracle because they were causing Linux crashes.
>> That is the info from RHEL7. I am not sure about RHEL8 or RHEL9 but I still
>> disable them with the following commands:
>>
>> if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
>> echo never > /sys/kernel/mm/transparent_hugepage/enabled
>> fi
>> if test -f /sys/kernel/mm/transparent_hugepage/defrag; then
>> echo never > /sys/kernel/mm/transparent_hugepage/defrag
>> fi
>>
>> I was a VAX/VMS system administrator before I became an Oracle DBA.
>> VAX/VMS was very meticulous about the memory parameters and one could tune
>> the memory usage quite precisely. Linux is not as good. However, huge pages
>> are a good feature, inspired by the VIRTUAL=REAL memory on the MVS
>> mainframes. Memory tuning on Linux is still somewhat esoteric discipline,
>> not frequently practiced these days. BSD Unix varieties have much more
>> configurable memory parameters but, unfortunately, nobody is using BSD,
>> ever since the demise of Slowaris 4.
>>
>>
>> --
>> Mladen Gogala
>> Database Consultant
>> Tel: (347) 321-1217https://dbwhisperer.wordpress.com
>>
>>
-- Regards Timur Akhmadeev -- http://www.freelists.org/webpage/oracle-lReceived on Sat Oct 07 2023 - 21:17:42 CEST