When your LAMP application is slow, you might choose to upgrade the processor and adding more RAM. It is call scale up.
There are other solutions to accelerate fulfill different bottleneck. I am also learning this topic and will update when I found more related useful information.