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

Home -> Community -> Usenet -> c.d.o.server -> Re: Keeping an Oracle 8.1.7 SGA in Physical Memory on Solaris 8

Re: Keeping an Oracle 8.1.7 SGA in Physical Memory on Solaris 8

From: Pete Finnigan <pete_at_peterfinnigan.demon.co.uk>
Date: Fri, 31 Aug 2001 10:05:29 +0100
Message-ID: <JqwXyUAZN1j7Ew+l@peterfinnigan.demon.co.uk>


Sorry forgot to add the C program needs to be setuid root.

Pete

In article <973KGJAE+0j7EwJF_at_peterfinnigan.demon.co.uk>, Pete Finnigan <pete_at_peterfinnigan.demon.co.uk> writes
>Hi
>
>I have done this before. LOCK_SGA does not work on solaris unless you
>run the Oracle exe as root, as no one but root can lock shared memory
>segments. Use_ism did not use to work correctly , not sure what version
>of oracle, support told us to turn it off at one point. use_ism is not
>the same as locking shared memory segments in core though.
>
>If you are looking to lock shared memory i take it you are having paging
>issues. Check vmstat and search on google or whatever to read about
>priority paging and what are real page in's and outs.
>
>You should also look at the "priority paging" mechanism used in solaris.
>
>add the parameter priority_paging=1 to your /etc/system This will stop
>the kernel grabbing all the free kernel memory.
>
>To lock the sga in core you need a simple C program as follows
>
>#include <sys/types.h>
>#include <sys/ipc.h>
>#include <sys/shm.h>
>#include <errno.h>
>main(int argc,char **argv)
>{
> int sh;
> int result;
>
> sh=atol(argv[1]);
> printf("locking id %d into core\n",sh);
> result=shmctl(sh,SHM_LOCK,(struct shmid_ds *)0);
> if (result==0)
> {
> printf("Locked successfully\n");
> }
> else
> {
> perror("Failed to lock");
> }
>}
>
>Then you can call it for each shared memory segment owned by oarcle
>after the instance has been started, using
>
>ipcs -m.
>
>you can put this in a loop and grep for oracle and call the compiled C
>program and run it automatically on startup.
>
>We fixed a major memory issue with priority paging and locking the core
>
>I hope this helps
>
>cheers
>
>Pete Finnigan
>www.pentest-limited.com
>
>In article <20010830.17082600_at_its.charlestoncounty.org>, Peter Shankey
><shankeyp_at_its.charlestoncounty.org> writes
>>Oracle has an parameter called LOCK_SGA which will lock the memory the
>>SGA uses into physical memory. I saw a tech note on metalink.oracle.com
>>but it applied to HPUX. The error I get on Solaris is:
>>
>>Connected to:
>>Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
>>With the Partitioning option
>>JServer Release 8.1.7.0.0 - Production
>>
>>SQL> shutdown immediate
>>Database closed.
>>Database dismounted.
>>ORACLE instance shut down.
>>SQL> startup
>>ORA-27126: unable to lock shared memory segment in core
>>SVR4 Error: 1: Not owner
>>SQL>
>>
>>My question is how do or can I configure the OS to do this, and has
>>anyone had bad experiences doing this?
>>
>>My situation is I have a couple of test Oracle instances and a couple of
>>product one. I want the production instances to get the memory.
>>Unfortunately I am maxed on memory.
>>
>>Pete
>

-- 
Pete Finnigan
IT Security Consultant
PenTest Limited

Office  01565 830 990
Fax     01565 830 889
Mobile  07974 087 885

pete.finnigan_at_pentest-limited.com

www.pentest-limited.com
Received on Fri Aug 31 2001 - 04:05:29 CDT

Original text of this message

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