From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 26 15:34:42 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C000E106568D for ; Thu, 26 Nov 2009 15:34:42 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.27]) by mx1.freebsd.org (Postfix) with ESMTP id 559E58FC08 for ; Thu, 26 Nov 2009 15:34:41 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 22so243265eye.9 for ; Thu, 26 Nov 2009 07:34:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=PDdpojboYvqivuUh8DsByrd610sRW/OEqtRdxzI8gJE=; b=axnqY6fq5SJmhyzGwyBCh/nKLtDrCyU0yuynvPO6SBwkJbaC+TnYQfEKwv2DrzP9Hb CGvuLbiYFXPcDRHcXZ6px7KahKDHKpaNsmHSG3fURclXgaEzRC7SgXmNhd91DqSZAF3o iBLkSjfRv128nhdsiCTVmp7g3OvnSFBKKwbEc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=AXhfnKwt/bmTPo3A/SgW7dzR+hNpPMDajJgaZ2mhl0FLTMfJn41jLnQ7LndK5KUHjv wg1omHqh+aXVS/bSILrpyB9fCyAJ1XoOnSsEUC/A14zJ4jvVw8Gb+IrLXpWHIBOSk1ue UrFxZnms4H7Ldgi5Pu5kRp15uQ9xwdJDZjHtg= MIME-Version: 1.0 Received: by 10.216.87.144 with SMTP id y16mr359605wee.95.1259249681180; Thu, 26 Nov 2009 07:34:41 -0800 (PST) In-Reply-To: <237c27100911260714x2fcb194ew1e6ce11e764efd08@mail.gmail.com> References: <237c27100911260714x2fcb194ew1e6ce11e764efd08@mail.gmail.com> Date: Thu, 26 Nov 2009 10:34:41 -0500 Message-ID: From: Ryan Stone To: Linda Messerschmidt Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: Superpages on amd64 FreeBSD 7.2-STABLE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Nov 2009 15:34:42 -0000 Is squid multithreaded? My first guess would be that you have one thread forking off all of these processes while other threads are still doing work and writing to different parts of the address space. I don't know the details of the superpages implementation but I could definitely see that this could be a problem. When the process is forked off the vm layer has to mark all of the pages in the parent process as copy-on-write. If there are other threads in squid writing to memory in this time, the vm layer will have to allocate a new page of memory for every page that squid writes to. This breaks up the superpage(superpages must be physically contiguous in memory). I don't know if the superpage implementation tries to alleviate this situation at all.