Re: 9i - Dynamic SGA - SGA_MAX_SIZE

2003-08-02 Thread Mladen Gogala
Kirti, problem is in the malloc mechanism. The subroutine to free the memory
doesn't return it to the OS, it returns it to the "allocation pool instead.
As a consequence, when oracle does "free", its address space is not going to 
go down. You realize, of course, that malloc, calloc, realloc and free are the 
only options, because of their portability. There are low level allocation 
routines like brk() to increase the address space, but unaware of any routine
to decrease the address space. Here is the manual page for the library 
subroutine called "mallopt", which is mostly obsolete but still exists on
HP-UX. The mechanism remained the same, but the control was taken away from 
the users. Manual page does illustrate the mechanism, though.
malloc(3C)   malloc(3C)





 NAME
  malloc(), free(), realloc(), calloc(), mallopt(), mallinfo(),
  memorymap() - main memory allocator
 SYNOPSIS
  #include 
  void *malloc(size_t size);

  void *calloc(size_t nelem, size_t elsize);

  void *realloc(void *ptr, size_t size);

  void free(void *ptr);

  void memorymap(int show_stats);

 SYSTEM V SYNOPSIS
  #include 
  char *malloc(unsigned size);

  void free(char *ptr);

  char *realloc(char *ptr, unsigned size);

  char *calloc(unsigned nelem, unsigned elsize);

  int mallopt(int cmd, int value);

  struct mallinfo mallinfo(void);

Remarks
  The functionality in the old malloc(3X) package has been incorporated
  into malloc(3C).  The library (/usr/lib/libmalloc.a) corresponding to
  the -lmalloc linker option is now an empty library.  Makefiles that
  reference this library will continue to work.  Applications that used
  the malloc(3X) package should still work properly with the new
  malloc(3C) package.  If the old versions must be used, they are
  provided in files /usr/old/libmalloc3x.a and /usr/old/libmalloc3c.o
  for Release 8.07 only.
 DESCRIPTION
  The functions described in this manual entry provide a simple,
  general-purpose memory allocation package:
   malloc()   allocates space for a block of at least size
  bytes, but does not initialize the space.
   calloc()   allocates space for an array of nelem elements,
  each of size elsize bytes, and initializes the


 Hewlett-Packard Company- 1 - HP-UX Release 9.0: August 1992





 malloc(3C)   malloc(3C)





  space to zeros.

   realloc()  changes the size of the block pointed to by ptr to
  size bytes and returns a pointer to the (possibly
  moved) block.  Existing contents are unchanged up
  to the lesser of the new and old sizes.  If ptr is
  a NULL pointer, realloc() behaves like malloc()
  for the specified size.  If size is zero and ptr
  is not a NULL pointer, the object it points to is
  freed and NULL is returned.
   free() deallocates the space pointed to by ptr (a pointer
  to a block previously allocated by malloc(),
  realloc(), or calloc()) and makes the space
  available for further allocation.  If ptr is a
  NULL pointer, no action occurs.
   mallopt()  provides for control over the allocation algorithm
  and other options in the malloc(3C) package.  The
  available values for cmd are:
   M_MXFAST   Set maxfast to value.  The
  algorithm allocates all blocks
  below the size of maxfast in
  large groups, then doles them
  out very quickly.  The default
  value for maxfast is zero (0).
   M_NLBLKS   Set numlblks to value.  The
  above mentioned ``large
  groups'' each contain numlblks
  blocks.  numlblks must be
  greater than 1.  The default
  value for numlblks is 100.
   M_GRAINSet grain to value.  The sizes
  of all blocks smaller than
  maxfast are considered to be
  rounded up to the nearest
 

RE: 9i - Dynamic SGA - SGA_MAX_SIZE

2003-08-02 Thread Kirtikumar Deshpande
SGA_MAX_SIZE was introduced in 9i to allow dynamic sizing of SGA (Dynamic Sizing 
feature)
components such as, shared pool, large pool, buffer cache etc. In versions up to 8i, 
such changes
required bouncing the instance. 
This parameter assumes the value of the SGA at instance startup. Various components of 
the SGA can
then be increased/reduced as and when needed. The total SGA, thus, can reach a maximum 
value set
by SGA_MAX_SIZE (if set in the init.ora file). That's the idea. However, the 
implementation is
different on various platforms. With ISM, and DISM, on Solaris, there are other issues 
when it
comes to using Dynamic SGA. You may want to search Metalink for specific 
notes/articles for
Solaris. 
On AIX 5L as I found out, Oracle uses SGA_MAX_SIZE, if set in init.ora, at the 
instanace startup,
and allocates the excess (difference in computed SGA value and set SGA_MAX_SIZE) to 
'variable
size'. Hence there is no room for any dynamic sizing (upward) of any SGA component. I 
did not try
to downsize shared pool first, and 'upsize' buffer cache later. May be that would 
work, but that
is not the intention of using this parameter. 

PGA_AGRREGATE_TARGET is completely different from this parameter. It sets an 
instance-wide upper
limit for the memory used by sorting, hashing processes. 

Hope this helps.. 

- Kirti 
 

--- Mohammed Shakir <[EMAIL PROTECTED]> wrote:
> I am little confused about this issue to. I am working on Oracle
> 9.2.0.3 on Solaris 9 (64 bits) platform. I did not set sga_max_size
> parameter and I see it set. I am not sure what it means and what kind
> of problem it will cause me. 
> 
> I have pga_aggregate_target is set for 512MB and it seems it is not
> counted in this count. I know it is a separate space in the memory.
> Since this is a new system for me, I am little concerned that Oracle
> does not chock on me.
> 
> --- Kirtikumar Deshpande <[EMAIL PROTECTED]> wrote:
> > It does not work as advertised, in AIX either... I played with this
> > in AIX 5L. 
> > 
> > 
> > - Kirti 
> > 
> > 
> > 

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Kirtikumar Deshpande
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).


Re: impersonating another user???

2003-08-02 Thread Pete Finnigan
Hi

I have not tried proxy accounts other than working through the examples
in Tom Kytes book and building the sample OCI proxy code. It sounds a
little strange business practice though. I would personally rather see
the "user" impersonating a manager be granted the privileges directly to
his/her account and then those privileges be removed when the
"impersonation" finishes, that way the "user" generates their own audit
trail and is accountable for their actions. Letting the user have the
managers password and changing that later is another option but that
would leave any audit trail showing that the original manager did it.

The proxy functionality will work for you though and also includes new
proxy entries in the audit trail to show that the underling has been
doing manager things!.

Get hold of Tom Ktyes book or have a look at his asktom site for well
examples samples of how this works.

hth

kind regards

Pete
-- 
Pete Finnigan
email:[EMAIL PROTECTED]
Web site: http://www.petefinnigan.com - Oracle security audit specialists
Book:Oracle security step-by-step Guide - see http://store.sans.org for details.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Pete Finnigan
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).


RE: 9i - Dynamic SGA - SGA_MAX_SIZE

2003-08-02 Thread Mohammed Shakir
I am little confused about this issue to. I am working on Oracle
9.2.0.3 on Solaris 9 (64 bits) platform. I did not set sga_max_size
parameter and I see it set. I am not sure what it means and what kind
of problem it will cause me. 

I have pga_aggregate_target is set for 512MB and it seems it is not
counted in this count. I know it is a separate space in the memory.
Since this is a new system for me, I am little concerned that Oracle
does not chock on me.

--- Kirtikumar Deshpande <[EMAIL PROTECTED]> wrote:
> It does not work as advertised, in AIX either... I played with this
> in AIX 5L. 
> 
> 
> - Kirti 
> 
> 
> --- "Hately, Mike (LogicaCMG)" <[EMAIL PROTECTED]> wrote:
> > Stephen,
> > 
> > The documentation is pretty wooly regarding this issue but the way
> it seems
> > to be intended to work is this:
> > At startup Oracle will allocate an SGA sized as specified in the
> > sga_max_size parameter. This is to ensure that the system has
> enough memory
> > accomodate what you see as a maximum requirement for the SGA.
> > After it's allocated this and started the database it should
> deallocate any
> > memory it holds over and above that required to store the
> components of the
> > SGA. In some platforms/versions this deallocation doesn't occur.
> Solaris for
> > example behaves like this unless you move to version 8. 
> > It's possible that your version of Tru64 has a similar limitation
> or that
> > you're seeing a bug. 
> > To my mind though, Oracle Support's claim that this is expected
> behaviour is
> > a bit of a cop out. This is certainly not the way it was supposed
> to work.
> > The concept guide states the following:
> > 
> > "The SGA can grow in response to a database administrator
> statement, up to
> > an operating system specified maximum and the SGA_MAX_SIZE
> specification."
> > 
> > and 
> > 
> > "Oracle can start instances underconfigured and allow the instance
> to use
> > more memory by growing the SGA components, up to a maximum of
> SGA_MAX_SIZE"
> > 
> > Both of these statements imply that the unused memory is supposed
> to be
> > released back to the operating system.
> > The way that this feature operates on your system it allows you to
> juggle
> > storage backwards and forwards between caches which is still useful
> but not
> > 'what it says on the box'.
> > 
> > I'd ask Oracle under what cirtcumstances this is normal behaviour.
> It's not
> > the way the software is intended to work so maybe it's a platform
> > limitation. 
> > 
> > In order to give you a better idea of what Oracle thinks it's SGA
> is using
> > you can query the following views :
> > 
> >  - V$SGA_CURRENT_RESIZE_OPS: 
> >Information about SGA resize operations that are currently in
> progress. 
> >An operation can be a grow or a shrink of a dynamic SGA
> component.
> >  
> >  - V$SGA_RESIZE_OPS: 
> >Information about the last 100 completed SGA resize operations. 
> >This does not include any operations currently in progress. 
> > 
> >  - V$SGA_DYNAMIC_COMPONENTS: Information about the dynamic
> components in
> > SGA. 
> >This view summarizes information based on all completed SGA
> resize
> > operations since startup. 
> > 
> >  - V$SGA_DYNAMIC_FREE_MEMORY: 
> >Information about the amount of SGA memory available for future
> dynamic
> > SGA resize operations. 
> > 
> > 
> > Hope this helps,
> > Mike Hately
> > 
> > 
> 
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> -- 
> Author: Kirtikumar Deshpande
>   INET: [EMAIL PROTECTED]
> 
> 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: [EMAIL PROTECTED] (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).


=
Mohammed Shakir
CompuSoft, Inc.
11 Heather Way
East Brunswick, NJ 08816-2825
(732) 672-0464 (Cell)
(732) 257-6001 (Home)

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Mohammed Shakir
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a