Thanks to visit codestin.com
Credit goes to github.com

Skip to content

STEE: smarter idle waiting for scheduled tasks#81

Merged
nayato merged 1 commit intoAzure:devfrom
nayato:no-breakout
Apr 6, 2016
Merged

STEE: smarter idle waiting for scheduled tasks#81
nayato merged 1 commit intoAzure:devfrom
nayato:no-breakout

Conversation

@nayato
Copy link
Member

@nayato nayato commented Apr 6, 2016

Motivation:
use of breakoutInterval setting on SingleThreadEventExecutor while executor is idling is confusing to users and inefficient due to fixed interval wake ups. We can do better by peeking next scheduled task and use its deadline for wait timeout.
While breakoutInterval is still useful while executor is busy, it can be reduced now to much lower number without impacting idle performance.

Modifications:

  • When going to wait due to empty immediate queue, consult with scheduled task queue to figure out timeout value (next task's deadline - now).
  • default breakoutInterval changed to 100 ms for higher resolution for scheduled tasks while busy.

Result:
Better precision for scheduled tasks at no performance cost while idling.

Motivation:
use of breakoutInterval setting on SingleThreadEventExecutor while executor is idling is confusing to users and inefficient due to fixed interval wake ups. We can do better by peeking next scheduled task and use its deadline for wait timeout.
While breakoutInterval is still useful while executor is busy, it can be reduced now to much lower number without impacting idle performance.

Modifications:
- When going to wait due to empty immediate queue, consult with scheduled task queue to figure out timeout value (next task's deadline - now).
- default breakoutInterval changed to 100 ms for higher resolution for scheduled tasks while busy.

Result:
Better precision for scheduled tasks at no performance cost while idling.
@mtuchkov
Copy link
Contributor

mtuchkov commented Apr 6, 2016

Sounds good

@nayato nayato merged commit ed028ed into Azure:dev Apr 6, 2016
@nayato nayato deleted the no-breakout branch April 10, 2016 22:04
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