Accelerating a server / webapp
Gadi Cohen
dragon at wastelands.net
Tue Jul 12 16:05:20 IDT 2011
Hi, I'm joining this part a bit late but I'll make some comments above
and beyond what Nadav mentioned; I'll deal specifically with web
application performance. Also besides iostat, you can install a package
called iotop, which is like top but instead of io. (But you only really
need to do this if you identify a high iowait using regular top...)
So assuming the server is all good, here are some things that can speed
up web apps (specificaly PHP)...
1) Install an opcode cache! This makes a BIG difference, it means
instead of interpretting every PHP file (including every include) on
every access, it can compile a single file for each webpage and run that
directly. APC is excellent and free, integrates into PHP, and will be
effective on applications without any additional work.
2) Using a cache between the PHP app and the database can also speed
things up, especially if your site has high load. This requires support
in the app itself. APC has such a cache built in. Memcache is another
popoular option, and required for a shared cache between multiple
servers (it's slower than APC though...)
3) Google Chrome has some amazing speed analysis tools built in. Press
ctrl-alt-j and look at for example the 'network tab'. This shows you a
graph of where all the page loading is going. It's great to identify
bottlenecks and offers advice on how to address the most common ones
(e.g. certain pages being forced to load before others can be requested,
cache use, etc.)
4) On that last note, client side cache is a big deal. Some default
settings might require certain files (images, css, javascript) to be
unnecessarily loaded on every page. Intelligent caching makes websites
significantly faster and more responsive.
Hope this helps!
Gadi
On 28/06/2011 18:16, Steve G. wrote:
> I have a server that is sometimes sluggish. While I suspect the main
> problem is DNS and routing issues with my provider's infrastructure,
> in particular responding to DNS requests and routing, I am not sure.
> So here are some questions to the server experts on the team:
>
> 1. How do I identify the bottleneck in server performance? Is the
> problem with my networking card, CPU, memory, HD I/O, or the
> networking infrastructure outside the home.
>
> 2. Is there a tool for monitoring or testing load and performance
> without disabling or slowing down the server for long periods of time?
> I use Linux/Apache/PHP (no MySQL at this time, since I disabled
> WordPress due to all the fracking comment spam I was having to
> manually delete), but I am also interested in tools to do the same in
> Windows.
>
> 3. If I had to do one thing to improve my hardware, which should it
> be? RAID? SD drive? Faster CPU? 32 to 64 bus? More/Faster memory?
> Obviously cost is a consideration.
>
> 4. Is there any general advice on improving performance by removing
> background programs, etc.?
>
> Thanks,
>
> Z.
>
> --
> Check out my web site - www.words2u.net <http://www.words2u.net>
>
>
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
--
Gadi Cohen aka Kinslayer <dragon at wastelands.net> www.wastelands.net
Freelance admin/coding/design HABONIM DROR linux/fantasy enthusiast
KeyID 0x93F26EF5: 256A 1FC7 AA2B 6A8F 1D9B 6A5A 4403 F34B 93F2 6EF5
//
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20110712/0ef6a1d3/attachment-0001.html>
More information about the Linux-il
mailing list