Posted by dunx on June 2, 2011 at 9:18am
I'm using quickstart 0.8 for Drupal 6 under virtualbox 3.2.12 on a Vista box. It's a great solution, but I seem to have real speed issues, which I think may be mysql related. I even got myself a 80Gb SSD, which did help, but Drupal remains painfully slow. Everything else seems quick enough though.
I've been suffering for about 6 months now, but it would be so good to have quick responses during development. Any ideas where I should start looking?
I don't think I've changed anything from the 0.8 install except to set up my domains.
/etc/hosts as follow and most of my development is on http://dev2/
127.0.0.1 localhost
127.0.1.1 quickstart-desktop
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
127.0.0.1 webgrind
127.0.0.1 test1 #quickstart
127.0.0.1 dev1 #quickstart
127.0.0.1 dev2 #quickstart
127.0.0.1 dev3 #quickstart
Comments
Why are you using /etc/hosts
Why are you using /etc/hosts directory? The directory for quickstart is /home/Desktop/websites/config/hosts. Also did you upgrade quickstart to latest version>
Thanks
Every time I've updated
quickstart is just a vdk so upgrading would just overwrite what I have so far anyway wouldn't it?
/home/Desktop/websites/config/hosts is linked to the /etc/hosts file.
Some things to check
Hi Dunx,
Did you get this resolved?
There's a couple things I'd check right away, listed here from simplest to most involved:
1) CPU vs IO. Is the processor pegged when you're getting these slowdowns?
You can check this with the little graph on the top bar. (not sure when I added it, but it's in 0.9 and 1.0). This will help you understand what is the hardware bottleneck. Generally:
CPU pegged-> check your code for runaway recursion, etc
!CPU pegged -> check code for slow queries or too many queries
2) MySQL slow query log
There is a great article here: http://www.ducea.com/2006/11/06/identifying-mysql-slow-queries/
Slow query logging is turned on by default in QS0.9 and QS1.0. You can find the log file in ~/websites/logs/mysql-slow.log
Any queries in here should be changed.
3) Devel module "Display query log"
Drupal 7's devel module has this feature. I think 6 does as well. This is how to check for too many queries on the site. I once worked on a project where I found 1200 queries on one page. Yikes!
http://drupal.org/project/devel
4) Performance profiling
This let's you see performance issues function by function in a page load. See these videos for help:
Profiling in 0.9+: http://www.youtube.com/watch?v=Xjgwhn_SnZc
Profiling in 0.8+: http://www.youtube.com/watch?v=KmlAdhbwsmY
You should definitely keep pursuing these issues. 100 or 1000 users on the site at the same time will degrade performance much more than Quickstart's virtualization or GUI.
Best luck,
Mike
Mike, many thanks for the
Mike, many thanks for the suggestions.
QS was slow out of the box before I started to do any development work.
1)When I refresh a page, the monitor shows 100% CPU for a second or two. Box is 2.66Ghz with 4Gb (Dell Inspiron 530).
2) Slow logging reveals a handful of slow queries - things like "SELECT * FROM dev2.node_access". Apart from looking at indexes, I can't see any way of improving queries like that. There's no more complex queries logged.
3) Turned on query logging in devel. A complicated advanced_forum+node_comments page has 489 queries and takes 458ms with the slowest queries concerned with INSERTING/UPDATING various cache tables.
4) Haven't done this yet.
The odd thing is it actually seems to running quite quickly today. I just happen to have closed down things like Outlook on the host and nobody else is logged in to the various other accounts on the PC. Does this suggest it's resource hungry at other times?
Yes, it's definitely worth
Yes, it's definitely worth checking to see if your host machine is being bogged down with processes you are not using.
What's the minimum
What's the minimum recommended config then? I know mine's not a new PC, but it's hardly creaking and QS is running from an SSD. Really can't believe more people don't complain about performance, if it's as bad as mine's been, which is why I'm trying to find out if mine's a funny. Perhaps an excuse for a shiny quad though :)
Speed issues
Hi,
Is your pc behind a proxy server and is it only the admin pages which are slow?
No, it's a home office. I
No, it's a home office. I suppose the admin pages like module admin are slow, but I would expect them to be. Other Drupal pages also slow, when I compare them to webcasts when page responses seem instantaneous - I'm waiting for seconds for pages. General non-local web browsing is fast as are other things under QS. Just seems to be localhost that's slow.
OK
I had speed issues in the past caused by the update module ( drupal specific, not quickstart ) . It mainly affected the admin pages and my speed problem was resolved by disabling this module. Might be worth a try...
Regards
Have you read the performance documentation?
http://drupal.org/node/836948
I read that some time ago,
I read that some time ago, but it has been updated, so I'll work through it again.
My box is nothing like as good as the spec you recommend, with just a Intel DUO, but I did get a 80GB SSD, which made a difference. I'm leaning towards a new box I must admit.
Worked though the performance
Worked though the performance page again and tweaked the grub config, but no noticeable improvement. Does seem processor bound by the monitor though. I don't think I can take the thread much further as there doesn't seem to be a magic wand solution. Looks like throwing money it at is the only option.
Thanks to everybody who contributed.
Try
Sorry for late reply as I wasnt in town for a week..but make sure you are not running on a theme (eg zen starter sub theme), that is on development mode or in other terms, your theme may be rebuilding registry on every page load.
2) Secondly double check that you have enough memory given to your php, mysql or virtualbox in general as your memory might be swapping a lot.
Problem may lie anywhere all the way from hardware to some silly configuration settings gone unnoticed.
Thanks