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)
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2974363-extra-indexes.patch | 1.36 KB | helmo |
Comments
Comment #2
helmo commentedThanks, this patch should do that on other systems.
Comment #3
helmo commentedmerged