OT: why are LAMP sites slow?
Maciej Mróz
tego at adresu.nie.ma
Fri Feb 4 13:29:30 EST 2005
Kartic wrote:
> Paul Rubin said the following on 2/3/2005 7:20 PM:
>
>> LAMP = Linux/Apache/MySQL/P{ython,erl,HP}. Refers to the general
>> class of database-backed web sites built using those components. This
>> being c.l.py, if you want, you can limit your interest to the case the
>> P stands for Python.
>>
>> I notice that lots of the medium-largish sites (from hobbyist BBS's to
>> sites like Slashdot, Wikipedia, etc.) built using this approach are
>> painfully slow even using seriously powerful server hardware. Yet
>> compared to a really large site like Ebay or Hotmail (to say nothing
>> of Google), the traffic levels on those sites is just chickenfeed.
>>
>
> If you are talking about Wikipedia as a prime example, I agree with you
> that it is *painfully* slow.
>
> And the reason for that I probably because of the way the language is
> used (PHP) (this is a shot in the dark as I have not looked into
> Mediawiki code), and compounded by probably an unoptimized database. I
> don't want to start flame wars here about PHP; I use PHP to build client
> sites and like it for the "easy building of dynamic sites" but the
> downside is that there is no "memory"...every page is compiled each time
> a request is made. I doubt if Wikipedia site uses an optimizer (like
> Zend) or caching mechanisms. Optimizers and/or PHP caches make a huge
> performance difference.
Mmcache (which is both optimizer and shared memory caching library for
php) can do _miracles_. One of my company servers uses Apache
1.3/php/mmcache to serve about 100 GB of dynamic content a day (it could
do more but website does not have enough visitors to stress it :) ).
There's also memcached, much more of interest to readers of this list -
iirc it has Python API.
More information about the Python-list
mailing list