From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 2 21:27:33 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D68D516A4CE; Sun, 2 Nov 2003 21:27:33 -0800 (PST) Received: from bluebox.CS.Princeton.EDU (bluebox.CS.Princeton.EDU [128.112.136.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id B43F843FB1; Sun, 2 Nov 2003 21:27:32 -0800 (PST) (envelope-from vivek@CS.Princeton.EDU) Received: from cs.princeton.edu (oakley [128.112.139.27]) (authenticated bits=0)hA35RSFU025673 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT); Mon, 3 Nov 2003 00:27:29 -0500 (EST) Message-ID: <3FA5E740.6050704@cs.princeton.edu> Date: Mon, 03 Nov 2003 00:27:28 -0500 From: Vivek Pai User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020920 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Schultz References: <1066789354.21430.39.camel@boxster.onthenet.com.au> <20031022082953.GA69506@rot13.obsecurity.org> <1066816287.25609.34.camel@boxster.onthenet.com.au> <20031022095754.GA70026@rot13.obsecurity.org> <1066820436.25609.93.camel@boxster.onthenet.com.au> <20031026052854.GA20701@VARK.homeunix.com> <3FA2C63C.5000900@cs.princeton.edu> <20031103052010.GA71583@VARK.homeunix.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: "=?us-ascii@FreeBSD.ORG: iso-8859-1?Q?Sm=F8rgrav?=" cc: Kris Kennaway cc: Q cc: freebsd-hackers@FreeBSD.ORG cc: Dag-Erling@FreeBSD.ORG Subject: Re: Some mmap observations compared to Linux 2.6/OpenBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Nov 2003 05:27:34 -0000 David Schultz wrote: > > Okay, I guess SpecWeb99 is ``real world'' enough for me to justify > the assertion that there is an mmap() performance problem. Just > out of curiosity, how many regions did SpecWeb99 map? > (i.e. what does 'dd if=/proc/$pid/map bs=64k count=1 | wc -l' give?) The SpecWeb99 benchmark is self-scaling - the higher request rate you try to achieve, the more files are included in the data set. It's entirely up to the server to decide how to go about dealing with the data, and the Flash server used to keep a cache of mmap'd regions. Files smaller than 64KB were mapped as a single region, while larger files were broken into 64KB pieces, basically to avoid exhausting the address space. For the kinds of throughputs that we achieve, we're dealing with about 13,000 files. We probably had a number of regions somewhere in that ballpark, but I don't have a free machine at the moment to give you an exact number. Our new server basically gave up on using mapped files entirely due to the problems with scaling to larger memory sizes - that's why I'm pushing for the sendfile changes I mentioned in a different mail. -Vivek