Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-22 Thread Terry Ellison
On 19/02/13 01:30, Kevin Yung wrote: In our environment, we use NFS for shared storage, we are using APC as well with stat=0. In our setting, we also experiencing high number of stat() calls on our file system. My initial finding of this problem is we enabled the open_basedir setting. And there i

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-22 Thread Ferenc Kovacs
On Fri, Feb 22, 2013 at 1:52 PM, Terry Ellison wrote: > On 22/02/13 11:20, Ferenc Kovacs wrote: > > > My challenge is deciding (i) do I work on PHP 5.6 / 5.7 and the >> corresponding beta APC version which at current rates of adoption might >> have begin to have an impact in the community somet

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-22 Thread Terry Ellison
On 22/02/13 11:20, Ferenc Kovacs wrote: My challenge is deciding (i) do I work on PHP 5.6 / 5.7 and the corresponding beta APC version which at current rates of adoption might have begin to have an impact in the community sometime in the next 5 years, or (ii) work on a performanc

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-22 Thread Ferenc Kovacs
> My challenge is deciding (i) do I work on PHP 5.6 / 5.7 and the > corresponding beta APC version which at current rates of adoption might > have begin to have an impact in the community sometime in the next 5 years, > or (ii) work on a performance patch to the stable APC version which is > typica

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-22 Thread Terry Ellison
Ramus, thanks for your detailed response. NFS is so common for sharing files that ... This is simply not true. I do have a fair bit of experience in this field, and I don't know of any major sites that do this and I have worked with a good chunk of the largest sites out there. Eh??? Fortune 50

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-21 Thread Rasmus Lerdorf
On 02/21/2013 04:41 PM, Terry Ellison wrote: > On 21/02/13 23:38, Rasmus Lerdorf wrote: >> On 02/21/2013 03:15 PM, Brendon Colby wrote: >> >>> NFS is so common for sharing files that saying "Wow, people are still >>> serving web files over NFS?" is like saying "Wow, people are still >>> using the l

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-21 Thread Terry Ellison
On 21/02/13 23:38, Rasmus Lerdorf wrote: On 02/21/2013 03:15 PM, Brendon Colby wrote: NFS is so common for sharing files that saying "Wow, people are still serving web files over NFS?" is like saying "Wow, people are still using the ls command to list directory contents on Linux?" I think NFS i

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-21 Thread daniel
Quoting dan...@zoltak.com: Great points Brendon! We have a similar architectural to your setup running NetApp filers, Apache/PHP web servers performing shared hosting for over 40,000+ websites. We pull over 35k IOPS and 80% are from PHP stats and getattr's. Someone earlier mentioned that

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-21 Thread daniel
Quoting Brendon Colby : We've invested a great deal of money in a high performance shared storage system, so of course we want to use this system for absolutely everything we can within reason, including sharing 1500+ PHP files to our many web servers. I don't think most systems administrators w

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-21 Thread Rasmus Lerdorf
On 02/21/2013 03:15 PM, Brendon Colby wrote: > NFS is so common for sharing files that saying "Wow, people are still > serving web files over NFS?" is like saying "Wow, people are still > using the ls command to list directory contents on Linux?" I think NFS > is still very widely used, even for s

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-21 Thread Brendon Colby
On Mon, Feb 18, 2013 at 3:35 PM, Rasmus Lerdorf wrote: > Wow, people are still serving web files over NFS? Sounds painful. On Mon, Feb 18, 2013 at 9:32 PM, Rasmus Lerdorf wrote: > So they are serving up all their PHP over NFS for some reason. I've been thinking about this and wanted to make a

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-20 Thread Terry Ellison
On 20/02/13 23:52, Brendon Colby wrote: Terry, Thanks for your detailed input. This is essentially what I did in my test setup. APC is definitely critical to the performance of our site. I'm just very curious to see how much impact the high number of getattr operations coming from the Apache/PH

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-20 Thread Brendon Colby
On Tue, Feb 19, 2013 at 11:06 AM, Terry Ellison wrote: > Brendon, > > Just to follow up with a bit more detail, apart from the obvious NFS tuning > with things like the actimeo mount parameters, you can get a better idea of > what is going on if you use a local copy of one of your apps running und

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-20 Thread Brendon Colby
On Mon, Feb 18, 2013 at 7:10 PM, Terry Ellison wrote: > > Brendon, are your scripts doing a log of include_once / require_once calls? Yep, but we also changed our autoload script (auto_prepend_file) to use require instead of require_once, and we still saw the same behavior (open calls for the PHP

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-20 Thread Terry Ellison
On 20/02/13 08:26, Stas Malyshev wrote: That depends of what your error handlers do. Some may write to log files, etc. if not configured properly (since error_reporting setting doesn't have to be considered in it). IIRC, for most of the cases O+ should be able to resolve all includes/requires o

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-20 Thread Stas Malyshev
Hi! > Yes, this is an overhead, but it is small beer compared to doing a > getattr() RPC across the server room fabric to a NAS server backend. That depends of what your error handlers do. Some may write to log files, etc. if not configured properly (since error_reporting setting doesn't have to

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-19 Thread Christopher Jones
On 02/19/2013 03:08 PM, Terry Ellison wrote: I guess that I should bite the bullet and switch to 5.5. Yes. I've been working on an evaluatorfork of APC optimized for CLI/GCI which tackles a lot of these issues head on and performs reasonable well, but I realise that this is a dead-end and w

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-19 Thread Terry Ellison
On 19/02/13 20:32, Stas Malyshev wrote: Hi! and IIRC mwiki does 4 of these on a page render. Here a pattern based on (@include($file) == 1) is more cache-friendly. This goes back to the fact that @ does not really disable errors - it only disables reporting of the errors, but the whole messag

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-19 Thread Stas Malyshev
Hi! > and IIRC mwiki does 4 of these on a page render. Here a pattern based > on (@include($file) == 1) is more cache-friendly. This goes back to the fact that @ does not really disable errors - it only disables reporting of the errors, but the whole message is generated and goes all the cycle u

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-19 Thread Terry Ellison
On 19/02/13 09:36, Terry Ellison wrote: The point that this thread highlights is that apps developers / administrators at both ends of the scale -- the enterprise and the shared service user -- normally have little say over the infrastructure architecture on which their application runs. In bo

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-19 Thread Terry Ellison
The point that this thread highlights is that apps developers / administrators at both ends of the scale -- the enterprise and the shared service user -- normally have little say over the infrastructure architecture on which their application runs. In both these cases the infrastructure will b

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Rasmus Lerdorf
On 02/18/2013 06:14 PM, Stas Malyshev wrote: > Hi! > >> Yeah, but NFS, especially without the realpath cache, which you lose if >> you turn on open_basedir, is deathly slow because of all the stats. >> >> Typically PHP scripts are not actually "writable files" and the way to >> keep them in synch

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Stas Malyshev
Hi! > Yeah, but NFS, especially without the realpath cache, which you lose if > you turn on open_basedir, is deathly slow because of all the stats. > > Typically PHP scripts are not actually "writable files" and the way to > keep them in synch across multiple machines is to use a deploy > mechani

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Rasmus Lerdorf
On 02/18/2013 05:50 PM, Stas Malyshev wrote: > Hi! > >> Wow, people are still serving web files over NFS? Sounds painful. > > Sometimes, there's not much (better) choices if you need to keep > writeable files in sync over a number of machines. There are other > shared FSes but they would lead to

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Stas Malyshev
Hi! > Wow, people are still serving web files over NFS? Sounds painful. Sometimes, there's not much (better) choices if you need to keep writeable files in sync over a number of machines. There are other shared FSes but they would lead to pretty much the same issues. -- Stanislav Malyshev, Soft

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Kevin Yung
Hi Brendon, In our environment, we use NFS for shared storage, we are using APC as well with stat=0. In our setting, we also experiencing high number of stat() calls on our file system. My initial finding of this problem is we enabled the open_basedir setting. And there is already a bug report for

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Kevin Yung
Brendon, in our environment, we use NFS for shared storage, we are using APC as well with stat=0. In our setting, we are experiencing high number of stat() calls on the NFS. My initial finding of this problem is we enabled the open_basedir setting. And there is already a bug report for this, https:

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Terry Ellison
On 18/02/13 21:47, Brendon Colby wrote: On Mon, Feb 18, 2013 at 4:32 PM, Damien Tournoud wrote: Assuming that those are relative includes, can you try with: apc.canonicalize=0 apc.stat=0 Paths are absolute. stat=0 (and canonicalize=0 just to try it) produced the same result. Brendon

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Brendon Colby
On Mon, Feb 18, 2013 at 4:32 PM, Damien Tournoud wrote: > Assuming that those are relative includes, can you try with: > > apc.canonicalize=0 > apc.stat=0 Paths are absolute. stat=0 (and canonicalize=0 just to try it) produced the same result. Brendon -- PHP Internals - PHP Runtime Develop

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Damien Tournoud
On Mon, Feb 18, 2013 at 10:03 PM, Brendon Colby wrote: > I tried apc.include_once_override - no change. I set up Apache to one > process and straced it. I clicked around on the site a few times and > see the typical pattern: > > open("[PATH]/CacheFile.class.php", O_RDONLY) = 10 > fstat(10, {st_mod

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Brendon Colby
On Mon, Feb 18, 2013 at 3:35 PM, Rasmus Lerdorf wrote: > On 02/18/2013 12:26 PM, Brendon Colby wrote: > >> Rasmus said: > 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. Yep -

Re: [PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread 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 re

[PHP-DEV] PHP causing high number of NFS getattr operations?

2013-02-18 Thread Brendon Colby
Greetings, This seemed like the appropriate list to discuss this - let me know if it isn't. We have several Apache 2.2 / PHP 5.4 / APC 3.1.13 servers all serving mostly PHP over NFS (we have separate servers for static content). I have been trying to figure out why we're seeing so many getattr re