From owner-freebsd-current@FreeBSD.ORG Thu Nov 20 04:20:23 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 681DC1065674 for ; Thu, 20 Nov 2008 04:20:23 +0000 (UTC) (envelope-from channa.kad@gmail.com) Received: from mail-gx0-f12.google.com (mail-gx0-f12.google.com [209.85.217.12]) by mx1.freebsd.org (Postfix) with ESMTP id B922E8FC1B for ; Thu, 20 Nov 2008 04:20:21 +0000 (UTC) (envelope-from channa.kad@gmail.com) Received: by gxk5 with SMTP id 5so322684gxk.19 for ; Wed, 19 Nov 2008 20:20:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=nsdzhwUqDD57rBxHEbVfJVGUa+EL6WPngJUhalImvQM=; b=emSKtis+qJ/IBYkYReF9ay1BsERJTAclX+xjwgmCBH8HnA20XOoX9x/sOt8Qffnjzz vsiwnIryPh8vGh3/MhAa2LLgFMAQSD8FYnqIjTczDDpo9AGsXRp393KJBYLpSHBPezHX TIgHpiUDMeQbLs+85wZ+lKHd0d0O4ebQRa+IU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=cbeLiPOkio/5LEVI+oP6ihYE6ruNr+TUg9CZ0xn+znEtwcCcw0R42VbUvqWcdncWx3 6AXjOjuod3v23atEnLQy+8ct8jzd/+qrFs18O5HGyf0dvqCa5hBZB3vdSEcXEznWFXMQ fH+p6XuykTW4f4kzL3m2kCEpaiYHi32CA7Zsc= Received: by 10.65.153.10 with SMTP id f10mr1656121qbo.70.1227154820750; Wed, 19 Nov 2008 20:20:20 -0800 (PST) Received: by 10.64.156.4 with HTTP; Wed, 19 Nov 2008 20:20:20 -0800 (PST) Message-ID: <515c64960811192020m18488aa5l68d15fbaf5d2444@mail.gmail.com> Date: Thu, 20 Nov 2008 09:50:20 +0530 From: Channa To: "Ivan Voras" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <515c64960811190604w4f22e5a0ta4ed07323fcb697d@mail.gmail.com> <515c64960811190656i5b103d15s44b0a35a6b9455e@mail.gmail.com> Cc: freebsd-current@freebsd.org Subject: Re: FreeBSD performance on single CPU. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Nov 2008 04:20:23 -0000 Hi, Yes i have recompiled the libc after removing the MALLOC_DEBUG. I am trying to compare with the linux malloc performance (i.e. glibc malloc). I want to use the FreeBSD malloc in my own library so after putting it in my own library i am comparing with linux malloc performance with the freebsd malloc. I compared without changing the request and the size too but i could not observe the performance of freeBSD malloc to be same as the mailing list link i gave you in the first mail. So my doubt whether freeBSD malloc should show the same performance on single CPU? Thanks in Advance, Channa 2008/11/19 Ivan Voras : > Channa wrote: >> Hi, >> Thank you very much for your information. >> >> I am using current implementation of FreeBSD malloc. >> I am checking the performance on single CPU machine. >> >> I am using it in my own environment i am not using FreeBSD7.0. >> >> I disabled the MALLOC_DEBUG option in the malloc implementaton >> and checked the performance i see no difference the results are the same. >> >> ./mallco-test >> Starting test... >> Thread -1101005488 adjusted timing: 4.495931 seconds for 1000000 >> requests of 512 bytes. >> >> Could please tell me if anything else needs to be changed.? > > Yes, you need to disable kernel debugging also. (you have recompiled > libc after removing MALLOC_DEBUG, right?). > > Also, it looks like your comparisons have problems. You are changing the > number of requests and request size. > > Finally, to what are you actually comparing the malloc performance to? > Why are you trying to benchmark it? > > >> 2008/11/19 Ivan Voras : >>> Channa wrote: >>>> Hi, >>>> >>>> I am using FreeBSD malloc from the current working branch. >>>> I hope its jemalloc. >>>> >>>> I tested it on a single CPU machine i could get the following results >>>> >>>> # ./malloc-test 1024 10000000 4 >>>> >>>> Starting test... >>>> Thread -1096811184 adjusted timing: 102.369100 seconds for 10000000 >>>> requests of 1024 bytes. >>>> Thread -1101005488 adjusted timing: 103.212512 seconds for 10000000 >>>> requests of 1024 bytes. >>>> Thread -1098908336 adjusted timing: 103.491399 seconds for 10000000 >>>> requests of 1024 bytes. >>>> Thread -1094714032 adjusted timing: 103.605124 seconds for 10000000 >>>> requests of 1024 bytes. >>>> >>>> I checked the result in the FreeBSD mailing list link given below: >>>> >>>> http://unix.derkeiler.com/Mailing-Lists/FreeBSD/current/2005-12/msg00294.html >>>> >>>> The jemalloc gives very good results. Is that the performance is good >>>> only on SMP? >>>> >>>> Or on single processor also it should perform well? >>>> >>>> But on single CPU i could see bad results. >>>> >>>> Could anyone help me out? >>> Your message is not very clear but here are some things that might help you: >>> >>> 1) -CURRENT has debugging enabled both in kernel and in malloc. You need >>> to disable both before benchmarking anything. >>> 2) According to the post you linked, jemalloc should be 1.1 times faster >>> for single-threaded processes than phkmalloc, on that particular >>> benchmark. This benefit will probably also be visible on single-CPU >>> machines. >>> 3) You don't need to run -CURRENT to get jemalloc - it is also prosent >>> in 7.0. >>> >>> >> _______________________________________________ >> freebsd-current@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >> > >