RE: Physical Memory Fully Used and Swap is Not Used

From: Teehan, Mark <>
Date: Wed, 24 Jun 2009 15:43:04 +0800
Message-ID: <>

Hi Mudhlavan,  

I agree with LS, and much depends on your version of Redhat. Linux does behave differently and uses any free RAM to speed up filesystem operations; to prove it run a top while you gzip a file and see what happens to free RAM.
Check orca if you have it running; you should see memory usage gradually increase following a restart dependant on filesystem operations. I've seen chronic problems with memory starvation on RH4; I believe it was hardware dependant but if the OS allowed free RAM to drop too low (15MB or so) during heavy I/O that is not using direct I/O, (gzips, ftp, hot backups) then kswapd kicked in a little to late to rescue the situation and could sometimes hang the OS. I believe these problems are fixed on RH5. Performance problems are probably not related to swap at all; and AWR is probably the best tool on hand.  


[] On Behalf Of LS Cheng Sent: 24 June 2009 14:44
To: Cc:
Subject: Re: Physical Memory Fully Used and Swap is Not Used


In the IO side you should enable direct i/o and aio in Linux (if you are using filesystems).

In the memory side you should enable hugepages, this is a nonswappable memory, i.e all SGA will be in physical memory. Be careful when setting this up though, some miss calculations will make Oracle use normal pages.

Regarding Linux uses all memory, that behaviour is default behaviour for ages, Linux tries to cache everything and uses all memory. Why leave memory free when you can use it, I think that is philosophy. There were some kernel parameters to change this behaviour but since Linux changes pretty fast and I cant really tell you if they still work in your Linux platform. Last time I checked they were working for RHEL 4 but no longer in RHEL 5 and I cant find the corresponding kernel parameters in RHEL 5 :-(

About your performance problem I think you better identify them first inside database (look some statspack or AWR if you have license). If Swap is not in use then the OS is not swapping, if there are heavy swap going on in Linux kswapd kicks in, in heavy memory starvation system when kswapd wakes up and freeing memory it hangs the system too! :-)



LSC On Tue, Jun 23, 2009 at 7:41 AM, Mudhalvan Moovarkku <> wrote:

        Dear DBAs,         

                We have recently migrated Oracle from 8.0.6 on HP-Unix to on Red Hat Linux

                Earlier the same application worked fine with 7GB RAM on HP-UNIX on PA-RISC

                Upgraded system on IBM X 3850 with 16GB RAM but still we have some performance issue.

                I knew there is some lagging because of Hardware Architecture but it is too bad 7 GB to 16GB RAM but still have performance.

                Please look at data collected from RDA. Looking at this scenario my physical memory is fullly used but Swap is not at all used.

        Total Physical Memory 16032 MiB

        Available Physical Memory 30 MiB

        Swap: Max Size 24575 MiB

        Swap: Available 24505 MiB

        Swap: In Use 70 MiB

                We know there is some performance issue in application. I would like to make as much as possible from Database/Linux side tunning to provide atlease peaceful performance. Can any body through some light on why the swap is not at all used.


        Mudhalvan M.M         

Please access the attached hyperlink for an important electronic communications disclaimer:

-- Received on Wed Jun 24 2009 - 02:43:04 CDT

Original text of this message