From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 18 09:45:29 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F35F2B8; Mon, 18 Nov 2013 09:45:29 +0000 (UTC) Received: from mail-la0-x22a.google.com (mail-la0-x22a.google.com [IPv6:2a00:1450:4010:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6CB2C2B7D; Mon, 18 Nov 2013 09:45:28 +0000 (UTC) Received: by mail-la0-f42.google.com with SMTP id ec20so4743519lab.1 for ; Mon, 18 Nov 2013 01:45:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=eCr1wXnw9yFHqGiIQpqKOrsD8/+8sHIx1oscnisEvTI=; b=R3P2Hi5Xl8bVdMgLuPr8Xf+unH796luoQ+dzRZKlha/brDuzDT77i7Cc6BVHr9ulog QWVm1qZMFsMvxGEPSIytagRCJbAUUiMV8NlH5muOckXzcqBgdFnRTdX9kEUZXT6cg6V+ jUxSP5Ep8McBkk7EEyGtvRgS/WmSlFdYEPQiafgCHV60JQl1OjY5c/Xa1yper8C+lT8S mMwX7WWGF3pNHEtfBznSTMdNsKn0itMGKSc4Epn/msH+aL6KTnbCWZzPjsdu6AdV9wVi RnbwMyVTKn5nRHEhcsF4fPxd0EaRG28acaRZ7i4t4SkC5gvRrnnGjNQT8NRTYfNTpsh0 LVjg== MIME-Version: 1.0 X-Received: by 10.112.219.99 with SMTP id pn3mr1025787lbc.24.1384767926523; Mon, 18 Nov 2013 01:45:26 -0800 (PST) Sender: rizzo.unipi@gmail.com Received: by 10.114.77.228 with HTTP; Mon, 18 Nov 2013 01:45:26 -0800 (PST) In-Reply-To: <5289DBF9.80004@FreeBSD.org> References: <52894C92.60905@FreeBSD.org> <5289DBF9.80004@FreeBSD.org> Date: Mon, 18 Nov 2013 10:45:26 +0100 X-Google-Sender-Auth: zAs_G8XSv3CVF7664Dac1teoEC8 Message-ID: Subject: Re: UMA cache back pressure From: Luigi Rizzo To: Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.16 Cc: "freebsd-hackers@freebsd.org" , Adrian Chadd , "freebsd-current@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Nov 2013 09:45:29 -0000 On Mon, Nov 18, 2013 at 10:20 AM, Alexander Motin wrote: > On 18.11.2013 10:41, Adrian Chadd wrote: > >> Your patch does three things: >> >> * adds a couple new buckets; >> > > These new buckets make bucket size self-tuning more soft and precise. > Without them there are buckets for 1, 5, 13, 29, ... items. While at bigger > sizes difference about 2x is fine, at smallest ones it is 5x and 2.6x > respectively. New buckets make that line look like 1, 3, 5, 9, 13, 29, > reducing jumps between steps, making algorithm work softer, allocating and > freeing memory in better fitting chunks. Otherwise there is quite a big gap > between allocating 128K and 5x128K of RAM at once. > > just curious (and i do not understand whether the "1, 5 ..." are object sizes in bytes or what), would it make sense to add some instrumentation code (a small array of counters i presume) to track the actual number of requests for exact object sizes, and perhaps at runtime create buckets trying to reduce waste ? Following your reasoning there seems to be still a big gap between some of the numbers you quote in the sequence. cheers luigi