When a hostmaster site has many thousands of hosting_task records, it will slow down significantly, especially if you're doing views bulk operations with hosting tasks, but I imagine this would account for a lot of overhead in processing tasks generally.

The reason for this is there are missing indexes in the hosting_task and hosting_task_arguments tables, leading to full table scans when you join these.

I sped things up significantly by adding these 3 indexes:

drush @hostmaster sqlq 'create index vid on hosting_task_arguments (vid);'
drush @hostmaster sqlq 'create index nid on hosting_task_arguments (nid);'
drush @hostmaster sqlq 'create index nid on hosting_task (nid);'

This should probably be done in the module, however.
There may be other indexes that would help, but I haven't logged all the indexless queries yet.
Adding these 3 indexes vastly sped up a VBO I was running (to delete over 20k old hosting tasks)

CommentFileSizeAuthor
#2 2974363-extra-indexes.patch1.36 KBhelmo

Comments

millenniumtree created an issue. See original summary.

helmo’s picture

Status: Active » Needs review
StatusFileSize
new1.36 KB

Thanks, this patch should do that on other systems.

helmo’s picture

Status: Needs review » Fixed

merged

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.