Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68894 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83203 invoked from network); 5 Sep 2013 09:07:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Sep 2013 09:07:38 -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.212.44 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.212.44 mail-vb0-f44.google.com Received: from [209.85.212.44] ([209.85.212.44:38550] helo=mail-vb0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4F/8A-01925-9D948225 for ; Thu, 05 Sep 2013 05:07:38 -0400 Received: by mail-vb0-f44.google.com with SMTP id e13so922358vbg.17 for ; Thu, 05 Sep 2013 02:07:33 -0700 (PDT) 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=un7mpxn8jOKx1xGhqOlaH5fNxSa1t775tBuUOF5c3xs=; b=sQtSTcKsyKa5ZCrq9xssJfrzifSodHJVj4xiLGo9QoS6bNGPp4qZgpSB150BQbYpcn rXZiTn2H95fQWUNJY0nP7ehnqDPYpvpsZVBZpbPIg/56xPFAP2zTjNpB9Q0iVHuuilAr JkaJMoY2BovDz9mrApd7YkKN7kTiM+M60Z0zQTCf7gWLeuEpOvTgwcMAmT/hiW9wEZNs gqDnwGb+vKjL5suxhIgOiMmg4WhoB+CwpwN9Y79Pn8ORu9+Ji2mJ5HQMy2EuJHZke1yD 22G6tBewKKEgtZfSBPGnpMq+Q+f5FwOQIv2EDgRNT5IZMC2gmxP3nDHAN5+98GIOhLbh k/aw== X-Received: by 10.220.186.202 with SMTP id ct10mr1170292vcb.14.1378372053127; Thu, 05 Sep 2013 02:07:33 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.220.73.197 with HTTP; Thu, 5 Sep 2013 02:06:52 -0700 (PDT) In-Reply-To: References: Date: Thu, 5 Sep 2013 11:06:52 +0200 X-Google-Sender-Auth: rETD9_MMcRLEKLjKGiCOzgW79_4 Message-ID: To: Bostjan Skufca Cc: PHP Internals List Content-Type: multipart/alternative; boundary=047d7b676fd09861c104e59f405d Subject: Re: [PHP-DEV] realpath_cache_size description in php.ini From: jpauli@php.net (Julien Pauli) --047d7b676fd09861c104e59f405d Content-Type: text/plain; charset=ISO-8859-1 On Wed, Sep 4, 2013 at 8:28 PM, Bostjan Skufca wrote: > Hi all, > > there is no description to be found about what the value of > realpath_cache_size actually is. > > Is it > a) max number of files/dirs in the cache or > b) overall cache size? > > I checked php.ini samples distributed with PHP 5.5.3, and documentation > here: > http://php.net/realpath-cache-size > > Can please someone here provide an answer? > Documentation and php.ini update would be nice too :) > This is a little bit complicated. The size represent the total number of bytes in the overall paths stored + some garbage. So if realpath cache stores an entry of say "/tmp/foo/bar.baz", then it will add 16 bytes to the realpath cache size. i.e, the longer the paths, the higher the cache size should be. The formula is located at http://lxr.php.net/xref/PHP_TRUNK/TSRM/tsrm_virtual_cwd.c#643 The realpath_cache_size() PHP function documentation says "Returns how much memory realpath cache is using." , and this is actually true, though it could be more accurate on how this memory is calculated. The realpath_cache_size INI description is "Determines the size of the realpath cache to be used by PHP. This value should be increased on systems where PHP opens many files, to reflect the quantity of the file operations performed." It's not very specific either, I admit. Julien.Pauli --047d7b676fd09861c104e59f405d--