Skip to content
Commit 1d0d4bff authored by Kweku Adams's avatar Kweku Adams
Browse files

Changing default limits, clarify flags, fix bug.

1. Lower job count limits to values that should be more reasonable. The
following defaults have changed:
-- MAX_JOB_COUNT_ACTIVE = 20/window = 120/hr = 1/session
  (down from 200/window = 1200/hr = 10/session)
-- MAX_JOB_COUNT_WORKING = 120/window = 60/hr = 12/session
  (down from 1200/window = 600/hr = 120/session)
-- MAX_JOB_COUNT_FREQUENT = 200/window = 25/hr = 25/session
  (down from 1800/window = 225/hr = 225/session)
-- MAX_JOB_COUNT_RARE = 48/window = 2/hr = 16/session
  (down from 2400/window = 100/hr = 800/session)

2. Increase timing session coalescing duration to enable coalescing.
-- TIMING_SESSION_COALESCING_DURATION_MS = 5 seconds (up from 0ms)

3. Separate allowed time flag from rate limiting period flag so they can
be changed independently.

4. Fix bug: If an app reached the job count quota limit for its bucket,
QuotaController would set an alarm only 10 minutes (allowed time) into
the future to determine if the app was back in quota. This would result
in unnecessary wakeup alarms. Now, QC will set an alarm for when the
app will be under quota.

5. Expand some comments, clarify some constants, and simplify some code.

Bug: 132227621
Test: atest com.android.server.job.controllers.QuotaControllerTest
Test: CtsJobSchedulerTestCases
Change-Id: I6f3f3a5eff7f64b429820d7370d82c1b4573f23b
parent 0a8fcb3a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment