IP SLAs Random Scheduler
Though the IP SLAs multioperation scheduling functionality helps in scheduling thousands of operations, you should be cautious when specifying the number of operations, the schedule period, and the frequency to avoid any significant CPU impact.
For example, consider a scenario where you are scheduling 1 to 780 operations at a schedule period of 60 seconds. The command would be as follows:
IP SLAs calculates how many operations it should start in each 1-second interval by dividing the number of operations by the schedule period (780 operations divided by 60 seconds, which is 13 operations per second). Operations 1 to 13 in multioperation group 2 start after 0 seconds, operations 14 to 26 start after 1 second, operations 27 to 40 start after 2 seconds, and the iteration continues until operations 768 to 780 start after 59 seconds. This high value of operations starting at every 1-second interval (especially for jitter operations) can load the CPU to very high values.
On a Cisco 2600 router, the maximum recommended value of operations per second is 6 or 7 (approximately 350 to 400 operations per minute). Exceeding this value of 6 or 7 operations per second could cause major performance (CPU) impact. Note that the maximum recommended value of operations per second varies from platform to platform.
No warning messages will be displayed if IP SLAs multiple operations scheduling leads to a high number of operations starting per second.
When you reboot the router, the IP SLAs multiple operations scheduling functionality schedules the operations in the same order as was done before the reboot. For example, assume the following operation had been scheduled:
Over a range of 40 seconds, 20 operations have to be started (that is, one operation every 2 seconds). After the system reboot, operation 1 will start at
t seconds and operation 2 starts at
t +2 seconds, operation 3 starts at
t +4 seconds, and so on.
The IP SLAs multiple operations scheduling functionality schedules the maximum number of operations possible without aborting. However, this functionality skips those IP SLAs operations that are already running or those that are not configured and hence do not exist. The total number of operations will be calculated based on the number of operations specified in the command, irrespective of the number of operations that are missing or already running. The IP SLAs multiple operations scheduling functionality displays a message showing the number of active and missing operations. However, these messages are displayed only if you schedule operations that are not configured or are already running.
keyword with the
keyword to randomly choose a scheduled start time for the
operation. A random number of milliseconds between 0 and the
specified value will be added to the current time to define the
start time. The value provided for the random start time applies
only to the first time the operation runs after which normal
frequency rules apply.
In Cisco IOS Release 15.2(4)T and later releases, and in Cisco IOS Release 15.1(1)T, a single operation ID is a valid option for the
operation-ids argument. Before Cisco IOS Release 15.1(1)T and in releases between Cisco IOS Release 15.1(1)T and 15.2(4)T, the
ip sla group schedule command was not used to schedule a single operation because the only valid options for the
operation-ids argument were a list (id,id,id) of IDs, a range (id-id) of IDs, or a combination of lists and ranges. If you attempted to use this command to schedule a single operation, the following messages were displayed:
Router(config)# sla group schedule 1 1 schedule-period 5 start-time now
%Group Scheduler: probe list wrong syntax
%Group schedule string of probe ID's incorrect
Before Cisco IOS Release 15.1(4)M, if an IP SLAs probe that included the
enhanced command was added to a multioperation scheduler and the enhanced-history interval was not a multiple of the scheduler frequency, the enhanced-history interval was overwritten and set to a multiple of the scheduler frequency.
In Cisco IOS Release 15.1(4)M and later releases, if an IP SLAs probe that includes the
enhanced command is added to a multioperation scheduler and the enhanced-history interval is not a multiple of the scheduler frequency, the probe is not scheduled and the following message is displayed:
Warning, some probes not scheduled because they have Enhanced History Interval which not multiple of group frequency.
The IP SLAs random scheduler option provides the capability to schedule multiple IP SLAs operations to begin at random intervals over a specified duration of time. The random scheduler option is disabled by default. To enable the random scheduler option, you must configure the
random-frequency-range keywords and argument. The operations within the multioperation schedule restart at uniformly distributed random frequencies within the specified frequency range. The following guidelines apply for setting the frequency range:
The starting value of the frequency range should be greater than the timeout values of all the operations in the multioperation schedule.
The starting value of the frequency range should be greater than the schedule period (amount of time for which the group of operations is scheduled). This guideline ensures that the same operation does not get scheduled more than once within the schedule period.
The following guidelines apply if the random scheduler option is enabled:
The individual operations in a multioperation schedule will be uniformly distributed to begin at random intervals over the schedule period.
The operations within the multioperation schedule restart at uniformly distributed random frequencies within the specified frequency range.
The minimum time interval between the start of each operation in a multioperation schedule is 100 milliseconds (0.1 seconds). If the random scheduler option is disabled, the minimum time interval is 1 second.
Only one operation can be scheduled to begin at any given time. If the random scheduler option is disabled, multiple operations can begin at the same time.
The first operation will always begin at 0 milliseconds of the schedule period.
The order in which each operation in a multioperation schedule begins is random.
Before Cisco IOS Release 15.1(4)M, if an IP SLAs probe that includes the
enhanced command is added to a random scheduler, the probe may or may not be scheduled.
In Cisco IOS Release 15.1(4)M and later releases, if an IP SLAs probe that includes the
enhanced command is added to a random scheduler, the probe is not scheduled and the following message is displayed:
Warning, some probes not scheduled because they have Enhanced History configured.
The following guidelines apply when an IP SLAs operation is added to or deleted from an existing multioperation schedule:
If an operation is added that already belongs to the multioperation schedule, no action is taken.
If two or more operations are added after the multioperation schedule has started, then the start times of the newly added operations will be uniformly distributed based on a time interval that was calculated prior to the addition of the new operations. If two or more operations are added before the multioperation schedule has started, then the time interval is recalculated based on both the existing and newly added operations.
If an operation is added to a multioperation schedule in which the random scheduler option is enabled, then the start time and frequency of the newly added operation will be randomly chosen within the specified parameters.
If an operation is added to a multioperation schedule in which the existing operations have aged out or the lifetimes of the existing operations have ended, the newly added operation will start and remain active for the amount of time specified by the multioperation schedule.
If an active operation is deleted, then the operation will stop collecting information and become inactive.
reschedule command is entered after an operation is added or deleted, the time interval between the start times of the operations is recalculated based on the new number of operations belonging to the multioperation schedule.
The following example shows how to schedule IP SLAs operations 3, 4, and 6 to 10 (identified as group 1) using multioperation scheduling. In this example, the operations are scheduled to begin at equal intervals over a schedule period of 20 seconds. The first operation (or set of operations) is scheduled to start immediately. Since the frequency is not specified, it is set to the value of the schedule period (20 seconds) by default.
ip sla group schedule 1 3, 4, 6-10 schedule-period 20 start-time now
The following example shows how to schedule IP SLAs operations 1 to 3 (identified as group 2) using the random scheduler option. In this example, the operations are scheduled to begin at random intervals over a schedule period of 50 seconds. The first operation is scheduled to start immediately. The frequency at which each operation will restart will be chosen randomly within the range of 80 to 100 seconds.
ip sla group schedule 2 1-3 schedule-period 50 frequency range 80-100 start-time now