From owner-freebsd-hackers Sat Jul 6 00:57:56 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id AAA29519 for hackers-outgoing; Sat, 6 Jul 1996 00:57:56 -0700 (PDT) Received: from palmer.demon.co.uk (palmer.demon.co.uk [158.152.50.150]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id AAA29495 for ; Sat, 6 Jul 1996 00:57:52 -0700 (PDT) Received: from palmer.demon.co.uk (localhost [127.0.0.1]) by palmer.demon.co.uk (sendmail/PALMER-2) with ESMTP id IAA21010; Sat, 6 Jul 1996 08:57:42 +0100 (BST) To: Tom Bartol cc: hackers@FreeBSD.ORG From: "Gary Palmer" Subject: Re: Shared Memory Questions In-reply-to: Your message of "Sat, 06 Jul 1996 00:22:25 PDT." Date: Sat, 06 Jul 1996 08:57:42 +0100 Message-ID: <21008.836639862@palmer.demon.co.uk> Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Tom Bartol wrote in message ID : > segs in gimp from time to time, but I'd like to be able to choose and tune > the shared memory parameters at will, and to do so with config options if > possible. Or better yet, why can't the kernel just allow these > resources to grow without bound until RAM and VM are exhausted? If you read param.c: /* * Values in support of System V compatible shared memory. XXX */ #ifdef SYSVSHM #ifndef SHMMAX #define SHMMAX (SHMMAXPGS*NBPG) #endif [etc, etc] In other words, if you put an option in your kernel configuration file saying: options "SHMMAX=1024" (or whatever), then that'll over-ride the value calculated in param.c. This does allow you to specify the values at config-time, rather than hard-coding them. In answer to your second question, in /sys/i386/i386/machdep.c, kernel memory is pre-allocated during boot time to handle the SYS V IPC primitives (they need contiguous memory?). I'm also betting that the user-land applications would be mightily confused by dynamic memory areas. > So, the bottom line is this -- can any of you give some advice on how to > tune shared memory in FreeBSD? Are these numbers meant to be hard coded > and un-tweekable? Can it be done at all? I really know next to nothing > about shared memory and any help you can give would be greatly > appreciated (virtual beers etc...) :) Sorry, can't help with the virtual beers. I don't drink :-) Gary -- Gary Palmer FreeBSD Core Team Member FreeBSD: Turning PC's into workstations. See http://www.FreeBSD.ORG/ for info