Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 16661 invoked by uid 6000); 23 Nov 1997 20:03:13 -0000 Received: (qmail 16655 invoked from network); 23 Nov 1997 20:03:12 -0000 Received: from valis.worldgate.com (marcs@198.161.84.2) by taz.hyperreal.org with SMTP; 23 Nov 1997 20:03:12 -0000 Received: from localhost (marcs@localhost) by valis.worldgate.com (8.8.7/8.8.7) with SMTP id NAA08266 for ; Sun, 23 Nov 1997 13:03:11 -0700 (MST) Date: Sun, 23 Nov 1997 13:03:11 -0700 (MST) From: Marc Slemko To: TLOSAP Subject: Re: Serious performance issue with 2.2.5-RELEASE (fwd) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org On Sun, 23 Nov 1997, Dean Gaudet wrote: > It actually should round up to the size of a system page, we'd have to > check a few different macros to get it right. But this is probably worth > it because right now we tend to allocate something just over 8k, which > means we're probably wasting 3k+ per block. We can't reliably detect what it should round to no matter how hard we try. It should round to the biggest possible size that will cause malloc to allocate the same amount as it would for the unrounded number. This is more complicated than page size, because some mallocs can do funky things not entirely based on page size. I guess we could get into system-specific behaviours (ie. not just checking macros, but based on external knowledge of how the system acts) if desired, but that gets quite ugly. In any case, I don't think there is any system where doing the below change will hurt because you will never, on any system I could imagine (well, ignore quantum computers...) get better used allocations from 8k + sizeof(union block_hdr) than 8k allocations. Hmm. Making this change results in this: root 23827 5.9 2.5 1364 1148 ?? Ss 12:57PM 0:00.33 /usr/home/marcs/archive/apache/apachen/src/httpd increasing to this: root 23755 1.9 2.4 1376 1132 ?? Ss 12:56PM 0:00.32 /usr/home/marcs/archive/apache/apachen/src/httpd On a system with 2000 name based vhosts and 2000 aliases in the main server config. > > Dean > > On Sun, 23 Nov 1997, Marc Slemko wrote: > > > > > > > ---------- Forwarded message ---------- > > Date: Sun, 23 Nov 1997 11:19:31 +0300 (????) > > From: Dmitry Khrustalev > > To: Jaye Mathisen > > Cc: David Greenman , hackers@freebsd.org > > Subject: Re: Serious performance issue with 2.2.5-RELEASE > > > > > > > > On Sat, 22 Nov 1997, Jaye Mathisen wrote: > > > > > > > > I do not believe so. What ever it is definitely appears related to > > > swapping/paging somehow. > > > > I beleive the following patch to apache should improve situation: > > > > --- alloc.c.old Sun Nov 23 11:15:31 1997 > > +++ alloc.c Sun Nov 23 11:16:34 1997 > > @@ -199,7 +199,8 @@ > > /* Nope. */ > > > > min_size += BLOCK_MINFREE; > > - return malloc_block((min_size > BLOCK_MINALLOC) ? min_size : BLOCK_MINALLOC); > > + return malloc_block((min_size > BLOCK_MINALLOC - sizeof(union block_hdr)) ? > > + min_size : BLOCK_MINALLOC - sizeof(union block_hdr)); > > } > > > > > >