4

We've migrated our Drupal 7 setup from one WAMP box to another. Apache and MySQL are on separate boxes. Page load times are terrible (approximately 11 seconds for each page load) additionally for one single page hit CPU on the apache.exe process spikes to 75%. I'm running Apache/2.4.3 (Win64) PHP/5.4.5.

The searching I have done has indicated this can be a problem with a module and to try disabling modules. Unfortunately I have 133 modules and if I disable them all my pages don't load at all. I even tried disabling all but the default modules and still I'm having problems.

I've ready about using XHPROF but since I'm using x64 apache on windows I can't find an appropriate binary to use. I've also enabled the devel module and I'm not seeing any obvious culprits there either.

I've also tried using the following patch which seems to have made no difference: http://drupal.org/node/1081266

A fresh install of drupal with a clean database seems to work considerably better which makes me think this is an issue with our data vs the server configuration itself.

Is there anything special I need to do when migrating data from one database server to another? What else can I do to troubleshoot?


After doing some more testing it appears the issue is that of SMB vs local storage. When I store my files on local storage load time is 4-5 seconds. When I store it on a UNC/SMB location load time increases 3-4x as long.

The reason for using SMB/UNC is so that multiple load balanced servers can access the same set of shared content. So I suppose I might next ask:

  1. Is there some way to improve the performance of SMB?
  2. If not, what other options exist? I've heard horror stories about NFS and RSYNC'ing files.

So what is the best way to scale?

closed as too broad by kiamlaluno May 25 '14 at 22:54

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • I've tried switching from a PHP module to FastCGI. I've also tried using drush to move the installation over (that didn't help). – Brad Sep 25 '12 at 23:37
  • After doing some more testing it appears the issue is that of SMB vs local storage. When I store my files on local storage load time is 4-5 seconds. When I store it on a UNC/SMB location load time increases 3-4x as long. The reason for using SMB/UNC is so that multiple load balanced servers can access the same set of shared content. So I suppose I might next ask: 1) Is there some way to improve the performance of SMB? 2) If not what other options exist? I've heard horror stories about NFS and RSYNC'ing files. So whats the best way to scale? Thanks Brad – Brad Sep 26 '12 at 2:13
  • 1
    We're using Drupal 7 with NFS (on linux to be fair) and it works flawlessly. I really recommend it. Just mount a folder from the NFS inside your Drupal folder and you're set up. I'd also recommend you switch to linux for much better performances, if it's not a problem. I wouldn't suggest RSYNC, since it's not fully reliable. – Eduard Luca Nov 2 '12 at 1:56
0

I'd use apc (alternative php cache) if you haven't already. I'd make sure MySQL is set to clear query cache rather frequently. Then I would visit something like http://www.webpagetest.org/ to check the waterfall. Who knows, maybe you are waiting on an overloaded CDN.

As for migrating, I'd use drush archive-dump, but I think any problems you have will be migrated too.

  • I've tried using x-cache (similar to APC) - that had little to no impact. As far as setting mysql to clear query cache rather frequently how do I do that and how frequently do you suggest. As far as the web page test - I don't think the issue is with content per se. The same site (and supposedly same content) is loading from another server faster. – Brad Sep 25 '12 at 21:45
  • Using Drush didn't help but I guess I'm baffled how the same site with the same content performs so slowly when moved. Are there error logs (other than the PHP and apache error logs) that I can look at? – Brad Sep 25 '12 at 23:39
0

I've worked (note the past tense) in WAMP until I tired of terrible performance. I decided to switch to ubuntu server on VirtualBox and love it. I highly recommend it. There's too many issues with Window's non-POSIX paths to make it worth the trouble, as well as the second-class citizenship that apache/mysql/php have on the Windows platform. Now I use my VBox server under windows and develop cross-platform between my Mac external laptop, or my Windows guest environment using cygwin/mintty. If I wish; I can migrate my vbox to another machine.

Switch to VirtualBox and any Linux flavor; you won't regret it. Here's one apporach using ubuntu: http://www.slideshare.net/aaroncouch/forget-mamp-and-wamp-use-virtual-box-to-have-a-real-ubuntu-server

Note: I admire and acknowledge the good and generously offered work of the WAMP team, as well the apache and friends group. I'm sure there's good reason to use these platforms, but for Drupal, it's not clear to me that it's the best way to go.

0

This user group might be able to help: https://groups.drupal.org/drupal-windows
https://groups.drupal.org/node/242443

If the shared files directory is slowing you down here are some modules that should help https://drupal.org/project/advagg (CSS/JS)
https://drupal.org/project/imageinfo_cache (Image Derivatives)
https://drupal.org/project/httprl (will make the above 2 modules run in a background process)

If the code is shared then you will need to use something similar to apc.stat=0
Best APC settings to reduce page execution time

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