From owner-freebsd-hackers Wed Mar 18 09:19:00 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA14367 for freebsd-hackers-outgoing; Wed, 18 Mar 1998 09:19:00 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from soccer.inetspace.com (soccer.inetspace.com [206.50.163.48]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA14328 for ; Wed, 18 Mar 1998 09:18:52 -0800 (PST) (envelope-from kgor@soccer.inetspace.com) Received: (from kgor@localhost) by soccer.inetspace.com (8.8.7/8.8.7) id LAA08905; Wed, 18 Mar 1998 11:18:07 -0600 (CST) (envelope-from kgor) Date: Wed, 18 Mar 1998 11:18:07 -0600 (CST) Message-Id: <199803181718.LAA08905@soccer.inetspace.com> From: "Kent S. Gordon" To: shimon@simon-shapiro.org CC: roberto@keltia.freenix.fr, freebsd-hackers@FreeBSD.ORG In-reply-to: (message from Simon Shapiro on Tue, 17 Mar 1998 12:13:10 -0800 (PST)) Subject: Re: How do you increase available SYSV shared memory? Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >>>>> "shimon" == Simon Shapiro 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