when cron is running, apache PID peaks, and blocking the server response. is it possible to limit the cron CPU usage and leave some headroom for HTTP requests?
-
While "Drupal" is in the title of the question, is could just as well not be. "Cron" doesn't have much of a connection to Drupal, it's just getting called. Server resources should most likely be handled somewhere else.– LetharionCommented Jul 1, 2012 at 13:10
-
I agree that my question is almost "off-topic", the thing is that if drupal was activating the OS cron proccess, I wouldn't ask my question here, but Drupal triggers apache proccess to execute cron. So the question here is actually is there anything from within Drupal that I'm not aware of that could provide functionality similar to my question, or maybe is there a solution to execute drupal cron with the OS cron proccess? Then I could use cpulimit to get what I need...– alechkoCommented Jul 1, 2012 at 13:19
-
Set up a regular cron job, and de-activate the "poor mans cron" that comes with D7, and you will get better control over the situation. :) drupal.org/cron– LetharionCommented Jul 1, 2012 at 13:27
-
Even if I disable the core cron (setting it to "Never" is the same as setting it from settings.php), and using manual cron job like described here: drupal.org/node/23714 , all methods mentioned there are drupal-script cron, so that means apache is dealing with it, and not OS cron. Anyway, I see that the only solution is to get a better time-wise distribution of cron proccesses rather then trying to achieve CPU limit.– alechkoCommented Jul 2, 2012 at 7:31
Add a comment
|
1 Answer
You can use this module elysia_cron Elysia Cron extends Drupal standard cron, allowing a fine grain control over each task and several ways to add custom cron jobs to your site.
Elysia cron is usually used in large sites that needs performance optimization.
-
I've been looking in several cron-related modules, and while I can split several cron tasks into different cron jobs, it still won't solve the problem, and when the cron runs it's still gona use 100% CPU, only for a smaller time period. What I'm trying to achieve is getting the cron working on 80% CPU (more or less) so that my apache server would be able to handle request during cron run, and then I could refine tasks into different jobs.– alechkoCommented Jul 1, 2012 at 10:34
-
I've setup this module, and id does getting me some some advanced controls over cron settings and insights into each cron job. I can't get what I wanted in origin, but that sure will do ! thank you!– alechkoCommented Jul 2, 2012 at 7:40