Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65909 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43715 invoked from network); 18 Feb 2013 20:35:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Feb 2013 20:35:27 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.220.41 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.220.41 mail-pa0-f41.google.com Received: from [209.85.220.41] ([209.85.220.41:61207] helo=mail-pa0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F7/B1-34654-E8092215 for ; Mon, 18 Feb 2013 15:35:27 -0500 Received: by mail-pa0-f41.google.com with SMTP id fb11so2976013pad.14 for ; Mon, 18 Feb 2013 12:35:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding:x-gm-message-state; bh=z6wlz7TcnyU2iPKoibVoDohzSj8X8WSpzqpoWyc++a8=; b=pfG2bvsaPOgQZZQNLlb3vNPKyL0hd7n41OKZbys3YVsSRrRBff5tRjXs77GoSvQraq fzRNW7hnvqIuLsPG7cvJy+9qsqTCPOoYsAJ2MHQGanawHCZDOe72i7L/rvN8rPfkcK8D 3ldS5lqJjq5EeVioHI5xtyJ1XxJxg6TenUb5i+S7z531UMbTd9Nt0KG8rnkWTydzR5AB G+8mgcAPJLHtYTg63Yy2l46nrE07gbQSg+dcuRFW8KBJAJrSjlJ5v4lF5fGNic/9LZfC oczzJd8RXp8ya1kyV8+1n76DJ35FAU2nZZWEHuDXTnQ1/0/Z4pcrMUuAG0LVAp5Pc5jm cTsg== X-Received: by 10.68.237.165 with SMTP id vd5mr33436137pbc.52.1361219722808; Mon, 18 Feb 2013 12:35:22 -0800 (PST) Received: from [192.168.200.148] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPS id az3sm15441785pbd.23.2013.02.18.12.35.21 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 Feb 2013 12:35:22 -0800 (PST) Message-ID: <51229088.90306@lerdorf.com> Date: Mon, 18 Feb 2013 12:35:20 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: Brendon Colby CC: internals@lists.php.net References: In-Reply-To: X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQnNCQ26ls9mzskP+zxup4DzzHk4K6eP+XL4oD/aFqnvWMvMjZWrDQSPecpHfsloRnngGf0e Subject: Re: [PHP-DEV] PHP causing high number of NFS getattr operations? From: rasmus@lerdorf.com (Rasmus Lerdorf) On 02/18/2013 12:26 PM, Brendon Colby wrote: > Rasmus said: > > "Just because you see an open() syscall doesn't mean the cache isn't > used. The open() is there because PHP by default does open+fstat for > performance reasons. If you look carefully you will see there is just > an open() and no read() calls. So it opens the file, uses the stat > struct from the open fd to get the inode and fetches the op_array from > the opcode cache. This can be made more efficient, but this report is > incorrect in assuming the cache isn't being used." > > This is exactly what I'm seeing when I strace an httpd process - > mostly open() and fstat() calls w/o any read() calls. This makes sense > to me, however, the problem with this is as far as I understand it, > that an open() on an NFS file system causes an automatic gettattr() > call to the server. Doing this completely bypasses the NFS attribute > cache, which is why we're seeing so many getattr requests to our NFS > server despite having an attribute cache timeout of 60 seconds. For > those familiar with NFS, we could just as well disable our attribute > cache at this point, which is almost never recommended because of > performance reasons. Wow, people are still serving web files over NFS? Sounds painful. But, this is what APC's apc.include_once_override setting tries to address. Try turning that on. -Rasmus