Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Mon, 26 Jul 2004 10:30:46 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Setting SHMMAX in Cygwin Message-ID: <20040726083046.GA732@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <001a01c47281$c8b02070$99280518 AT Gene> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001a01c47281$c8b02070$99280518@Gene> User-Agent: Mutt/1.4.2i On Jul 25 12:58, Gene C. Ruzicka wrote: > 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? Yes. > Further comment: Uncovering this information was somewhat painful. Didn't you read /usr/share/doc/Cygwin/cygserver.README and in turn /etc/cygserver.conf in the first place? The configuration file contains the comment "kern.ipc.shmmaxpgs: Maximum pages available for XSI shared memory." I thought that explains it. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Co-Project Leader mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- 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/