Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hey. I'm running a Fedora linux server on the Amazon EC2 platform. I'm pretty sure there's something wrong with my configuration as it seems to be very slow. SSH sometimes takes over 30 seconds to connect, a WordPress generated web page could take 5 seconds to load, and it could take 20 seconds to load, which is pretty awkward.

MySQL queries are all executed in less than a second, so I don't think that's the case.

I'm not really sure where the issue lies, but a simple page written in PHP loads instantly. A fresh WordPress installation starts lagging. Same works perfect on grid hosting at MediaTemple for instance, so I'm pretty sure I missed something.

If you could please direct me to the right tools and articles which would help me out. Thanks so much!

Fedora Core 8, php 5.2.6, MySQL 5.0.45, OpenSSH 4.7p1, OpenSSL 0.9.8b. PHP is configured as a module to Apache 2.2.9, all websites based on virtual hosts. I have some on-going php scripts running from time to time in the background via cron.

Thanks.

share|improve this question
    
You might be better off asking this on the Wordpress support forums, where I suspect you will find more specialised expertise. –  John Gardeniers Apr 19 '10 at 9:14

3 Answers 3

This are the starting points to look at if you have a slow server:

  1. Have you installed APC? APC is a 'compiler' for PHP and will make your scripts up to 300% faster. You can check whether APC is running with phpinfo.
  2. Analyze your MySQL queries. Enable the wordpress query profiler for this (that's wp specific). Ten queries with execution time below 1 second will still cause a large delay.
  3. Analyze your server's memory usage. Use the linux top command for this. You can lower the memory usage by avoiding loading PHP for static content. You can use FastCGI for this, or Nginx with PHP-FPM, or just Nginx as static content server.

If you have analyzed this and fixed the problem(s), you can further increase the performance by adding extra caches like WP supercache or Varnish.

share|improve this answer

could it be, that the server tries to do a DNS lookup and can´t. so the software (ssh or webserver) only replys after a timeout?

share|improve this answer

If your RAM is limited, I would highly recommend you to run Nginx for your web-server and PHP-FPM as your PHP handler. If you are using very high RAM amount, that could delay everything from SSH to the website itself.

Please paste your output of free -m and/or top for the community to take a look at. Thanks!

share|improve this answer
    
Nginx with PHP-FPM does not use less memory to serve PHP pages than Apache with mod_php5. You could however use Nginx to serve static content so only little memory is used for serving images, css and js files. –  i.amniels May 15 '11 at 9:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.