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
Using for + Supply.list results in high CPU usage #3629
Comments
From @hoelzroSee the attached script. When running the script, CPU usage (as reported by top) is very high. |
From @hoelzroOn Sun Dec 28 18:05:18 2014, rob@hoelz.ro wrote:
For that matter, iterating over Supply.Channel results in high CPU usage as well. |
From @hoelzroOn Sun Dec 28 18:06:47 2014, rob@hoelz.ro wrote:
So far, it seems to be Channel.list which is the culprit. |
From @hoelzroOn Sun Dec 28 18:08:28 2014, rob@hoelz.ro wrote:
Ok, any usage of earliest { ... } seems to go through a busy waiting loop unless a wait block is specified. |
From @lizmat
Looking deeper into the code, this appears to be caused by the implementation of “earliest” (former “winner”), which basically does a Thread.yield(): loop { Thread.yield } This also eats 100% of one CPU. Not sure whether this is intended behaviour of Thread.yield or not. Having to use Thread.yield in “earliest” may also be sub-optimal. Liz |
The RT System itself - Status changed from 'new' to 'open' |
From @moritzOn 29.12.2014 13:44, Elizabeth Mattijsen wrote:
yield just tells the scheduler to prefer another thread; if no other
Agreed. Cheers, |
From @hoelzroCommit 49dac31 addresses this; since the subject of the ticket is resolved, I'm going to close this ticket and create a new one to address the busy waiting issue. On Mon Dec 29 05:00:57 2014, moritz.lenz@gmail.com wrote:
|
@hoelzro - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#123515 (status was 'resolved')
Searchable as RT123515$
The text was updated successfully, but these errors were encountered: