Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71124 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17058 invoked from network); 14 Jan 2014 18:22:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jan 2014 18:22:11 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-ob0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:38881] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 63/13-33466-35085D25 for ; Tue, 14 Jan 2014 13:22:11 -0500 Received: by mail-ob0-f170.google.com with SMTP id uy5so7635932obc.15 for ; Tue, 14 Jan 2014 10:22:08 -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:from:date:message-id :subject:to:cc:content-type; bh=CMQhnIc995e78+JsWsk4BianYuFYIDlUT0GD9drBALc=; b=lTjYKB6oop2gAljh4SUTmkBewFgANPwCcL/JikehIqneMnxpGV1uneh7pePOI1BncR xp4ixgPZWbsorG7Y0FglyKiBYOR0RM69Hno7Bpxe9NzVpvl6iWW4mVabV7TmyaiKAAkd Mav0w5w5fXtjOE9M49dPLeULZxci+Na+9Xp6M3DpHivO1mgN36LSGcL6yFi6AtC1iUWi 6SHwcxGgy3CC9NvqAeT6o0swAyihguYXxi3HRInsxXVkpL7IziP+J4YPsZed8u+3xqs+ 2eOwFbzBPvXPORYPRH1WWq7zg4m6qzJCo+ViR30u96b47Z7wkFRqq45jb0mAC5PHYQjc 5org== X-Received: by 10.182.241.8 with SMTP id we8mr2281993obc.62.1389723728720; Tue, 14 Jan 2014 10:22:08 -0800 (PST) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.182.235.46 with HTTP; Tue, 14 Jan 2014 10:21:28 -0800 (PST) In-Reply-To: References: Date: Tue, 14 Jan 2014 19:21:28 +0100 X-Google-Sender-Auth: Y46G7wV7l1Nt69dcc_gdW-Wnw4Y Message-ID: To: Dmitry Stogov Cc: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] New Memory Manager From: jpauli@php.net (Julien Pauli) On Tue, Jan 14, 2014 at 5:45 PM, Dmitry Stogov wrote: > Of course I tried to plug jemalloc and tcmalloc but they make slowdown > instead of speedup, mainly because zend_alloc was especially designed for > PHP and also because they suffer from multi-threading support overhead. On > the other hand profiling PHP with oprofile I saw a lot of cache misses in > zend_alloc.c, especially because of linked list handling. So I tried to > combine the best from all approaches and then spend a couple of week tuning > it. > > Thanks. Dmitry. > Yes, I was reading the great job you've done so far ! Looking forward in testing this myself and why not fix bugs or give some more ideas :-) Anyway, the different pool sizes is nice. We already got an idea like this in ZendMM with the "small free block" VS "free block" linked lists, but the implementation you've done so far is pretty nice evolution. I think we can improve stuff by studying more accurate caches for frequently used C-objects such as zvals or zend_object's structures. So many ideas, glad to see you're having fun with them ;-) Julien.P