You are here: Re: Reducing load for LAMP app? « PHP Programming Language « IT news, forums, messages
Re: Reducing load for LAMP app?

Posted by _q_u_a_m_i_s's on 01/04/08 10:23

On Jan 4, 10:34 am, Gilles Ganault <nos...@nospam.com> wrote:
> Hello,
>
> I'm no LAMP expert, and a friend of mine is running a site which is a
> bit overloaded. Before upgrading, he'd like to make sure there's no
> easy way to improve efficiency.
>
> A couple of things:
> - MySQL : as much as possible, he keeps query results in RAM, but
> apparently, each is session-specific, which means that results can't
> be shared with other users.
> Is there something that can be done in that area, ie. keep the maximum
> amount of MySQL data in RAM, to avoid users (both logged-on and
> guests) hitting the single MySQL server again and again?

Are you sure keeping data in ram is a good solution? MySQL cache
dosen`t help?

>
> - His hoster says that Apache server is under significant load. At
> this point, I don't have more details, but generally speaking, what
> are the well-know ways to optimize PHP apps?
>
> Thank you.

For an easy test try to install a PHP accelerator (i`ve testesd
eaccelerator http://eaccelerator.net/ ). It can do a pretty good job.
And another thing , try to make sure that the server is overloaded
procesing stuff and not because of a bad caching mechanism (google for
browser-caching). As a rule of thumb , do not use php-generated
images, or other dinamically generated content if it`s not really
needed.


There is no easy way to optimize PHP,as with any other language you
have to know exactly what goes wrong with your scripts. You can use
xdebug (as a profiler) to see what functions eat a lot of resources.
You can monitor the server and see why he is slowing down like
that(need more ram, more cpu`s...more hdd?).

 

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

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