Document toolboxDocument toolbox

sp_fru

spfru is one of the main processes within the SERVICEOptimizer system. It is responsible for a major part of the business as usual processing, as well as for some of the tidying process. 

Performance Issue

While an FRU is busy tidying jobs, performance of other operations in that FRU may be affected.  Therefore, job tidying should be scheduled to be run when the FRU is not busy.  Job tidying can be scheduled per day-of-the-week, to take advantage of the fact that most businesses have different busy-periods on different days. The FRU tidying process also deletes jobs in batches to better balance the load on the FRU process.

Configuration for tidying is through Database sp083_system_parameters settings, or equivalent (per FRU) Database sp213_scheduler_parameters settings. The table below shows these, and also compares these settings against their sp_dbtidy equivalents.

DB Name

System Parameter

Similar to

sp_dbtidy option

fru_tidy_enabled

If set to “YES” then the FRU will tidy jobs.

If set to “NO” no tidying will be performed regardless of the setting of other parameters in this table.

 

fru_tidy_ jobs_ days_before

Unlike the sp_dbtidy “-e” parameter, the date can only be specified as a number of days in the past.

Integer: range sp083.glob_days_before to (unlimited). It also excludes the day specified so if the value is set to 7 then it tidies day 8 backwards.

Installed as FRU memory horizon start.

-e

fru_tidy_unfinished_ jobs

If set to “YES” then tidy job of any dispatch status otherwise just Cleared jobs.

Installed as “NO”

-j

fru_tidy_ intray_ days_before

Unlike “-i” the date can only be specified as a number of days in the past.

Integer: range sp083.glob_days_before  to (unlimited). It excludes the day specified so if the value is set to 7 then it tidies day 8 backwards.

A value of 0 means do not tidy intray jobs.

Installed as 0

-i

fru_tidy_ commit_count

This specifies the number of jobs that are tidied before a database commit is performed. This parameter should be used to limit the amount of database resource used during the tidy operation.

Integer: range 1 to (unlimited).

Installed as 500.

-c

Scheduling Tidy in spfru

The schedule is formed by specifying up to 3 tasks per day and provides the following information:

  • Start Time
  • Duration
  • Batch Size
  • Tidy Interval

This data needs to be added to the database table Database sp320_dbtidy_schedule.

Both an instance wide/default schedule and a per FRU schedule can be specified, both of which are mutually exclusive.

  • If fru_tidy_enabled is set to “YES” (in sp213_scheduler_parameters or sp083_system_parameters), and there is no specific FRU entry in sp320_dbtidy_schedule, then the FRU obeys the default schedule values.
  • If fru_tidy_enabled is set to “YES” (in sp213_scheduler_parameters or sp083_system_parameters) and there is a specific schedule for this FRU defined in sp320_dbtidy_schedule, then the FRU will use that schedule and ignore the default schedule entirely.

A default schedule is set up when upgrading the database using dbinstall. It has a FRU_NO which corresponds to the ROOT resp_unit_no that can be found in sp056_responsibility_units.

Some Useful Tips

The following system (sp083_system_parameters) or FRU (sp213_scheduler_parameters) parameters need to be specified to activate FRU tidying:

  • Set fru_tidy_enabled to YES
  • Set fru_tidy_jobs_days_before as you would set the –e option to sp_dbtidy. Note this is a day offset rather than a date.
  • Set fru_tidy_unfinished_jobs to YES if the –j option is normally specified, otherwise NO
  • Set fru_tidy_intray_days_before to 0 for no intray deletions, otherwise the way you would set the –i option.
  • Set fru_tidy_commit_count as you would set the –c option if the –c option is not specified then set this value to 500.

To setup a specific FRU then tailor the following SQL:

INSERT INTO SP320_DBTIDY_SCHEDULE(FRU_NO, DAY_OF_WEEK, TIME_OF_DAY, DURATION, BATCH_SIZE, TIDY_INTERVAL)
     VALUES(<FRU_NO>, 0, <TIME_OF_DAY>, <DURATION>, <BATCH_SIZE>, <TIDY_INTERVAL>)
INSERT INTO SP320_DBTIDY_SCHEDULE(FRU_NO, DAY_OF_WEEK, TIME_OF_DAY, DURATION, BATCH_SIZE, TIDY_INTERVAL)
     VALUES(<FRU_NO>, 1, <TIME_OF_DAY>, <DURATION>, <BATCH_SIZE>, <TIDY_INTERVAL>)
INSERT INTO SP320_DBTIDY_SCHEDULE(FRU_NO, DAY_OF_WEEK, TIME_OF_DAY, DURATION, BATCH_SIZE, TIDY_INTERVAL)
     VALUES(<FRU_NO>, 2, <TIME_OF_DAY>, <DURATION>, <BATCH_SIZE>, <TIDY_INTERVAL>)
INSERT INTO SP320_DBTIDY_SCHEDULE(FRU_NO, DAY_OF_WEEK, TIME_OF_DAY, DURATION, BATCH_SIZE, TIDY_INTERVAL)
     VALUES(<FRU_NO>, 3, <TIME_OF_DAY>, <DURATION>, <BATCH_SIZE>, <TIDY_INTERVAL>)
INSERT INTO SP320_DBTIDY_SCHEDULE(FRU_NO, DAY_OF_WEEK, TIME_OF_DAY, DURATION, BATCH_SIZE, TIDY_INTERVAL)
     VALUES(<FRU_NO>, 4, <TIME_OF_DAY>, <DURATION>, <BATCH_SIZE>, <TIDY_INTERVAL>)
INSERT INTO SP320_DBTIDY_SCHEDULE(FRU_NO, DAY_OF_WEEK, TIME_OF_DAY, DURATION, BATCH_SIZE, TIDY_INTERVAL)
     VALUES(<FRU_NO>, 5, <TIME_OF_DAY>, <DURATION>, <BATCH_SIZE>, <TIDY_INTERVAL>)
INSERT INTO SP320_DBTIDY_SCHEDULE(FRU_NO, DAY_OF_WEEK, TIME_OF_DAY, DURATION, BATCH_SIZE, TIDY_INTERVAL)
     VALUES(<FRU_NO>, 6, <TIME_OF_DAY>, <DURATION>, <BATCH_SIZE>, <TIDY_INTERVAL>)

Replacing the values between ‘<’ and ‘>’ with appropriate values.