Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74923 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84239 invoked from network); 16 Jun 2014 13:19:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jun 2014 13:19:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.220.176 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 209.85.220.176 mail-vc0-f176.google.com Received: from [209.85.220.176] ([209.85.220.176:52031] helo=mail-vc0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/9A-12705-8CEEE935 for ; Mon, 16 Jun 2014 09:19:05 -0400 Received: by mail-vc0-f176.google.com with SMTP id ik5so4805616vcb.7 for ; Mon, 16 Jun 2014 06:19:01 -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=RoYfJoqpasoRmIxR5jk50plaCbu5m1Rx614HCd0rGUk=; b=bDjbNuBFue7YFDMWx/jCY2UQFILFrYi1CX2BijMUZYGBntnoqeWtfwvOSPXkxBGWpz PjnVnI8hSB4jICYonGoV6imTy9BXFbwdkhDD2vGleII0fK3VNdwoNiMtoB4S2qvktqAf TOnmKxysrU+hhNa+bwvWk04ZSL0KRTbDVK5V9EROeX+sE08xN+08QRNBil1kgsj6tPrS yR8zp3E4smQDnC+NMmPtDKS3VBnTYfPA6+O/l88VyJf9ACBIxmwz22SIf036HMwEkzLP 9Gc/0vYR+Yu9d4BklhGkJ6dLSK5aTCj2x90p4fGGn+AyDiuo3r2qob4dBrQyXsc+ZMwp BIPA== X-Gm-Message-State: ALoCoQmowkB7bW1Wxtw2hSVPFXK9Au21lwGRK7gVNZYjG96Re8uCndvwYkzpsA5K9P+jGlww5VcKnau3webe2QldkrW89TOBAqS4lrWpGuZhbS4qjACuAX/jFJz2WhjeTWd0v/KZ3jXA MIME-Version: 1.0 X-Received: by 10.52.23.43 with SMTP id j11mr37119vdf.84.1402924741226; Mon, 16 Jun 2014 06:19:01 -0700 (PDT) Received: by 10.52.111.71 with HTTP; Mon, 16 Jun 2014 06:19:01 -0700 (PDT) In-Reply-To: References: Date: Mon, 16 Jun 2014 17:19:01 +0400 Message-ID: To: Pascal Chevrel Cc: PHP Internals Content-Type: multipart/alternative; boundary=20cf307812d2d912b304fbf3de9c Subject: Re: [PHP-DEV] memory_limit default From: dmitry@zend.com (Dmitry Stogov) --20cf307812d2d912b304fbf3de9c Content-Type: text/plain; charset=UTF-8 hi Pascal, There are few reasons: - PHP applications became more fat. (near everyone now uses some framework) - PHP was optimized to use more memory from controlled memory area instead of system heap - PHP introduced different caches that takes memory in cost of better performance - Some new features increased the size of some basic structures (e.g. zend_class_entry) and it made PHP consume more memory - RAM became much chipper We did some analyzes that time, but I can't remember what exactly. In any case, if you speak about shared hosting, you should configure PHP careful and change the default settings according to amount of available RAM, expected number of PHP processes and expected average memory consumption. Thanks. Dmitry. On Mon, Jun 16, 2014 at 3:50 PM, Pascal Chevrel wrote: > Hi internals people, > > I was curious to know why the memory limit in php.ini was set to 128MB so > I digged into the repository history and I saw that it was bumped from 16MB > to that value in 2006: https://github.com/php/php-src/commit/ > 3ffc1c8f4a1e4c1658f94038e009e226258a65a4#diff- > 299b21e0851494929e62b81e8d91b5b3 > > Since there is no reference to a bug in the commit and I couldn't find > anything about it on the net, I thought I would ask at the source in > internals. > > Was it changed because the defaut value was too low for PHP to work > correctly? Or was the change done to reflect the state of hosting solutions > back then? I am curious to know why 128 and not 64 or 256 actually. If this > is the result of an analysis of the state of hosting, I am also wondering > if 8 years later php.ini settings that depend on hardware like memory are > still the right defaults. > > Thanks for your hindsight on this! > > Pascal > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --20cf307812d2d912b304fbf3de9c--