mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Kay Sievers <kay.sievers@vrfy.org>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>
Subject: Re: hackbench regression since 2.6.25-rc
Date: Mon, 17 Mar 2008 15:50:04 +0800	[thread overview]
Message-ID: <1205740204.3215.520.camel@ymzhang> (raw)
In-Reply-To: <Pine.LNX.4.64.0803141400170.28115@schroedinger.engr.sgi.com>

On Fri, 2008-03-14 at 14:06 -0700, Christoph Lameter wrote:
> On Fri, 14 Mar 2008, Zhang, Yanmin wrote:
> 
> > On my 8-core stoakley, there is no such regression. Below data is after 
> > testing.
> 
> I was looking for the details on two slab caches. The comparison of the 
> details statistics is likely very interesting because we will be able to
> see how the doubling of processor counts affects the internal behavior of 
> slub.
I collected more data on 16-p tigerton to try to find the possible relationship
between slub_min_objects and processor number. Kernel is 2.6.25-rc5.

Command\slub_min_objects	|	slub_min_objects=8  |   16  |   32   |  64
-------------------------------------------------------------------------------------
./hackbench 100 process 2000    |  		250second   |	23  |   18.6 |  17.5
./hackbench 200 process 2000	|	      	532         |	44  |   35.6 |  33.5

                                
The first command line will start 4000 processes and the second will start 8000 processes.

As the problemtic slab is kmalloc-512, slub_min_objects=8 is just the default configuration.

Oprofile data shows the ratio of __slab_alloc+__slab_free+add_partial has no difference
between the 2 commandline with the same kernel boot parameters.


slub_min_objects	                                   | 8      |   16   |   32   |  64
--------------------------------------------------------------------------------------------
slab(__slab_alloc+__slab_free+add_partial) cpu utilization | 88.00% | 44.00% | 13.00% | 12%


When slub_min_objects=32, we could get a reasonable value. Beyond 32, the improvement
is very small. 32 is just possible_cpu_number*2 on my tigerton.

It's hard to say hackbench simulates real applications closely. But it discloses a possible
performance bottlebeck. Last year, we once captured the kmalloc-2048 issue by tbench. So the
default slub_min_objects need to be revised. In the other hand, slab is allocated by alloc_page
when its size is equal to or more than a half page, so enlarging slub_min_objects won't create
too many slab page buffers.

As for NUMA, perhaps we could define slub_min_objects to 2*max_cpu_number_per_node.

-yanmin



  reply	other threads:[~2008-03-17  8:02 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-13  7:46 Zhang, Yanmin
2008-03-13  8:48 ` Andrew Morton
2008-03-13  9:28   ` Zhang, Yanmin
2008-03-13  9:52     ` Andrew Morton
2008-03-14  0:16     ` Christoph Lameter
2008-03-14  3:04       ` Zhang, Yanmin
2008-03-14  3:30         ` Zhang, Yanmin
2008-03-14  5:28           ` Zhang, Yanmin
2008-03-14  6:39             ` Christoph Lameter
2008-03-14  7:29               ` Zhang, Yanmin
2008-03-14 21:05                 ` Christoph Lameter
2008-03-14  6:34           ` Christoph Lameter
2008-03-14  7:23             ` Zhang, Yanmin
2008-03-14 21:06               ` Christoph Lameter
2008-03-17  7:50                 ` Zhang, Yanmin [this message]
2008-03-17 17:32                   ` Christoph Lameter
2008-03-18  3:28                     ` Zhang, Yanmin
2008-03-18  4:07                       ` Christoph Lameter
2008-03-14  6:32         ` Christoph Lameter
2008-03-14  7:14           ` Zhang, Yanmin
2008-03-14 21:08             ` Christoph Lameter
2008-03-15  0:15               ` Christoph Lameter
2008-03-17  3:35                 ` Zhang, Yanmin
2008-03-17 17:27                   ` Christoph Lameter
2008-03-17  3:05               ` Zhang, Yanmin
2008-03-13 15:14 ` Greg KH
2008-03-13 16:19   ` Randy Dunlap
2008-03-13 17:12     ` Greg KH
2008-03-14  0:50       ` Zhang, Yanmin
2008-03-14  5:01         ` Greg KH
2008-03-14  5:32           ` Zhang, Yanmin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1205740204.3215.520.camel@ymzhang \
    --to=yanmin_zhang@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=gregkh@suse.de \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome