Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Mar 1998 11:18:07 -0600 (CST)
From:      "Kent S. Gordon" <kgor@inetspace.com>
To:        shimon@simon-shapiro.org
Cc:        roberto@keltia.freenix.fr, freebsd-hackers@FreeBSD.ORG
Subject:   Re: How do you increase available SYSV shared memory?
Message-ID:  <199803181718.LAA08905@soccer.inetspace.com>
In-Reply-To: <XFMail.980317121310.shimon@simon-shapiro.org> (message from Simon Shapiro on Tue, 17 Mar 1998 12:13:10 -0800 (PST))

next in thread | previous in thread | raw e-mail | index | archive | help

>>>>> "shimon" == Simon Shapiro <shimon@simon-shapiro.org> writes:
I have been thinking of changing Postgres to use mmapped files instead 
of SYSV shared memory.  I think this should allow for larger postgres
configuration without problems of SYSV shared memory.  I am still
looking at what options to use with mmap (I think the options should
be MAP_INHERIT, MAP_HASSEMAPHORE, MAP_SHARED, and possible MAP_ANON,
but I need to look closer at the code).  Is their any documentation of 
what the meaning of the different options except for in the code and
the man page?

  >On 16-Mar-98 Ollivier Robert wrote:
  >> According to Kent S. Gordon:
  >>> What is the current limit on SYSV shared memory?  I looked quickly at
  >>> the kernel sources but could not find what needs to be changed.
  >> 
  >> The following is extracted from my kernel config. file. You can find
  >> similar constant for increasing # of semaphores/message queues.
  >> 
  >> -=-=-=-
  >> options               SYSVSHM
  >> options               SYSVSEM
  >> options               SYSVMSG
  >> options               "SHMMAXPGS=1024"        # 4096 KB of sharable memory
  >
  >This works up to a point.  What about 256MB of shared memory?  512MB?
  >Yes, folks, this IS a valid and useful question.  Hint:  The discussion
  >that will undoubtedly follow, should be diverted to freebsd-database.
  >
  >I managed to get up to about 7,000 PostgreSQL buffers with:
  >
  >in sys/i386/conf:
  >
  >NOMIS-smp:options               "SHMMAX=(SHMMAXPGS*PAGE_SIZE+1)"
  >NOMIS-smp:options               SHMMAXPGS=16385
  >NOMIS-smp:options               SYSVSHM
  >
  >And in sys/i386/include:
  >
  >Index: vmparam.h
  >===================================================================
  >RCS file: /Archives/FreeBSD/FreeBSD-CVS/src/sys/i386/include/vmparam.h,v
  >retrieving revision 1.29
  >diff -c -r1.29 vmparam.h
  >*** vmparam.h   1998/02/23 07:42:40     1.29
  >--- vmparam.h   1998/03/15 19:53:17
  >***************
  >*** 52,58 ****
  >  /*
  >   * Virtual memory related constants, all in bytes
  >   */
  >! #define       MAXTSIZ         (16UL*1024*1024)        /* max text size */
  >  #ifndef DFLDSIZ
  >  #define       DFLDSIZ         (64UL*1024*1024)        /* initial data
  >size lim
  >it */
  >  #endif
  >--- 52,58 ----
  >  /*
  >   * Virtual memory related constants, all in bytes
  >   */
  >! #define       MAXTSIZ         (32UL*1024*1024)        /* max text size */
  >  #ifndef DFLDSIZ
  >  #define       DFLDSIZ         (64UL*1024*1024)        /* initial data
  >size lim
  >it */
  >  #endif
  >***************
  >*** 117,123 ****
  >  
  >  /* virtual sizes (bytes) for various kernel submaps */
  >  #ifndef VM_KMEM_SIZE
  >! #define VM_KMEM_SIZE          (12 * 1024 * 1024)
  >  #endif
  >  
  >  /*
  >--- 117,123 ----
  >  
  >  /* virtual sizes (bytes) for various kernel submaps */
  >  #ifndef VM_KMEM_SIZE
  >! #define VM_KMEM_SIZE          (64 * 1024 * 1024)
  >  #endif
  >  
  >  /*
  >
  >Beyond that, things got ugly.  We need David's input on how to go larger.
  >
  >
  >----------
  >
  >
  >Sincerely Yours, 
  >
  >Simon Shapiro
  >Shimon@Simon-Shapiro.ORG                      Voice:   503.799.2313
  >
  >To Unsubscribe: send mail to majordomo@FreeBSD.org
  >with "unsubscribe freebsd-hackers" in the body of the message
  >
  >

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199803181718.LAA08905>