Link to home
Start Free TrialLog in
Avatar of reynaldio
reynaldioFlag for Indonesia

asked on

My drupal website is still slow even with Boost + Authcache + APC + Memcache installed

Hi all,

i recently installed boost, authcache, apc and memcache. Is this too much? However i dont get the performance boost i want. My web even getting slower than ever. could there be conflict between this modules? With boost and authcache alone, page execution between 2800-3500 ms. Later i installed apc and page execution goes beyod 30000-50000 ms. And then i installed memcache and page execution goes back to 3000.
What have i done wrong.


php.ini

max_execution_time = 60
memory_limit = 320M

extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so
extension="ixed.5.2.lin"
;zend_extension="/usr/local/Zend/lib/Optimizer-3.3.9/php-5.2.x/ZendOptimizer.so"
extension=uploadprogress.so
extension=apc.so
extension=memcache.so

apc.enabled=1
apc.shm_segments=1
apc.shm_size=256
apc.apc.stat = 0
apc.ttl=0
apc.include_once_override = 1

memcache.hash_strategy="consistent"



settings.php

$conf['memcache_servers'] = array('localhost:11211' => 'default');
$conf['cache_inc'] = './sites/all/modules/authcache/authcache.inc';



My website scores 82 in YSlow but still not reflected on page loading.
any help and idea will be highly appreciated

Regards,
Reynaldi
Avatar of junipllc
junipllc
Flag of United States of America image

My first inclination is to check your memory limit -- it seems a bit high. It is certainly possible that your Web server software (Apache, IIS) is using up to 320M for each page load, depending on how it's configured. That could easily use up all of your server memory, causing it to start paging to disk and then thrashing.

Are you running Linux/UNIX or Windows? If you are using Linux, and if you have shell access, run "top" and see how much memory each Apache process is using.

Also, you should also check to see that you're not overextending the server's memory (via Task Manager in Windows, or "top" or "free -m" in Linux)

That would be my first guess, along with disabling development modules, turning on caching, etc. (which I also guess you've already done)
Avatar of reynaldio

ASKER

Hi,

Thanks for your response.
i use 320 MB for precaution only. i've changed it to 256mb. does setting memory_limit high have negative impact?
I check my memory usage with top, and it seems normal. Each process only uses 0.1 - 0.7 % of available memory.
I use hostgator VPS account with 756 MB of RAM.

I see that my web takes pretty long time to load javascript. Can that be the issue? But everything was fine before installing apc and memcache.

Regards,
Reynaldi
ASKER CERTIFIED SOLUTION
Avatar of junipllc
junipllc
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi junipllc,

i've been doing some benchmarking. and it seems one js file has 400kb of size and takes about 600 ms to load.
I dont understand why cause i've used gzip to zip the javascript. i'll do more benchmarking and post for new findings.
btw, my website is www.warawiri.com

Thanks,
reynaldi
Hi Reynaldi,

For some reason I didn't get notification of your post on my cell phone...I just saw that you posted when I checked back in -- sorry for the delay.

I just checked out your site and it's loading very fast now (at least the main page and the registration page) -- did you resolve the problem? If not then could it be a problem on the client end, for example in the connection between you and the server, or possibly something on your local machine that's slowing it down? I also see that you're using a CDN  -- good move, even if it's the same server.

The server response time is great, but one thing, though -- I'm seeing that you have well over 90 objects on the main page...that's quite a lot. Have you ever used CSS sprites for your images? You might be able to chop off a bunch of time for the whole page load that way. That's a different issue, though, since I think we're really talking about server response time here, not page load time.

If you got it resolved, I'd love to hear how you did it, for my sake and for the sake of future Googlers. If not, hit me up and I'll try to help some more...but it looks pretty good from this end (in New Jersey, USA).

Mike
I did some benchmarking with tools from http://code.google.com/speed/tools.html. There are so many cool tools to help you analyse your web performance.
I found the bottleneck using webpagetest (http://www.webpagetest.org/test) and "top"
It appeared that there's a bug in my javascript compression module which gives the wrong url to the js.
So instead of serving with cached and gzip js, my web used uncompressed js which are 700++ kb in total :)

Now my web is running pretty fast for anonymous users, but still need improvements for registered users.
i still haven't got significant improvements from memcache though. Still trying to figure out the right configurations.
Any ideas or tips on how to configure memcache?

Yes, my web has so many images, I do use css sprites for some of the images and also cdn (though still locally).
I'm planning to use external provider such as http://www.rackspacecloud.com/cloud_hosting_products/files or http://www.akamai.com/html/industry/index.html. Any suggestions on cdn provider?

Thanks for all your help junipllc. really appreciate it.

Regards,
Reynaldi
Hey-

I haven't really configured memcache other than in a development/test environment so I probably can't offer much on that front, but I can help with the CDN recommendation and a suggestion for the Apache config. Do you have all of your text content (e.g. css, html, js, etc.) being compressed at the server level using mod_deflate? If not, it's a surefire way of getting the compression right. My config is below.

For CDN using Drupal (if you are just trying to speed up the DNS, etc.) I like to use a mirroring proxy such as SimpleCDN. It's super cheap and it requires very, very little setup. I think they charge something like 3.9 cents per gig...well below what you'll pay with Rackspace or Amazon.

If you're going heavy-duty enterprise with the site, and you have the budget, both Rackspace and Amazon S3 are great, although depending on your needs it's a bit harder to set up. Akamai is being used by all the big boys, but I've never personally used it.

I hope all of this helps!

Mike
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript
        BrowserMatch ^Mozilla/4 gzip-only-text/html
        BrowserMatch ^Mozilla/4\.0[678] no-gzip
        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

Open in new window

I know this sounds super simple - Drupal can be a little call heavy for authenticated users - but don't forget about cron - i've seen sites slow down and come to a screeching halt thanks to bloated tables.
Hi all,

very sorry for late response. i've been pretty busy with other stuffs lately.

@junipllc: Thanks for your recommendation. SimpleCDS looks promising. I will definitely be looking into that. My website page now loads pretty fast both for unauthenticated user and authenticated users. but i'm still not sure if it is because memcache or other caching module i have installed. anyway, im pretty happy with it now. thanks for your help :)

@RobertPope: yes, drupal page loading performance is slow due to intensive call to database, especially if you installed a large number of modules, like myself. but drupal has great caching modules that we can use to improve page loading generation time. with boost for unauthenticated users and authcache for authenticated users + APC and memcache, my web now run pretty fast.
Before it took 50s to load the homepage. now it takes 5s. not bad :)

i'm going to close this issue now and reward the points to junipllc.

Regards,
Reynaldi
Thanks for your help.