Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757908Ab2JQUy1 (ORCPT ); Wed, 17 Oct 2012 16:54:27 -0400 Received: from va3ehsobe002.messaging.microsoft.com ([216.32.180.12]:39051 "EHLO va3outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757894Ab2JQUy0 (ORCPT ); Wed, 17 Oct 2012 16:54:26 -0400 X-Forefront-Antispam-Report: CIP:160.33.194.229;KIP:(null);UIP:(null);IPV:NLI;H:usculsndmail02v.am.sony.com;RD:mail02.sonyusa.com;EFVD:NLI X-SpamScore: -6 X-BigFish: VPS-6(zzbb2dI98dI9371I936eI146fI1432Izz1202h1d1ah1d2ahzzz2fh2a8h668h839h93fhd25hf0ah107ah1288h12a5h12a9h12bdh137ah13b6h1441h1155h) Message-ID: <507F1BF4.6040209@am.sony.com> Date: Wed, 17 Oct 2012 13:58:28 -0700 From: Tim Bird User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 MIME-Version: 1.0 To: Eric Dumazet CC: Ezequiel Garcia , David Rientjes , Andi Kleen , Linux Kernel Mailing List , "linux-mm@kvack.org" , "celinux-dev@lists.celinuxforum.org" Subject: Re: [Q] Default SLAB allocator References: <1350392160.3954.986.camel@edumazet-glaptop> <507DA245.9050709@am.sony.com> <1350414968.3954.1427.camel@edumazet-glaptop> <507EFCC3.1050304@am In-Reply-To: <1350501217.26103.852.camel@edumazet-glaptop> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-OriginatorOrg: am.sony.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2922 Lines: 77 On 10/17/2012 12:13 PM, Eric Dumazet wrote: > On Wed, 2012-10-17 at 11:45 -0700, Tim Bird wrote: > >> 8G is a small web server? The RAM budget for Linux on one of >> Sony's cameras was 10M. We're not merely not in the same ballpark - >> you're in a ballpark and I'm trimming bonsai trees... :-) >> > > Even laptops in 2012 have +4GB of ram. > > (Maybe not Sony laptops, I have to double check ?) > > Yes, servers do have more ram than laptops. > > (Maybe not Sony servers, I have to double check ?) I wouldn't know. I suspect they are running 4GB+ like everyone else. >>> # grep Slab /proc/meminfo >>> Slab: 351592 kB >>> >>> # egrep "kmalloc-32|kmalloc-16|kmalloc-8" /proc/slabinfo >>> kmalloc-32 11332 12544 32 128 1 : tunables 0 0 0 : slabdata 98 98 0 >>> kmalloc-16 5888 5888 16 256 1 : tunables 0 0 0 : slabdata 23 23 0 >>> kmalloc-8 76563 82432 8 512 1 : tunables 0 0 0 : slabdata 161 161 0 >>> >>> Really, some waste on these small objects is pure noise on SMP hosts. >> In this example, it appears that if all kmalloc-8's were pushed into 32-byte slabs, >> we'd lose about 1.8 meg due to pure slab overhead. This would not be noise >> on my system. > I said : > > > I would remove small kmalloc-XX caches, as sharing a cache line > is sometime dangerous for performance, because of false sharing. > > They make sense only for very small hosts > > > I think your 10M cameras are very tiny hosts. I agree. Actually, I'm currently doing research for items with smaller memory footprints that this. My current target is devices with 4M RAM and 8M NOR flash. Undoubtedly this is different than what a lot of other people are doing with Linux. > Using SLUB on them might not be the best choice. Indeed. :-) I'm still interested in the dynamics of the slab sizes and how it impacts performance, how much memory is wasted, etc. I think there are a few "power-of-two-and-a-half" kmalloc slabs (e.g. kmalloc-192). Are these configurable anywhere? Anyway, I greatly appreciate the discussion. > First time I ran linux, years ago, it was on 486SX machines with 8M of > memory (or maybe less, I dont remember exactly). But I no longer use > this class of machines with recent kernels. I ran a web server on an 8M machine that had an uptime of over 2 years, but that was in the mid-90's. Ahhh - those were the days... -- Tim ============================= Tim Bird Architecture Group Chair, CE Workgroup of the Linux Foundation Senior Staff Engineer, Sony Network Entertainment ============================= -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/