lkml.org 
[lkml]   [1999]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateSat, 28 Aug 1999 12:07:05 -0400 (EDT)
FromSteve Willer <>
SubjectRe: Oracle and Linux (hand in hand)

On Sat, 28 Aug 1999, Matthew wrote:

> I've read tuning tips wrt Oracle on Linux. Most say to increase SHMMAX and the
> semaphores. I ask you this, what _real_ difference does it make? Am I going
> to be able to see the difference on a VA3500 (quad pent III 550,512M RAM)? I'd
> much rather use a stock kernel, but I'll hack for the good of my users.

If my experience with Sybase is any guide, then the effect of increasing
SHMMAX is it might make your DB run. There's no performance issue there;
it needs to be able to allocate huge amounts of shared memory (whatever
you have it configured for). Please note that in order to *reference* lots
of shared memory, you need to increase _SHM_IDX_BITS; if you don't, then
your DB will be able to allocate the shared memory but will crash when it
starts accessing the end bits.

I use the attached patch for a DB server with 1GB RAM. I think it let me
configure up to 885MB shared memory size on Sybase. There are no negative
side-effects other than that you can have fewer shared memory segments
(you have to trade number of segments for max size of segments).
diff -u --recursive linux-2.2.8-dist/include/asm-i386/shmparam.h linux/include/asm-i386/shmparam.h
--- linux-2.2.8-dist/include/asm-i386/shmparam.h Sun Nov 8 17:06:18 1998
+++ linux/include/asm-i386/shmparam.h Fri Jun 4 17:55:03 1999
@@ -21,11 +21,11 @@
* Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and
* there is a static array of size SHMMNI.
*/
-#define _SHM_ID_BITS 7
+#define _SHM_ID_BITS 5 /* maximum of 32 segments */
#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1)

#define SHM_IDX_SHIFT (_SHM_ID_BITS)
-#define _SHM_IDX_BITS 15
+#define _SHM_IDX_BITS 19 /* maximum 524288 pages/segment (page=4K on ia32) */
#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1)

/*
@@ -33,7 +33,7 @@
* SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS).
*/

-#define SHMMAX 0x2000000 /* max shared seg size (bytes) */
+#define SHMMAX 0x7FFFE000 /* max shared seg size (bytes) (2GB) */
/* Try not to change the default shipped SHMMAX - people rely on it */

#define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */
\
 
 \ /
  Last update: 2005-03-22 13:53    [from the cache]
©2003-2010