From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail202.messagelabs.com (mail202.messagelabs.com [216.82.254.227]) by kanga.kvack.org (Postfix) with SMTP id 890306B0217 for ; Fri, 26 Mar 2010 14:47:22 -0400 (EDT) Date: Fri, 26 Mar 2010 13:44:23 -0500 (CDT) From: Christoph Lameter Subject: Re: [PATCH 00 of 41] Transparent Hugepage Support #15 In-Reply-To: <20100326182311.GD5825@random.random> Message-ID: References: <20100326182311.GD5825@random.random> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org To: Andrea Arcangeli Cc: linux-mm@kvack.org, Andrew Morton , Marcelo Tosatti , Adam Litke , Avi Kivity , Izik Eidus , Hugh Dickins , Nick Piggin , Rik van Riel , Mel Gorman , Dave Hansen , Benjamin Herrenschmidt , Ingo Molnar , Mike Travis , KAMEZAWA Hiroyuki , Chris Wright , bpicco@redhat.com, KOSAKI Motohiro , Balbir Singh , Arnd Bergmann , "Michael S. Tsirkin" , Peter Zijlstra , Johannes Weiner List-ID: On Fri, 26 Mar 2010, Andrea Arcangeli wrote: > BTW, unfortunately according to tons of measurements done so far, SLUB > is too slow on most workstations and small/mid servers (usually single > digits but in some case even double digits percentage slowdowns > depending on the workload, hackbench tends to stress it the > most). It's a tradeoff between avoiding wasting tons of ram on > 1024-way and running fast. Either that or something's wrong with SLUB > implementation (and I'm talking about 2.6.32, no earlier code). I'd > also like to save memory so it'd be great if SLUB can be fixed to > perform faster! The SLUB fastpath is the fastest there is. Problems arise because of locality constraints in SLUB. SLAB can throw gobs of memory at it to guarantee a high cache hit rate but to cover all angles on NUMA requires to throw the gobs multiple times. The weakness is SLUBs free functions which frees the object directly to the slab page instead of running through a series of caching structures. If frees occur to locally dispersed objects then SLUB is at a disadvantage since its hitting cold cache lines for metadata on free. On the other hand SLUB hands out objects in a locality aware fashion and not randomly from everywhere like SLAB. This is certainly good to reduce TLB pressure. Huge pages would accellerate SLUB since more objects can be served from the same page than before. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org