You are here: Re: [PHP] php Slow with Mac OS X 10.4 « PHP « IT news, forums, messages
Re: [PHP] php Slow with Mac OS X 10.4

Posted by Brent Baisley on 10/25/05 00:03

You certainly wouldn't want to do just fs_usage. Typing something
like "fs_usage httpd" will show you just what the httpd process is
accessing. Read the man pages for other options that may be helpful.

I've got a few things running on OSX 10.4, although none that handle
lots of traffic. Public sites:
dutchessfootball.com - a football pool, the picks page is the slowest
to load. That's on a single cpu 1.25 G4 512MB RAM
heardthroughthegrapevine.com - wine tasting site, nothing fancy or
that complicated. That's on a 400Mhz G4 384MB RAM.

The big application is internal to my company and has about 285 "web"
files total, and about 45 mysql tables (contacts, companies, resumes
invoices, jobs, emails, journal,etc). They all have lots of includes
since I use a custom templating system to separate php from html. I
do not use PEAR or any content management system, I found them too
slow. I know a few people who have looked at Mambo and rejected it
because of it's CPU load, although they were all using Windows
servers. I've never looked into why Mambo has high CPU requirements.

Is it just the Mambo parts you are having problems with or is it php
in general?

With 100% CPU, we've narrowed it down to something there. Now we need
to figure out why the CPU is the bottleneck.

On Oct 24, 2005, at 4:21 PM, Nicolas Ross wrote:

> As stated before in this thread, in my case it's nothing about dns.
>
> On 2 machines I have, both were 10.3, one was upgraded to 10.4, the
> other not. Nothing else has changed. On the 10.4, it's slow, on the
> 10.3, it's fast. All dns lookup is off in all apache config...
>
> I did an iostat when I experience the slowdown, and I get no
> noticable disk activity.
>
> With fs_usager (that I didn't know), I get in about 1 second 57k
> lines of activity ! But still appears (with the timestamps I see)
> take only about 1 second.
>
> With netstat -an, besides the mysql connection and the http
> connection, I see nothing else waiting to return...
>
> BTW, on my test machine, there is nothing else running or other
> "live" site...
>
> Brent, can you tell me what kind of php application you're running
> on os x 10.4 ? Can you share your apache config ? What king of
> setup do you have (what apache, php etc.) ?
>
> Thanks,
>
> Nicolas
>
> ----- Original Message ----- From: "Brent Baisley"
> <brent@landover.com>
> To: "Nicolas Ross" <rossnick-lists@cybercat.ca>
> Cc: <php-general@lists.php.net>; "Shawn Moore"
> <shawn@heliumflash.com>; "Atelier Fabien" <info@atelierfabien.be>
> Sent: Monday, October 24, 2005 3:13 PM
> Subject: Re: [PHP] php Slow with Mac OS X 10.4
>
>
>
>> I haven't had any problems with slowdowns on 10.4. Usually when
>> there are slowdowns on the Mac like you indicate, it has
>> something to do with DNS lookups being performed. Apple seems to
>> be having a hard time getting this right. You could problem find
>> a ton of posts on very slow ssh on the Apple forums that have to
>> do with DNS.
>>
>> Have you figured out what the computer is doing when a page is
>> taking that long? You mention it seems to point to an IO problem,
>> have you used iostat (or fs_usage) to verify it's disk IO? My
>> first guess is something with the network and you have to wait
>> for a lookup, response or timeout, which is why it's taking at a
>> minimum 10 seconds. Again, I would check DNS first, the most
>> obvious being Apache resolving IP addresses for the log (don't do
>> it).
>>
>>
>>
>> On Oct 24, 2005, at 12:44 PM, Nicolas Ross wrote:
>>
>>
>>> Just a little follow-up to my own post.
>>>
>>> From the latest expriments I've done with a fresh install of OS
>>> X 10.4 (with the latest 10.4.3 beta update), it seems to point
>>> to an IO problem.
>>>
>>> My test site uses mambo as a CMS, and I've inclued collecting of
>>> microseconds timestamps at key points of the index file, and
>>> whenever it includes some files it slows down. It's worse when
>>> there are several nested includes. One other point is the mysql
>>> db connection.
>>>
>>> I must recall to all that when called from the cli, it's ok.
>>> Only when called from apache (1 or 2), dso or static and only on
>>> Mac OS X 10.4 (it's ok with 10.3 and 10.2) I expericed a major
>>> slowdown. For all tests, all config is the same, libraries and
>>> binaries where all the same on all systems.
>>>
>>> I've tried compiling php as cgi also, it helps a little bit, but
>>> it's still too slow...
>>>
>>> Thanks for any hints...
>>>
>>> Nicolas
>>>
>>> ----- Original Message ----- From: "Nicolas Ross" <rossnick-
>>> lists@cybercat.ca>
>>> To: <php-general@lists.php.net>
>>> Sent: Wednesday, September 14, 2005 9:00 AM
>>> Subject: [PHP] php Slow with Mac OS X 10.4
>>>
>>>
>>>
>>>
>>>> Hi all !
>>>>
>>>> Here, we've got several Mac computer acting as servers to serve
>>>> many kinds
>>>> of sites. One of wich was running, until the middle of august,
>>>> Mac OS X
>>>> 10.2. It was then with apache 1.3.x, and php 4.3.10 dso. All
>>>> things were
>>>> "normal".
>>>>
>>>> At the middle of august, we upgraded to Mac OS X 10.4 (re-
>>>> install from
>>>> scratch). Now, it's with apache2, php 4.4.0 dso. Now, everthing
>>>> that is php
>>>> is slow as hell. A page that took normally less than a second to
>>>> render, now
>>>> takes up to 15 ! Yes, fifteen seconds. That depends of course
>>>> on the general
>>>> load of the server, but it nevers goes down under 8 to 10 seconds.
>>>>
>>>> The machine is a dual G4, with 1.5 gigs of ram.
>>>>
>>>> Now, if I go to the command line, in the directory of this site
>>>> and type
>>>> "php index.php", it renders in about 1 to 1.5 seconds, wich is
>>>> acceptable.
>>>>
>>>> I did tests with :
>>>>
>>>> - apache 1, php 4, php 5, all static or dso
>>>> - apache 2, php 4, php 5, dso
>>>> - php 4.3, php 4.4
>>>> - Stock php that comes with Tiger
>>>> - Stock apache that comes with Tiger
>>>> - Different compile options with mysql as --with-mysql
>>>> and --with-mysql=/usr/local/mysql
>>>> - I've also tried with and without zend optimizer, turck mmcache.
>>>>
>>>> All with the same results.
>>>>
>>>> In my test case, there is mysql involved, but it's irrelevent to
>>>> the
>>>> problem, since the mysql is an another machine and is the same
>>>> all trough my
>>>> tests.
>>>>
>>>> Now, in a different server room, we have a set of 3 xserves
>>>> cluster node
>>>> dual g5 with 4 gigs of ram each. One of them was upgraded to
>>>> Mac OS X 10.4
>>>> (server) and the other 2 are still with 10.3.
>>>>
>>>> If I take the same setup (same compile options, same versions)
>>>> on these
>>>> machines, the exact same site is slow as hell on the 10.4, and
>>>> lightning
>>>> fast on 10.3.
>>>>
>>>>
>>>> Here's my php configure command :
>>>>
>>>> /configure --with-apxs2=/usr/local/apache2/bin/apxs --with-
>>>> mysql --with-fbsql
>>>> --with-xml --enable-ftp --with-curl=/sw --with-zlib --with-png-
>>>> dir=/sw --with-jpeg-dir=/sw
>>>> --with-gd --with-ttf=/sw --with-freetype-dir=/sw --enable-track-
>>>> vars --enable-trans-id
>>>> --disable-debug
>>>>
>>>>
>>>> This is really begins to bugs me...
>>>>
>>>> Any hints ?
>>>>
>>>>
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>>>
>>>
>>
>> --
>> Brent Baisley
>> Systems Architect
>> Landover Associates, Inc.
>> Search & Advisory Services for Advanced Technology Environments
>> p: 212.759.6400/800.759.0577
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
>

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация