Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cylc task-message: unified message queue #1809

Merged
merged 1 commit into from
Apr 27, 2016

Conversation

benfitzpatrick
Copy link
Contributor

Each task currently has its own individual message queue, which contains a relatively expensive Queue.Queue object. As we get more and more tasks in a suite, this becomes increasingly unwieldy to keep in memory and to keep checking for new messages.

This change rolls the queues up into a single task pool message queue. It saves around 20% of the per-task memory for the minimal tasks I've tested, which is around 10% of the total memory usage - a surprising amount. The CPU usage is reduced by a couple of percent for a 'super-busy' suite, largely just due to not calling qsize as much.

Due to the communication change, this will break daemon-task mismatched versions before and after this PR, so I've initially put this in the soon milestone.

I've also added a proper profiling behaviour on running with the --profile switch - it is kind of a pain to keep git stashing and stash applying this bit of code!

@hjoliver, @matthewrmshin please review.

@benfitzpatrick benfitzpatrick added this to the soon milestone Apr 25, 2016
@matthewrmshin
Copy link
Contributor

Looks OK 2. Tests OK (with and without global configuration) in my environment.

@hjoliver
Copy link
Member

Review 1 - good, tests OK here too.

this will break daemon-task mismatched versions before and after this PR, so I've initially put this in the soon milestone.

This is good to merge as far as I'm concerned, so I'll assign back to @matthewrmshin to make the decision - next release or not - based on your site requirements.

@hjoliver hjoliver assigned matthewrmshin and unassigned hjoliver Apr 26, 2016
@matthewrmshin matthewrmshin modified the milestones: next-release, soon Apr 27, 2016
@matthewrmshin
Copy link
Contributor

I'll merge, as this change appears to make things more stable in various tests.

@matthewrmshin matthewrmshin merged commit 303cc16 into cylc:master Apr 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants