delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/07/25/15:51:45

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <001a01c47281$c8b02070$99280518@Gene>
From: "Gene C. Ruzicka" <gcruzicka AT comcast DOT net>
To: <cygwin AT cygwin DOT com>
Subject: Setting SHMMAX in Cygwin
Date: Sun, 25 Jul 2004 12:58:40 -0700
MIME-Version: 1.0
X-IsSubscribed: yes

A code I'm porting to Cygwin requires tuning the
size of the shareable memory segment to obtain
optimal performance.  I am using cygserver to
access IPC utilities.  

cygserver.conf doesn't allow one to set the maximum shareable 
segment size, SHMMAX directly.  Instead, it seems SHMMAX
is set in this code fragment in function shminit in cygserver:

 int i;
 TUNABLE_INT_FETCH("kern.ipc.shmmaxpgs", &shminfo.shmall);
 for (i = PAGE_SIZE; i > 0; i--) {
  shminfo.shmmax = shminfo.shmall * PAGE_SIZE;
  if (shminfo.shmmax >= shminfo.shmall)
   break;
 }

Thus, SHMMAX = SHMMAXPGS*PAGE_SIZE , in which
SHMMAXPGS is configurable in cygserver.conf, and PAGE_SIZE
is the system's page size.  So, this suggests that if you have to set
SHMMAXPGS in order to set SHMMAX. Is this correct?

Further comment: Uncovering this information was somewhat painful.
I searched the high and low through the cygwin
mailing list archives and google, but couldn't find documentation
anywhere on how to set SHMMAX.  Since I suspect there are
others who might be interested in setting SHMMAX, may I suggest
documenting the procedure by adding some lines to cygserver.conf?
I volunteer to upgrade and deliver the unit. Of course, this assumes that the 
procedure has not actually been documented.

Gene C. Ruzicka

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019