Optimization/Benchmarking tools?

Optimization/Benchmarking tools?

am 05.12.2007 17:01:37 von Lewis Kapell

Hello all,

I have a couple of web sites which rely heavily on PHP and PostgreSQL.
Sometimes, pages which have a lot of dynamic content take several
seconds to load.

In order to improve my sites' performance, I need to know where the
bottlenecks are. I need a tool or tools that would allow me to analyze
my sites' behavior to determine where my optimization efforts should be
focused: should it be on the PHP scripts, on the SQL queries or database
configuration, on aspects of the server configuration, etc.

I am using PostgreSQL 8.2.5, PHP 5.2.5, and Microsoft Internet
Information Server (IIS) 6.0.

I have the Postgres server set up to record any queries whose execution
takes longer than a certain interval. By inspecting the logs, I was
able to identify poorly performing queries; in most cases, creation of
appropriate table indexes resolved the problem. So, that is one aspect
of server optimization that I think I have already done pretty well.
Other than that, however, I don't really know where improvements need to
be made.

Thanks to any who can advise.

--

Thank you,

Lewis Kapell
Computer Operations
Seton Home Study School

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Optimization/Benchmarking tools?

am 05.12.2007 17:23:10 von John Mertic

------=_Part_2069_29380688.1196871790253
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Xdebug and WinCacheGrind are your friends here. Read more at
http://xdebug.org/docs/profiler.

John

On Dec 5, 2007 11:01 AM, Lewis Kapell wrote:

> Hello all,
>
> I have a couple of web sites which rely heavily on PHP and PostgreSQL.
> Sometimes, pages which have a lot of dynamic content take several
> seconds to load.
>
> In order to improve my sites' performance, I need to know where the
> bottlenecks are. I need a tool or tools that would allow me to analyze
> my sites' behavior to determine where my optimization efforts should be
> focused: should it be on the PHP scripts, on the SQL queries or database
> configuration, on aspects of the server configuration, etc.
>
> I am using PostgreSQL 8.2.5, PHP 5.2.5, and Microsoft Internet
> Information Server (IIS) 6.0.
>
> I have the Postgres server set up to record any queries whose execution
> takes longer than a certain interval. By inspecting the logs, I was
> able to identify poorly performing queries; in most cases, creation of
> appropriate table indexes resolved the problem. So, that is one aspect
> of server optimization that I think I have already done pretty well.
> Other than that, however, I don't really know where improvements need to
> be made.
>
> Thanks to any who can advise.
>
> --
>
> Thank you,
>
> Lewis Kapell
> Computer Operations
> Seton Home Study School
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
John Mertic
jmertic@gmail.com
http://jmertic.wordpress.com

"Explaining a joke is like dissecting a frog: you understand it better, but
the frog dies
in the process." --Mark Twain

------=_Part_2069_29380688.1196871790253--

Re: Optimization/Benchmarking tools?

am 06.12.2007 17:08:39 von Lewis Kapell

John,

Thanks for the tip. In just a short time, this tool helped me to find
the big bottlenecks in my scripts.

However, as far as I can tell, the Xdebug profiler gives no information
on the loading/parsing phase of PHP script execution. I would like to
determine how much benefit I can get by taking steps to reduce PHP file
sizes, for example (removing comments, breaking up large classes into
several files, etc.) or by refactoring the code so that I can use
exclusively require() instead of require_once().

Can anyone suggest a tool for measuring this?

Thank you,

Lewis Kapell
Computer Operations
Seton Home Study School


John Mertic wrote:
> Xdebug and WinCacheGrind are your friends here. Read more at
> http://xdebug.org/docs/profiler.
>
> John
>
> On Dec 5, 2007 11:01 AM, Lewis Kapell wrote:
>
>> Hello all,
>>
>> I have a couple of web sites which rely heavily on PHP and PostgreSQL.
>> Sometimes, pages which have a lot of dynamic content take several
>> seconds to load.
>>
>> In order to improve my sites' performance, I need to know where the
>> bottlenecks are. I need a tool or tools that would allow me to analyze
>> my sites' behavior to determine where my optimization efforts should be
>> focused: should it be on the PHP scripts, on the SQL queries or database
>> configuration, on aspects of the server configuration, etc.
>>
>> I am using PostgreSQL 8.2.5, PHP 5.2.5, and Microsoft Internet
>> Information Server (IIS) 6.0.
>>
>> I have the Postgres server set up to record any queries whose execution
>> takes longer than a certain interval. By inspecting the logs, I was
>> able to identify poorly performing queries; in most cases, creation of
>> appropriate table indexes resolved the problem. So, that is one aspect
>> of server optimization that I think I have already done pretty well.
>> Other than that, however, I don't really know where improvements need to
>> be made.
>>
>> Thanks to any who can advise.
>>
>> --
>>
>> Thank you,
>>
>> Lewis Kapell
>> Computer Operations
>> Seton Home Study School
>>
>> --
>> PHP Windows Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

AW: Optimization/Benchmarking tools?

am 06.12.2007 17:22:39 von BQ777

i wish i could tell you a benchmark tool, but I don=92t really know one. =


if u find something, please let me know.

one think what you could / should do is to encode the php scripts.

If u encrypt it or not, its up to you, but note, if u encode php scripts =
you
can save up to 60% of the speed (and even memory), because the most time
which is passing by, while your script starts, is the time which php =
needs
to parse, check and interpret the script in bytecode. After the script =
is in
bytecode php run the script. By encoding your script these steps falls =
away,
cz the encoder save the php scripts directly in bytecode :)

greetz

ghostwriter

-----Ursprüngliche Nachricht-----
Von: Lewis Kapell [mailto:lkapell@setonhome.org]=20
Gesendet: Donnerstag, 6. Dezember 2007 17:09
An: php-windows@lists.php.net
Betreff: Re: [PHP-WIN] Optimization/Benchmarking tools?

John,

Thanks for the tip. In just a short time, this tool helped me to find=20
the big bottlenecks in my scripts.

However, as far as I can tell, the Xdebug profiler gives no information=20
on the loading/parsing phase of PHP script execution. I would like to=20
determine how much benefit I can get by taking steps to reduce PHP file=20
sizes, for example (removing comments, breaking up large classes into=20
several files, etc.) or by refactoring the code so that I can use=20
exclusively require() instead of require_once().

Can anyone suggest a tool for measuring this?

Thank you,

Lewis Kapell
Computer Operations
Seton Home Study School


John Mertic wrote:
> Xdebug and WinCacheGrind are your friends here. Read more at
> http://xdebug.org/docs/profiler.
>=20
> John
>=20
> On Dec 5, 2007 11:01 AM, Lewis Kapell wrote:
>=20
>> Hello all,
>>
>> I have a couple of web sites which rely heavily on PHP and =
PostgreSQL.
>> Sometimes, pages which have a lot of dynamic content take several
>> seconds to load.
>>
>> In order to improve my sites' performance, I need to know where the
>> bottlenecks are. I need a tool or tools that would allow me to =
analyze
>> my sites' behavior to determine where my optimization efforts should =
be
>> focused: should it be on the PHP scripts, on the SQL queries or =
database
>> configuration, on aspects of the server configuration, etc.
>>
>> I am using PostgreSQL 8.2.5, PHP 5.2.5, and Microsoft Internet
>> Information Server (IIS) 6.0.
>>
>> I have the Postgres server set up to record any queries whose =
execution
>> takes longer than a certain interval. By inspecting the logs, I was
>> able to identify poorly performing queries; in most cases, creation =
of
>> appropriate table indexes resolved the problem. So, that is one =
aspect
>> of server optimization that I think I have already done pretty well.
>> Other than that, however, I don't really know where improvements need =
to
>> be made.
>>
>> Thanks to any who can advise.
>>
>> --
>>
>> Thank you,
>>
>> Lewis Kapell
>> Computer Operations
>> Seton Home Study School
>>
>> --
>> PHP Windows Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>=20
>=20

--=20
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

__________ NOD32 2706 (20071206) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Optimization/Benchmarking tools?

am 06.12.2007 17:26:46 von John Mertic

------=_Part_6562_19102749.1196958406247
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

It's mostly trial and error here, and for that you'll want to use any of the
web server benchmarking tools to help out ( such as 'ab' if you are using
apache ).

You might want to google up some of Rasmus's presentations on optimization
to get a better idea on what to do. Here's a good one to get started on
http://talks.php.net/show/tortech04/26.

John

On Dec 6, 2007 11:08 AM, Lewis Kapell wrote:

> John,
>
> Thanks for the tip. In just a short time, this tool helped me to find
> the big bottlenecks in my scripts.
>
> However, as far as I can tell, the Xdebug profiler gives no information
> on the loading/parsing phase of PHP script execution. I would like to
> determine how much benefit I can get by taking steps to reduce PHP file
> sizes, for example (removing comments, breaking up large classes into
> several files, etc.) or by refactoring the code so that I can use
> exclusively require() instead of require_once().
>
> Can anyone suggest a tool for measuring this?
>
> Thank you,
>
> Lewis Kapell
> Computer Operations
> Seton Home Study School
>
>
> John Mertic wrote:
> > Xdebug and WinCacheGrind are your friends here. Read more at
> > http://xdebug.org/docs/profiler.
> >
> > John
> >
> > On Dec 5, 2007 11:01 AM, Lewis Kapell wrote:
> >
> >> Hello all,
> >>
> >> I have a couple of web sites which rely heavily on PHP and PostgreSQL.
> >> Sometimes, pages which have a lot of dynamic content take several
> >> seconds to load.
> >>
> >> In order to improve my sites' performance, I need to know where the
> >> bottlenecks are. I need a tool or tools that would allow me to analyze
> >> my sites' behavior to determine where my optimization efforts should be
> >> focused: should it be on the PHP scripts, on the SQL queries or
> database
> >> configuration, on aspects of the server configuration, etc.
> >>
> >> I am using PostgreSQL 8.2.5, PHP 5.2.5, and Microsoft Internet
> >> Information Server (IIS) 6.0.
> >>
> >> I have the Postgres server set up to record any queries whose execution
> >> takes longer than a certain interval. By inspecting the logs, I was
> >> able to identify poorly performing queries; in most cases, creation of
> >> appropriate table indexes resolved the problem. So, that is one aspect
> >> of server optimization that I think I have already done pretty well.
> >> Other than that, however, I don't really know where improvements need
> to
> >> be made.
> >>
> >> Thanks to any who can advise.
> >>
> >> --
> >>
> >> Thank you,
> >>
> >> Lewis Kapell
> >> Computer Operations
> >> Seton Home Study School
> >>
> >> --
> >> PHP Windows Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
John Mertic
jmertic@gmail.com
http://jmertic.wordpress.com

"Explaining a joke is like dissecting a frog: you understand it better, but
the frog dies
in the process." --Mark Twain

------=_Part_6562_19102749.1196958406247--