optimize webfm cron file indexing

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
gerold's picture

hello, we have a D6 multi-site (30 sites) and is using webfm module in all of them. our drupal files is around 10gb (and growing) and webfm indexes these files into database during cron run, and this process is taking up resources and takes some time to complete. then we do the same task or webfm indexing for all 30 sites, so they all add up to lots of resources and execution time.

would love to know how these indexing can be optimized. we're also looking at indexing in just one site and sync the index results to the rest of multi-sites since all these sites are just sharing the same files.

thanks in advance!

Comments

A bandaid on a bullet wound

jnicola's picture

A bandaid on a bullet wound would be to use Elysia Cron (Module) to setup when these are indexed to your off hours (2-4am) so as the influence upon visitors will be minimized.

From there, I'm not 100% positive of what is the best course of action, but I'm sure it involves some customization to avoid hitting particular file types you don't want indexed and other exclusion choices to help reduce the total size of all the files you're indexing.

It also might be nice to generate a hash for the sites/default/files and have your indexing check against that hash. Then only run the indexing option if the hash changes (demonstrating new files uploaded).

Jesse Nicola -- Shredical six different ways to Sunday! -- My Portfolio

Hi Jesse -- thanks for the

gerold's picture

Hi Jesse -- thanks for the feedback. Yes i use ultimate cron to set specific time for webfm hook to run.

using the hash for files (caching) is very interesting. i wonder if there's any existing module for this.

thank you!

It sounds like you could

jnicola's picture

It sounds like you could alter the cron job to only trigger if the hash has changed.

I doubt there's a module for this. This seems rather circumstantial... but I could be wrong!

Jesse Nicola -- Shredical six different ways to Sunday! -- My Portfolio

Philippines

Group organizers

Group categories

Post category

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week