Find the answer to your Linux question:
Results 1 to 8 of 8
Hi all, Does any one know how to speedup the website? The site is based on LAMP.(PHP+APACHE+MYSQL).The site page contains images of type gif/jpeg. Any idea?...
  1. #1
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Question How to speed up LAMP based web site?

    Hi all,
    Does any one know how to speedup the website?
    The site is based on LAMP.(PHP+APACHE+MYSQL).The site page contains images of type gif/jpeg.

    Any idea?
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  2. #2
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422
    Change to png should work right?
    Better (no offence) and cleaner PHP code. (Again no Offence I dont know how your PHP code looks so)

    I hope that helps you a little.
    New Users, please read this..
    Google first, then ask..

  3. #3
    Just Joined! Nautilus's Avatar
    Join Date
    Jun 2007
    Location
    London,UK and Athens,GR
    Posts
    42
    Removing unncessary modules from PHP and Apache, adding indexes to tables in MySQL (there is an option in the config file to turn on logging of slow queries and from there you can see which ones to tune).

    There are more radical things after that, like tuning the kernel or pushing up the RAM and removing the swap partition but these things are a bit too much for the moment...

  4. #4
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    This is all useless unless you know what the bottleneck is - you need to find that out first.

    If it's:

    Apache = Look to cut the size of the web pages (jpeg's, etc) or bump up the cache that Apache's using.

    PHP = Biggest one for PHP would be a caching engine that will save your PHP after it's compiled so that every time a page is called, the PHP doesn't have to be recompiled. This can make an enormous difference on a busy site. As always, cleaner code runs faster.

    MySQL = Restructure your tables or add indexes. Find out your most common queries and then use something like EXPLAIN to follow the execution of it.

    All of these could be affected by failing hardware - like an HDD or array. (Or if the array is rebuilding in the background.)

  5. #5
    Just Joined! Nautilus's Avatar
    Join Date
    Jun 2007
    Location
    London,UK and Athens,GR
    Posts
    42

    Angry

    This is all useless unless you know what the bottleneck is - you need to find that out first.
    HROAdmin26,

    This is not all useless. These are just some suggestions as what you write is suggestions. Nobody said that the bottlenecks must not be identified!

  6. #6
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    Sorry, I still think a big list of random suggestions is pretty useless if you don't know what the problem is.

    Finding the bottleneck is an important step that was not even mentioned previously. Once that is narrowed down, a lot of suggestions in this thread (including some of mine) will be pointless.

    We could fill this thread with thousands of suggestions about what *could be* slowing down a webserver, but what would be the point? We could list a faulty NIC, faulty cable, corrupt binary, slow HDD, failing HDD, bad memory, bad CPU, bad mobo, disk fragmentation, corrupt filesystem, recompile Apache with less modules, recompile PHP, re-code the PHP, rebuild the DB structure, caching, etc.

    I don't think making a list like that really helps too much. Just my .02 - as anything on a forum is.

  7. #7
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    If you've got lots of images to download then making the files bigger and higher res than they need to be is a good way to slug performance.

  8. #8
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Smile

    Thanks all for your suggestion.- I'll try them - Thanks you all
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...