Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: memory usage by dbw very high

Re: memory usage by dbw very high

From: Mladen Gogala <mladen_at_wangtrading.com>
Date: Mon, 03 Nov 2003 11:09:35 -0800
Message-ID: <F001.005D5770.20031103110935@fatcity.com>


What we have here is a confusion with terminology. Process cannot "be swapping". When there is a serious shortage of memory, the swap demon (yes, your Unix box is haunted) known by the horrible name of [kswapd] writes the whole address space space belonging to the process onto swap. At that point, process is swapped. Unless, we are talking about the kswapd process, the process cannot "be swapping". Kernel swap demon seldomly uses oracle database. Process can be paging. When there is serious shortage of memory (but less serious then in the first case), pages are stolen from the process and written onto the swap. It's called "page replacement". When processes need pages that have been thrown out of memory by the page replacement demon (in case of Linux, it's called bdflush but on some unix implementations, there is a process called "updated" or "paged " which performs this function.), it pages them in. If the page is in memory (buffer cache would a good place to look), we're talking about the soft page fault. If the page has to be read from the disk, we're talking about hard page fault. Processes that page get charged for a lot of CPU time, all of it in the kernel mode. If you have gtop (my kindest advice is to get it), you can set preferences and see kernel mode for the processes. Ones consuming large amounts of the kernel mode are ones that are paging. On 11/03/2003 01:24:27 PM, Sai Selvaganesan wrote:
> hi tanel and mladen
> not every time a process is started does it swap but sometimes swapping does happen.(this is from the top o/p which shows a increase in the memory used in swap.).how do we check whether a single process swaps or not?
>
> and the dbw process is using more % of memory than a couple of days back.(o/p pf ps aux).
> is this how linux kernel works or is there something else i can check.
>
> thanks
> sai
> what is meant by OP,tanel..
>
>
> Tanel Poder <tanel.poder.003_at_mail.ee> wrote:
> Thanks Mladen, that was a good tip about linux kernel enhancement, however
> OP still uses 2.4.9 as stated in original post.
>
> I just wanted to know whether OP actually sees excessive paging or just
> memory being "full", the latter one, as you know, isn't really a problem.
>
> Tanel.
>
> ----- Original Message -----
> To: "Multiple recipients of list ORACLE-L"
> Sent: Saturday, November 01, 2003 5:39 PM
>
>
> > The whole thing comes as a consequence of using buffered I/O. New linux
> > kernels (2.4.18 and later) have new memory management, which allows
> > the kernel to grab more memory for buffers in periods of intense I./O
> > activity. If you have a very active database on ReiserFS or Ext3, Linux is
> > going to try to help you out by allocating more memory for the file system
> > buffers, even by stealing pages from the active processes, which will, in
> > turn. start paging. The only possible response is to eliminate the
> buffered I/
> > O and switch to non-buffered I/O. That is not so hard to do.
> >
> > On 2003.11.01 09:44, Tanel Poder wrote:
> > > Just for clarification, do you actually see swapping when starting a new
> > > process or you just guess linux would swap because you don't see "free"
> > > memory in top output?
> > >
> > > Tanel.
> > >
> > > ----- Original Message -----
> > > From: Sai Selvaganesan
> > > To: Multiple recipients of list ORACLE-L
> > > Sent: Saturday, November 01, 2003 1:34 AM
> > > Subject: RE: memory usage by dbw very high
> > >
> > >
> > > rich
> > > the ipcs output shows 1.1 gb. so nearly 2 gb(total ram size is 3.08)
> is
> > > used by non shared memory size.
> > > i went thru all the processes and found dbwr using the max %mem. what
> > > could
> > > be the reason?
> > > sai
> > >
> > > "Jesse, Rich" wrote:
> > > If I'm not mistaken, this figure includes the size of the shared
> memory
> > > segment from the SGA. Take the output of the "oracle" line of
> "ipcs -a"
> > > (hopefully you'll only have one!) and subtract it from the process
> size
> > > to
> > > get a better idea of the non-shared memory size of the process.
> > >
> > > Rich
> > >
> > > Rich Jesse System/Database Administrator
> > > rjesse_at_qtiworld.com Quad/Tech Inc, Sussex, WI USA
> > >
> > >
> > > -----Original Message-----
> > > Sent: Friday, October 31, 2003 3:49 PM
> > > To: Multiple recipients of list ORACLE-L
> > >
> > >
> > > hi
> > >
> > > i have a system that has no active users at this point of time. the
> > > memory
> > > used by the dbw process is very high leading to a lot of swapping
> when
> > > any
> > > process starts.
> > > here are the spces
> > > version:9.2.0.4
> > > os:Linux 2.4.9-e.24smp
> > > o/p from top:
> > > 1:44pm up 29 days, 23:55, 4 users, load average: 1.73, 1.68, 1.35
> > > 132 proces! ses: 131 sleeping, 1 running, 0 zombie, 0 stopped
> > > CPU0 states: 24.4% user, 2.2% system, 0.0% nice, 72.2% idle
> > > CPU1 states: 0.5% user, 0.5% system, 0.0% nice, 98.0% idle
> > > CPU2 states: 0.0% user, 0.1% system, 0.0% nice, 99.4% idle
> > > CPU3 states: 0.3% user, 0.4% system, 0.0% nice, 98.3% idle
> > > Mem: 3089964K av, 3083380K used, 6584K free, 846848K shrd, 193448K
> > > buff
> > > Swap: 2048152K av, 1652K used, 2046500K free 1852468K
> > > cached
> > > sga size:
> > > Total System Global Area 1084823632 bytes
> > > Fixed Size 452688 bytes
> > > Variable Size 335544320 bytes
> > > Database Buffers 738197504 bytes
> > > Redo Buffers 10629120 bytes
> > > pga aggregate size:700M
> > > and ps o/p of dbw process
> > > USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> > > oracle 4062 0.0 16.4 1131260 508168 ? S 10:16 0:06
> > > ora_dbw0_revenue
> > >
> > > please advise. what is really going on.
> > >
> > > thanks
> > > sai
> > > --
> > > Please see the official ORACLE-L FAQ: http://www.orafaq.net
> > > --
> > > Author: Jesse, Rich
> > > INET: Rich.Jesse_at_qtiworld.com
> > >
> > > Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> > > San Diego, California -- Mailing list and web hosting services
> >
> ---------------------------------------------------------------------
> > > To REMOVE yourself from this mailing list, send an E-Mail message
> > > to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> > > the message BODY, include a line containing: UNSUB ORACLE-L
> > > (or the name of mailing list you want to be removed from). You may
> > > also send the HELP command for other information (like subscribing).
> >
> > --
> > Mladen Gogala
> > Oracle DBA
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.net
> > --
> > Author: Mladen Gogala
> > INET: mgogala_at_adelphia.net
> >
> > Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> > San Diego, California -- Mailing list and web hosting services
> > ---------------------------------------------------------------------
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from). You may
> > also send the HELP command for other information (like subscribing).
> >
>
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Tanel Poder
> INET: tanel.poder.003_at_mail.ee
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

Mladen Gogala
Oracle DBA

Note:
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Wang Trading LLC and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Mladen Gogala
  INET: mladen_at_wangtrading.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon Nov 03 2003 - 13:09:35 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US