Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69730 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63194 invoked from network); 21 Oct 2013 12:30:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Oct 2013 12:30:34 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zend.com from 209.85.212.177 cause and error) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.212.177 mail-wi0-f177.google.com Received: from [209.85.212.177] ([209.85.212.177:48697] helo=mail-wi0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/50-60242-86E15625 for ; Mon, 21 Oct 2013 08:30:32 -0400 Received: by mail-wi0-f177.google.com with SMTP id h11so3889947wiv.16 for ; Mon, 21 Oct 2013 05:30:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=gRYfWsoedm1EYA6LQrDmzU6jbNgEt3o+ApxXvW2+h3Q=; b=OC4N8HtRdkdTo4C59ulqqneEI1dZySK9zYkfIcWbc/EHPC5DiYN0FxqitacdS+UyQw Vvif7iGsDclV3pbgBbIQOCgxTnMWBQsLIUjLFNpOy+ymP1MunEHXLXh4MCajlqYWsKfO I7JRlj4P4g06fHjXuF3TZFP+xU48IE7UeVWDyqiS9Y02gYLSVN+iW5iirPCNDa4JuQsD 3bolWHjFQ4SiDSDdgQR6AYsYIuz4DvJUN5k2+wcpKdvOhFpM2nqptHFLH9qtWaN4jqrV l4FPRmvfceYDhRoKnp8zyyeWZirPjm2iWLZRS6uHkmZ5waI2CsvW05YBqyjFryCo6Ouz 6QNQ== X-Gm-Message-State: ALoCoQn/AFNAaktVnMYOGDaRdgmOD5f7Po6GNwUvmE4PdwMBWnfDWR7sM2xbFf6eZiYlmWXkDJZRbX1Txdc/P7xo+Ck91BjCuz9GoxaBIVd87bjJkztQ4qxrU19uJ923rKOpK/fmJoo+ MIME-Version: 1.0 X-Received: by 10.194.82.33 with SMTP id f1mr1307267wjy.83.1382358628993; Mon, 21 Oct 2013 05:30:28 -0700 (PDT) Received: by 10.227.214.144 with HTTP; Mon, 21 Oct 2013 05:30:28 -0700 (PDT) In-Reply-To: References: Date: Mon, 21 Oct 2013 16:30:28 +0400 Message-ID: To: Anatol Belski Cc: Pierre Joye , PHP Internals , Andi Gutmans , Zeev Suraski , Xinchen Hui Content-Type: multipart/alternative; boundary=047d7bb04986089d1004e93f7327 Subject: Re: Fix for bug #50333 From: dmitry@zend.com (Dmitry Stogov) --047d7bb04986089d1004e93f7327 Content-Type: text/plain; charset=UTF-8 Hi, I don't have strong opinion about the patch. I thought malloc() -> emalloc() change might improve PHP performance in general, but unfortunately it doesn't. On the other hand the patch is quite big and introduces source level incompatibility. The patch is not complete. At least it misses this chunk: --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -1396,7 +1396,7 @@ static void init_request_info(fcgi_request *request TSRMLS_DC) } else { SG(request_info).request_uri = env_script_name; } - free(real_path); + efree(real_path); } } else { /* pre 4.3 behaviour, shouldn't be used but provides BC */ It's also much better to use do_alloca() instead of tsrm_do_alloca() (the patch changed them to less efficient emalloc()). May be if you change it, we would see improvement :) As I said, currently, the patch doesn't significantly affect performance of non-thread-safe build on Linux. master patched improvement Blog (req/sec) 106.1 105.1 -0.94% drupal (req/sec) 1660.5 1668.6 0.49% fw (req/sec) 231.7 227.499 -1.81% hello (req/sec) 11828.8 11980.5 1.28% qdig (req/sec) 470 477.3 1.55% typo3 (req/sec) 580.1 579.3 -0.14% wordpress (req/sec) 185.9 188.5 1.40% xoops (req/sec) 130 131.2 0.92% scrum (req/sec) 185.199 185 -0.11% ZF1 Hello (req/sec) 1154.7 1155.2 0.04% ZF2 Test (req/sec) 248.7 250.7 0.80% Thanks. Dmitry. On Fri, Oct 18, 2013 at 7:33 PM, Anatol Belski wrote: > Hi, > > the pull request https://github.com/php/php-src/pull/500 fixing the bug > #50333 is ready to review. Manual tests done so far on linux and windows > in TS and NTS mode with CLI and Apache show no regression. The performance > tests are to be done yet. > > Regards > > Anatol > --047d7bb04986089d1004e93f7327--