Home
All Oracle Error Codes
Oracle DBA Forum

Frequent Oracle Errors

TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated

Re: SGA Free memory

Jonathan Lewis

2006-02-09

Replies:

Amir,

This is not entirely normal - the scale of the flush
is a little extreme, and ties in with your earlier
question about "session param values".

The reply you got about increasing the reserved
shared pool was correct, and is probably relevant
in this case as well.

The sequence of events for allocating memory from
the shared pool is:
  Request chunk in shared pool
  if no available free chunks large enough
    if chunksize > 'reserved pool min alloc' (ca. 4400 bytes)
       search reserved pool for large enough free chunk
       if space available,
          allocate in reserved pool
          return
       endif
  end if

  -- get here if
    (a) reserved pool has no free space
    (b) reserved pool was not checked

  loop
    detach some items from end of library cache LRU
    distribute items to shared pool free list - coalescing where possible
    check for large enough chunk on free list
    return if allocation succeeds
  end loop

  There may be a limit on the number of times round the loop -
  but I've seen highly concurrent OLTP systems flush several
  hundred megabytes from the library cache - hammering the
  library cache and shared pool latches to death for seconds
  at a time doing this.


You can get problems on well-designed systems with large numbers
of users because (a) the free memory eventually degrades into lots of
very small pieces, (b) the session param values is about 22 KB and
(c) the default of 5% for the reserved pool may not be enough.

As a rough guide line, if you are seeing catastrophic memory thrashing,
check that your shared_pool_reserved is about 25KB * sessions plus
a few MB. (A query against x$ksmspr will tell you how much of the
memory is used for things other than session parameters), and that's
at least the size you need for the "few MB extra").

  select sum(KSMCHSIZ) from x$ksmspr
  where ksmchcom not in ('free memory','session param valu')

(Don't try this against x$ksmsp, the shared pool, it could
cripple your system for anything up to a couple of minutes
if it's a system with a large shared pool and lots of users).
(the session parameter component has a couple of changes
in its name across Oracle versions).

You could also check to see how many of your session's
have got their parameters into the reserved pool - this is
quite a nice query, and not too aggressive as a more
general check:

  select ksmchcom,count(*),sum(ksmchsiz)
  from x$ksmspr
  group by ksmchcom;

(again - DON'T run it against x$ksmsp).



Regards

Jonathan Lewis

http://www.jlcomp.demon.co.uk/faq/ind_faq.html
The Co-operative Oracle Users' FAQ

http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html
Cost Based Oracle: Fundamentals

http://www.jlcomp.demon.co.uk/appearances.html
Public Appearances - schedule updated 2nd Feb 2006

----- Original Message -----
From: "Hameed, Amir" <Amir.Hameed@(protected)>
To: <genegurevich@(protected)>
Sent: Wednesday, February 08, 2006 5:38 PM
Subject: RE: SGA Free memory


This is normal behavior as chunks are flushed from and added to the
shared pool, the memory fluctuates. As long as you are not seeing
ORA-04031 error or contention on the shared pool latch is not too high,
you are fine. What RDBMS version are you on?

-----Original Message-----
From: oracle-l-bounce@(protected)
[mailto:oracle-l-bounce@(protected)
genegurevich@(protected)
Sent: Wednesday, February 08, 2006 12:28 PM
To: oracle-l@(protected)
Subject: Re: SGA Free memory

Hi all:

I am watching the usage of the SGA on my database via the following
command:

select to_char(sysdate,'mm-dd-yyyy hh24:mi:ss'), name, bytes/(1024*1024)
from v$sgastat, dual
where pool like '%shared%' and name = 'free memory' order by bytes asc
;

I am running it every 10 seconds. Recently I saw the free memory going
from
25M to 145M over the course
of 10 sec. I'm wondering what could have caused it. Would appreciate any
suggestions


thank you

Gene Gurevich
Oracle Engineering
224-405-4079



--
http://www.freelists.org/webpage/oracle-l


--
http://www.freelists.org/webpage/oracle-l

--
http://www.freelists.org/webpage/oracle-l