View Issue Details

IDProjectCategoryView StatusLast Update
0005656Composrcorepublic2024-07-23 16:56
ReporterPatrick SchmalstigAssigned ToPatrick Schmalstig 
SeverityFeature-request 
Status resolvedResolutionfixed 
Product Version 
Fixed in Version 
Summary0005656: Optimise task queue more intelligently
DescriptionDue to a memory issue if the task queue got populated too much, I implemented a temporary fix by limiting to 50 tasks per Cron cycle.

Let's make this more intelligent because not every task demands the same resources as other tasks, so we could intelligently fluctuate the number of tasks we run on a cycle depending on what tasks there are to run.

Let's track time. Process each task one at a time instead of locking a set number of tasks at once. After each task finishes, check how much time we spent so far processing background tasks. Once we reach, say, 15 seconds, then stop there for this Cron cycle. We could make this a config option as well for specifying how long to spend max on the task queue for each Cron cycle.
TagsRoadmap: v11
Time estimation (hours)
Sponsorship open

Relationships

related to 0003958 non-assigned Opportunistic scheduler 
related to 0005586 assignedPatrick Schmalstig Task queue: Cron does not respect number of locked tasks; maybe it should 

Activities

Patrick Schmalstig

2024-04-14 23:50

administrator   ~0008593

I decided on 10 seconds or 3,900 total database queries so far for the Cron run

Patrick Schmalstig

2024-07-23 16:55

administrator   ~0008896

Last edited: 2024-07-23 16:56

View 3 revisions

Ideally this method should be replaced by 0003958 in the future; this is a good temporary solution IMO until we can code in the more complex one. The major drawback is this one just runs tasks in hook order, so higher hooks have higher priority.

Issue History

Date Modified Username Field Change
2024-03-30 23:57 Patrick Schmalstig New Issue
2024-03-30 23:57 Patrick Schmalstig Status non-assigned => assigned
2024-03-30 23:57 Patrick Schmalstig Assigned To => Patrick Schmalstig
2024-03-30 23:57 Patrick Schmalstig Tag Attached: Roadmap: v11
2024-04-12 19:00 Patrick Schmalstig Status assigned => resolved
2024-04-12 19:00 Patrick Schmalstig Resolution open => fixed
2024-04-14 23:50 Patrick Schmalstig Note Added: 0008593
2024-07-23 14:57 Chris Graham Relationship added related to 0003958
2024-07-23 15:03 Chris Graham Relationship added related to 0005586
2024-07-23 16:55 Patrick Schmalstig Note Added: 0008896
2024-07-23 16:55 Patrick Schmalstig Note Edited: 0008896 View Revisions
2024-07-23 16:56 Patrick Schmalstig Note Edited: 0008896 View Revisions