Re: Mainline kernel OLTP performance update

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: <netdev@...>, <sfr@...>, <matthew@...>, <matthew.r.wilcox@...>, <chinang.ma@...>, <linux-kernel@...>, <sharad.c.tripathi@...>, <arjan@...>, <andi.kleen@...>, <suresh.b.siddha@...>, <harita.chilukuri@...>, <douglas.w.styner@...>, <peter.xihong.wang@...>, <hubert.nueckel@...>, <chris.mason@...>, <srostedt@...>, <linux-scsi@...>, <andrew.vasquez@...>, <anirban.chakraborty@...>
Date: Friday, January 16, 2009 - 3:25 am

On Friday 16 January 2009 18:00:43 Andrew Morton wrote:
wrote:

Well, that fio test showed it was behind SLAB. I just discovered that
yesterday during running these tests, so I'll take a look at that. The
Intel performance guys I think have one or two cases where it is slower.
They don't seem to be too serious, and tend to be specific to some
machines (eg. the same test with a different CPU architecture turns out
to be faster). So I'll be looking into these things, but I haven't seen
anything too serious yet. I'm mostly interested in macro benchmarks and
more real world workloads.

At a higher level, SLAB has some interesting features. It basically has
"crossbars" of queues, that basically provide queues for allocating and
freeing to and from different CPUs and nodes. This is what bloats up
the kmem_cache data structures to tens or hundreds of gigabytes each
on SGI size systems. But it is also has good properties. On smaller
multiprocessor and NUMA systems, it might be the case that SLAB does
better in workloads that involve objects being allocated on one CPU and
freed on another. I haven't actually observed problems here, but I don't
have a lot of good tests.

SLAB is also fundamentally different from SLUB and SLQB in that it uses
arrays to store pointers to objects in its queues, rather than having
a linked list using pointers embedded in the objects. This might in some
cases make it easier to prefetch objects in parallel with finding the
object itself. I haven't actually been able to attribute a particular
regression to this interesting difference, but it might turn up as an
issue.

These are two big differences between SLAB and SLQB.

The linked lists of objects were used in favour of arrays again because of
the memory overhead, and to have a better ability to tune the size of the
queues, and reduced overhead in copying around arrays of pointers (SLQB can
just copy the head of one the list to the tail of another in order to move
objects around), and eliminated the need to have additional metadata beyond
the struct page for each slab.

The crossbars of queues were removed because of the bloating and memory
overhead issues. The fact that we now have linked lists helps a little bit
with this, because moving lists of objects around gets a bit easier.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Mainline kernel OLTP performance update, Nick Piggin, (Fri Jan 16, 2:46 am)
Re: Mainline kernel OLTP performance update, Rick Jones, (Fri Jan 16, 2:11 pm)
Re: Mainline kernel OLTP performance update, Nick Piggin, (Mon Jan 19, 3:43 am)
Re: Mainline kernel OLTP performance update, Rick Jones, (Mon Jan 19, 6:19 pm)
Re: Mainline kernel OLTP performance update, Andrew Morton, (Fri Jan 16, 3:00 am)
Re: Mainline kernel OLTP performance update, Nick Piggin, (Fri Jan 16, 4:59 am)
Re: Mainline kernel OLTP performance update, Nick Piggin, (Fri Jan 16, 3:25 am)
Re: Mainline kernel OLTP performance update, Matthew Wilcox, (Fri Jan 16, 2:55 am)
Re: Mainline kernel OLTP performance update, Zhang, Yanmin, (Fri Jan 16, 3:53 am)
Re: Mainline kernel OLTP performance update, Andi Kleen, (Fri Jan 16, 6:20 am)
Re: Mainline kernel OLTP performance update, Zhang, Yanmin, (Tue Jan 20, 1:16 am)
Re: Mainline kernel OLTP performance update, Christoph Lameter, (Wed Jan 21, 7:58 pm)
Re: Mainline kernel OLTP performance update, Zhang, Yanmin, (Thu Jan 22, 4:36 am)
Re: Mainline kernel OLTP performance update, Pekka Enberg, (Thu Jan 22, 5:15 am)
Re: Mainline kernel OLTP performance update, Zhang, Yanmin, (Thu Jan 22, 5:28 am)
Re: Mainline kernel OLTP performance update, Pekka Enberg, (Thu Jan 22, 5:47 am)
Re: Mainline kernel OLTP performance update, Zhang, Yanmin, (Thu Jan 22, 11:02 pm)
Re: Mainline kernel OLTP performance update, Nick Piggin, (Fri Jan 23, 4:33 am)
Re: Mainline kernel OLTP performance update, Zhang, Yanmin, (Fri Jan 23, 5:02 am)
Re: Mainline kernel OLTP performance update, Pekka Enberg, (Fri Jan 23, 2:52 am)
Re: Mainline kernel OLTP performance update, Pekka Enberg, (Fri Jan 23, 4:06 am)
Re: Mainline kernel OLTP performance update, Zhang, Yanmin, (Fri Jan 23, 4:30 am)
Re: Mainline kernel OLTP performance update, Pekka Enberg, (Fri Jan 23, 5:46 am)
Re: Mainline kernel OLTP performance update, Christoph Lameter, (Fri Jan 23, 11:22 am)
Re: Mainline kernel OLTP performance update, Zhang, Yanmin, (Fri Jan 23, 10:55 pm)
Re: Mainline kernel OLTP performance update, Christoph Lameter, (Mon Jan 26, 1:36 pm)
Re: Mainline kernel OLTP performance update, Zhang, Yanmin, (Sat Jan 31, 10:52 pm)
Re: Mainline kernel OLTP performance update, Pekka Enberg, (Sat Jan 24, 3:36 am)
Re: Mainline kernel OLTP performance update, Zhang, Yanmin, (Thu Feb 12, 1:22 am)
Re: Mainline kernel OLTP performance update, Zhang, Yanmin, (Thu Feb 12, 1:47 am)
Re: Mainline kernel OLTP performance update, Pekka Enberg, (Thu Feb 12, 12:03 pm)
Re: Mainline kernel OLTP performance update, Christoph Lameter, (Thu Feb 12, 11:25 am)
Re: Mainline kernel OLTP performance update, Pekka Enberg, (Thu Feb 12, 12:07 pm)
Re: Mainline kernel OLTP performance update, Pekka Enberg, (Fri Jan 23, 11:31 am)
Re: Mainline kernel OLTP performance update, Christoph Lameter, (Fri Jan 23, 11:55 am)
Re: Mainline kernel OLTP performance update, Pekka Enberg, (Fri Jan 23, 12:01 pm)
Re: Mainline kernel OLTP performance update, Pekka Enberg, (Fri Jan 23, 4:40 am)
Re: Mainline kernel OLTP performance update, Nick Piggin, (Fri Jan 16, 3:06 am)