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

Home -> Community -> Mailing Lists -> Oracle-L -> ora-4030 pga memory allocation running wild

ora-4030 pga memory allocation running wild

From: Jeroen van Sluisdam <jeroen.van.sluisdam_at_vrijuit.nl>
Date: Tue, 23 Dec 2003 07:24:25 -0800
Message-ID: <F001.005DAE74.20031223072425@fatcity.com>


Content-Type: text/plain

Hi,  

I have an ora-4030 problem related to pga memory allocation, at least I have concluded sofar
This program is batch written in pl/sql and after an hour or so it crashes. PGA allocated is slowly exceeding
2Gb and when I monitor with top I see the process size rising uptill 2 Gb somewhere.
Last week we migrated from on oracle 7 environment where this program ran smoothly for years.
At the same time we migrated the OS also and started with new machines. The ux kernel parameter
for max data segment size is 2Gb.  

I had an oracle consultant here for migration and he advised to put pga_aggegrate_target on 250M. Box has
4Gb, shared_pool_size is 250Mb, SGA is almost 800Mb  

I issued a tar and Oracle advised me to remove pga_aggegrate_target from the init_file, but because this is production I cannot restart that easily (online changes are allowed ony from min. value 10M) I also tested this program with event : alter session set events '4030 trace name errorstack level 3'; I found the so called SQL-statement that might be causing this but explaining this plan gave me an even better plan than on the oracle 7 environment Oracle support still has to get back to me with latest things.  

This program is clearly running wild on memory. Based on the docs on metalink I lowered the pga_aggegrate_target to 160M now and I'm testing this right now. Is there any way to protect your system from memory consumption like this case. Are there any other parameters to consider?  

Details: oracle 9.2.0.4 HPUX 11.11, 4Gb phys memory  

Thanks in advance,  

Jeroen

------_=_NextPart_001_01C3C968.91283920
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3DUS-ASCII">

<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 10">
<meta name=3DOriginator content=3D"Microsoft Word 10">
<link rel=3DFile-List href=3D"cid:filelist.xml_at_01C3C971.3C55CFD0">
<!--[if gte mso 9]><xml>

 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>

  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:HyphenationZone>21</w:HyphenationZone>
  <w:EnvelopeVis/>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--

 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;
	text-underline:single;}
span.EmailStijl17
	{mso-style-type:personal-compose;
	mso-style-noshow:yes;
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:Arial;
	mso-ascii-font-family:Arial;
	mso-hansi-font-family:Arial;
	mso-bidi-font-family:Arial;
	color:windowtext;}
span.SpellE
	{mso-style-name:"";
	mso-spl-e:yes;}
span.GramE
	{mso-style-name:"";
	mso-gram-e:yes;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:70.85pt 70.85pt 70.85pt 70.85pt;
	mso-header-margin:35.4pt;
	mso-footer-margin:35.4pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}

-->
</style>
<!--[if gte mso 10]>
<style>

 /* Style Definitions */=20
 table.MsoNormalTable
	{mso-style-name:Standaardtabel;
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
	mso-para-margin:0cm;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";}

</style>
<![endif]-->
</head>

<body lang=3DNL link=3Dblue vlink=3Dpurple =
style=3D'tab-interval:35.4pt'>

<div class=3DSection1>

<p class=3DMsoNormal><span class=3DSpellE><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>Hi</span></font></span><fon= t size=3D2
face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial'>,<o:p></o:p></span></font><= /p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-US
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>I have an ora-4030 = problem
related to <span class=3DSpellE><span class=3DGramE>pga</span></span> = memory
allocation, at least I have concluded <span = class=3DSpellE>sofar</span><o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-US
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>This program is = batch written
in pl/<span class=3DSpellE>sql</span> and after an hour or so it = crashes. <span
class=3DSpellE>PGA</span> allocated is slowly = exceeding<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-US
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>2Gb and when <span class=3DGramE>I<span style=3D'mso-spacerun:yes'>&nbsp; =
</span>monitor</span> with

top I see the process size rising <span class=3DSpellE>uptill</span> 2 =
<span

class=3DSpellE>Gb</span> somewhere.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-US
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>Last week we = migrated from on
oracle 7 environment where this program ran smoothly for = years.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-US
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>At the same time we =
<span

class=3DGramE>migrated</span> the OS also and started with new = machines. The <span
class=3DSpellE>ux</span> kernel parameter<o:p></o:p></span></font></p>

<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
lang=3DEN-US =
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>for</span></font></sp= an><span
lang=3DEN-US style=3D'mso-ansi-language:EN-US'> max data segment size = is 2Gb.<o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-US
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></sp= an></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-US
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>I had an oracle = consultant
here for migration and he advised to put <span = class=3DSpellE>pga_aggegrate_target</span> on 250M. Box has<o:p></o:p></span></font></p>

<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
lang=3DEN-US =
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>4Gb</span></font></sp= an><span
lang=3DEN-US style=3D'mso-ansi-language:EN-US'>, <span = class=3DSpellE>shared_pool_size</span>
is 250Mb, <span class=3DSpellE>SGA</span> is almost = 800Mb<o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-US
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></sp= an></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-US
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>I issued a tar and = Oracle
advised me to remove <span class=3DSpellE>pga_aggegrate_target</span> = from the <span
class=3DSpellE>init_file</span>, but because this is production I = cannot restart
that<o:p></o:p></span></font></p>

<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
lang=3DEN-US =
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>easily</span></font><= /span><span
lang=3DEN-US style=3D'mso-ansi-language:EN-US'> (online changes are = allowed <span
class=3DSpellE>ony</span> from min. value 10M) <o:p></o:p></span></p>

<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
lang=3DEN-US style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>I<span style=3D'mso-spacerun:yes'>&nbsp; </span>also</span></font></span><span lang=3DEN-US style=3D'mso-ansi-language:EN-US'> tested this program = with event :<o:p></o:p></span></p>

<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
lang=3DEN-US =
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>alter</span></font></= span><span
lang=3DEN-US style=3D'mso-ansi-language:EN-US'> session set events = '4030 trace name
<span class=3DSpellE>errorstack</span> level 3'; I found the so called
SQL-statement that might be causing this<o:p></o:p></span></p>

<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
lang=3DEN-US =
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>but</span></font></sp= an><span
lang=3DEN-US style=3D'mso-ansi-language:EN-US'> explaining this plan = gave me
an<span style=3D'mso-spacerun:yes'>&nbsp; </span>even better plan than = on the
oracle 7 environment Oracle support still has to get back to me with =
<o:p></o:p></span></p>

<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
lang=3DEN-US =
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>latest</span></font><= /span><span
lang=3DEN-US style=3D'mso-ansi-language:EN-US'> = things.<o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-US
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></sp= an></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-US
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>This program is = clearly
running wild on memory. Based on the docs on <span = class=3DSpellE>metalink</span>
I lowered the <span class=3DSpellE>pga_aggegrate_target</span> to = 160M<o:p></o:p></span></font></p>

<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
lang=3DEN-US =
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>now</span></font></sp= an><span
lang=3DEN-US style=3D'mso-ansi-language:EN-US'> and I'm testing this = right
now. Is there any way to protect your system from memory consumption = like this <span
class=3DGramE>case.</span> Are there any<o:p></o:p></span></p>

<p class=3DMsoNormal><span class=3DGramE><font size=3D3 face=3D"Times =
New Roman"><span
lang=3DEN-US =
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>other</span></font></= span><span
lang=3DEN-US style=3D'mso-ansi-language:EN-US'> parameters to = consider?<o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-US
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></sp= an></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-US
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>Details: oracle = 9.2.0.4 <span
class=3DSpellE>HPUX</span> 11.11, <span class=3DGramE>4Gb</span> phys = memory<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-US
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></sp= an></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-US
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>Thanks in = advance,<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-US
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'><o:p>&nbsp;</o:p></sp= an></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
lang=3DEN-US
style=3D'font-size:12.0pt;mso-ansi-language:EN-US'>Jeroen<o:p></o:p></sp= an></font></p>

</div>

</body>

</html>

------_=_NextPart_001_01C3C968.91283920--

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jeroen van Sluisdam
  INET: jeroen.van.sluisdam_at_vrijuit.nl

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 Tue Dec 23 2003 - 09:24:25 CST

Original text of this message

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