Ubercart running very slow on localhost - how can I improve things?

Posts: 9
Joined: 01/13/2008

Hi, I'm Running Drupal 5.7 with UC Beta 5 on Windows XP, using a standard install of XAMPP to provide mySQL and Apache. This runs OK with a basic drupal install, but with UC and all its required modules the performance becomes very slow, taking maybe 10 seconds to show a page in the shop.

I just updated to Beta 6, and now the update.php script won't run - I just get a blank page with no message or anything. And yes, I was logged in as User 1

I'm guessing that mySQL needs to be given more resources to handle all the db calls but haven't a clue what settings to change. As I said, its just an 'out of the box' XAMPP install. Tried loading it onto my laptop with a fresh XAMPP install but got exactly the same behaviour.

Can anyone suggest ways of speeding things up?

Thanks

Jez

Posts: 2086
Joined: 08/07/2007
AdministratoreLiTe!

MySQL has a query cache that should be turned on. Übercart does a lot of the same queries over and over as you do things with it, so that should be your biggest help.

This is more of a guess, but using the MyISAM engine rather than InnoDB might make things a little quicker. MyISAM is usually the default, though, so you might already be using it.

Posts: 9
Joined: 01/13/2008

Thanks Lyle...I'll give that a go. However, unless I can get update.php to run then I'm a bit stuck.

Jez

Posts: 870
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

For your update.php problems, I'll bet you need to increase PHP's memory size. See http://www.ubercart.org/faq/3072

--

<tr>.

Posts: 27
Joined: 01/31/2008

This is probably a beginners answers, but i found the block-cache module gave me great noticable overall site speed-up.

Posts: 9
Joined: 01/13/2008

Thanks TR.

Actually the problem turned out to be a Drupal upgrade issue, where (in my case) a complete copy of my Drupal folder and sub-folders turned up in sites/all/modules. So, to fix it I had to delete the duplicated folders and edit the system table to correct the module paths. See http://drupal.org/node/112884. After following the instructions update.php ran fine.

I checked the PHP memory size and in my case it is already set at 16Mb, but this is a top tip and something I will try to remember to check on the live site.

The site is still a bit sluggish though so I now need to try setting the query cache. Anyone know where I do this?

Edit: I've set up query caching but the site is still slow. I think I need to look at giving MySQL, Apache and/or PHP a few more resources...

Posts: 149
Joined: 08/07/2007
AdministratorNot Kulvik

There is a little known issue with query cache which can cause issues when the cache is larger then 64 megabytes. It can cause mysql to lock up for several minutes when the cache is invalidated. The MySQL guys gave a presentation at DrupalCon Boston about this. If anyone wants more info, go to drupalcon.org and search for the MySQL presentation, or post here and I will post a link in response. The short and sweet is: Use query cache, put don't set it to more then 64M.
Andy

Posts: 870
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

I found this discussion on the drupal.org to be useful: http://drupal.org/node/85768

In particular, get and use the script mentioned there, http://forge.mysql.com/projects/view.php?id=44

--

<tr>.

Posts: 9
Joined: 01/13/2008

Found a weird performance issue related to XAMPP. Sorry if its off topic but may be of interest to someone. Feel free to move it if necessary - I may also post on the Drupal forum.

On my development box I use XAMPP to install and configure mysql, apache and php. My box runs Windows XP (can't get Ubuntu to reliably recognise my wifi card) and I noticed that whenever I started apache and mysql from the XAMPP control panel the hard drive was almost constantly active. I blamed apache for this and spent a good few hours over a several week period trying to find out why. Only then did I check the system monitor (yes, I know I'm an idiot) and found a program called pv.exe was using 15-20% CPU and a fair bit of RAM.

Googled pv.exe and found it is an event logging programme used by XAMPP that seems to be triggering at 1 second intervals. However, turns out it is only launched if you use the XAMPP control panel. Launch XAMPP from the command line, or use xampp_start application, then pv.exe is not started and Drupal/UC run much better.

Hope this helps someone in the future.

Over and out

Jez