Posted by deepesh on September 7, 2010 at 7:19am
Hi,
I have a drupal 6.19 site on a dedicated server with following specs :
Intel Core i7 920
x25-M 80GB SSD
6 x 2GB DDR3 1333 (12 GB Total) RAM
Php 5.3.1
MySql 4.1.22
Loading js/css from MaxCDN using parallel module
Boost module for caching
The page takes around 6-8 seconds to load, pls. guide what can be done to cut down the page load time significantly, will using caching technologies like APC and memcache help.
- Deepesh
Comments
pantheon
Hi deepesh,
You may try, APC, memcache and varnish for speeding up your drupal
But if you can work on entirely new server, I would suggest you to go for pantheon. http://groups.drupal.org/pantheon that would be the best solution for your drupal website.
I disagree with sreyas. 4
I disagree with sreyas. 4 cores, 12GB of RAM, with an SSD - unless your traffic is through the roof you should be seeing much better load times. You first need to find out what your problem is before you attempt surgery. Use the devel module's stats to see if you can pin the problem down to MySQL or everything else. Are there big queries showing up in your slow query log? Install the DB Tuner module and see what it suggests. How full is the SSD? What is your ratio of authenticated to anonymous users?
--
Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his
I dint mean its fast
Hi Dave,
I dint say site is fast now.. I suggested APC, memcache etc just to tweak the drupal performance. As you suggested I think it should be a later step ofcourse. And also I suggested pantheon because, then deepesh really dont need to worry about tweaking apache, php, mysql etc as pantheon does it all.
:)
Is it taking 5-6 seconds for
Is it taking 5-6 seconds for Drupal to output the actual page, or is it taking that long for the page to show up in the browser? You can check Drupal and Apache's output time by running this in a terminal on the server:
ab -n 1 -c 1 http://mysite.com/
As Dalin said - you need to identify where it's slow at. If the problem is some really slow MySQL queries, then tuning Apache and PHP won't fix the problem, as they will still be waiting on the database.
See how long the query times are. Get one of the MySQL tuning scripts also, like tuning-primer or MySQLTuner and read what it outputs. They can identify are good at identifying tweaks you can do in the MySQL configuration.
If devel output shows the queries being done in quickly, but Drupal still taking a long time to generate the page, then start disabling modules one by one and see if any module is causing the problem. Start with custom then move to contrib. The other alternative is to install something like XHProf (the PHP extension and Drupal module) and see where the hang up is in the callgraph.
HollyIT - Grab the Netbeans Drupal Development Tool at GitHub.
Agree
I'd agree. The original post doesn't make it clear what the 5-6 seconds load time is referring to. Is it time to download the HTML or to show the completed page in the browser? Using ab as above will quickly identify if the problem is with drupal page render.
Another great resource for testing the speed of your pages is here: http://www.webpagetest.org/runtest.php
This can help you see bottlenecks from the front-end user perspective at a very useful level. For example the page may be blocked because it's loading some javascript files at the top of your page.
If it is in fact an issue with drupal outputting the HTML too slowly you could also try profiling it via xdebug to see where it's spending most of its time.
Speed Report
Webpage Speed test Report :
http://www.webpagetest.org/result/100917_579F/1/breakdown/
Page load is not the same as server performance
Based on the web page performance link above I believe that improving server performance is not going to improve your page load time as observed by your end user. Yes, the Start Render times will improve and that will lead to improved satisfaction, but the biggest time issues you have are with third party objects on your page.
I would suggest looking at your functionality and design to see if you can get rid of some of these objects. It looks like your server is pretty much done at interval 7 while the page is not rendered complete because the browser is waiting for google translate, kontera, facebook objects etc.
To obtain the biggest performance boost for perceived page load speed it is always best to look at the objects on the page.
Dev and Support: prometsource.com
Wiki Page of Modules
There are some tricks, but in general doing less is always the best option when it comes to performance.
http://groups.drupal.org/node/57563
MySQL 4?
MySQL 4.1.22 meets the minimum system requirements for Drupal 6, but only just. Has everyone else noticed this in the spec?
I'd also check the table types. They need to be MyISAM and/or InnoDB.
MySQL
The only reason I had not upgraded to MySQL 5 is that I had read that it's slower than v 4.X !!!
MySQL 4 is a bit faster on
MySQL 4 is a bit faster on MyISAM, but 5 is faster on InnoDB. The difference in performance is pretty small. Also Drupal 7 requires MySQL 5.0.15+, so if you ever upgrade to D7, you will have to upgrade MySQL also.
HollyIT - Grab the Netbeans Drupal Development Tool at GitHub.
MariaDB
MariaDB using XtraDB is a nice combo
Check the PHP version also
In case you haven't seen this discussion about PHP 5.3:
http://drupal.org/node/360605
The discussion was closed for posterity last month. From what I can tell, Drupal 6.19 is certainly compatible with PHP 5.3, but individual contributed modules may not be.
I'm still concerned about your using a +5 year old version of the MySQL.
http://en.wikipedia.org/wiki/MySQL
Surely, the initial performance issues with MySQL 5.0 were resolved, and are long gone in MySQL 5.1.
Your hardware specs sound great!
You may also find this videocast helpful:
http://gotdrupal.com/videos/drupal-performance-boost
What OS?
What operating system and (more importantly) architecture are you running. With that much RAM you need to make sure you are running 64-bit.
HollyIT - Grab the Netbeans Drupal Development Tool at GitHub.
64bit
Attleast in linux amount of RAM doesnt magically trigger you on/off from 64bit "mode" to 32bit.
64bit operating system (witch requires 64bit processor) allows more RAM to be used tho than 32bit os.