Navigation:  Features >

Service Scheduling

Previous pageReturn to chapter overviewNext page

The ImageServer has a number of services that periodically run. The Service Scheduling configuration page allows for enabling and configuration of these services. The current ImageServer release allows for configuration of when the disk management service is run, enabling and running a service that reapplies disk management related rules to all studies on a filesystem, and reinventorying a filesystem. Service scheduling entries are typically per filesystem configured. (New entries are added when a filesystem is added.) The following table further describes each type of service:

Service Type

Description

Filesystem Watermark Check

This services checks if a filesystem is above its high watermark. If the filesystem is above the high watermark it migrates studies, deletes studies, and purges studies until the low watermark is reached.

Filesystem Reinventory

This service re-inventories the studies stored on a filesystem. It scans the contents of the filesystem, and if a study is not already stored in the database, it will insert records to process the study into the WorkQueue. See the ImageServer Upgrade page for further details. This service is disabled by default and will disable itself after it runs once.

Filesystem Reapply Rules

This service scans the contents of a filesystem and reapplies Study Processing rules to all studies on the filesystem. This service is disabled by default and will disable itself after it runs once.

Filesystem Lossless Compress

This service checks for studies that are eligible to be lossless compressed on a filesystem. It works independently from the watermarks configured for the filesystem and will insert records into the WorkQueue to compress the studies as soon as they are eligible.

Filesystem Lossy Compress

This service checks for studies that are eligible to be lossy compressed on a filesystem. It works independently from the watermarks configured for the filesystem and will insert records into the WorkQueue to compress the studies as soon as they are eligible.

Filesystem Rebuild Study XML

Rebuild the Study XML file for each study stored on the Filesystem.

Import DICOM Files

This service periodically scans the filesystem for dicom files and imports them into the system.

Archive Application Log

This service removes application log entries from the database and archives them in zip files to a filesystem. When initially run, it selects a filesystem from the lowest filesystem tier configured on the system.

Purge Alerts

This service by default removes Alert records from the database after a configurable time. If configured it can save the alerts in zip files on a filesystem. When initially run, it selects a filesystem from the lowest filesystem tier configured on the system to archive to.

Note that services can be disabled and rescheduled. This can be used to disable disk management if the user's desire is to not have any studies removed from the system. When the service is running, the configuration page will display the service as locked.

Technical Note

The Service Scheduling Web GUI page corresponds to the ServiceLock page in the database.

The following sections give additional detail on the types of services listed on the service scheduling page.

Filesystem Watermark Check

The Filesystem Watermark Check service is the main disk management service for the ImageServer. A series of checks are performed by this service:

1.When the ImageServer is configured with multiple tiers of storage and a filesystem is above the high watermark, this service will first check if studies can be migrated to the next lower tier of storage.
2.If the low watermark is not reached, or if there is not a lower level tier of storage configured, the ImageServer will check if any studies are eligible for deletion on the filesystem.
3.Finally, if the ImageServer is configured as an archive, the service will check for studies that are eligible to be purged from the filesystem.

Notes

The service itself does not do the actual work for each of these actions. It creates WorkQueue entries that perform the actual work.  This allows the work to be spread across servers and threads to increase throughput of processing.  Because the actual work being done is disconnected from the scheduling of the work in the WorkQueue, the service does a calculation as to how much physical disk space must be cleared to reach the low watermark.  It then calculates how much disk space is gained with each study that is operated on so that it knows when it has scheduled enough studies to be worked on that it will approximately reach the low watermark.
Appropriate Server Rules must be configured so that the ImageServer knows when a study is eligible for archiving, deletion, or tier migration.

Filesystem Lossless Compress

The Filesystem Lossless Compress service is used to check when studies are eligible for lossless compression and schedule that compression in the WorkQueue.

 

Notes

Compression does not occur based on the watermark of a filesystem, but based on the time when a study is eligible for compression, based on the server rule that defined the compression.  Studies will automatically be compressed when they become eligible based on the server rules.
When a study is eligible for compression is determined by a Study Compress Server Rule.

Filesystem Lossy Compress

The Filesystem Lossy Compress service is used to check when studies are eligible for lossy compression, and schedule that compression in the WorkQueue. Separate entries were created for lossless and lossy compression, so that lossy and/or lossless compression can be disabled individually.

Filesystem Reinventory

The Filesystem Reinventory service is used to check the contents of a filesystem, and reinsert into the database any study that is found on the filesystem that is not already in the database.  When the ImageServer is configured as a temporary cache, this service can be used as an easy way to perform upgrades. See the upgrade section for more details.  The Filesystem Reinventory service is disabled by default. After it is run one time, it also disables itself.

Warning

If there are many studies in the system, reinventory may take a long time to complete.  Restarting the server while the service is running will cause the reinventory to start from the beginning.  Note, however, that studies that have already been reinventoried will be passed over.

Filesystem Reapply Rules

The Filesystem Reapply Rules Studies service can be used to reapply server rules on the studies on a filesystem when they change.  The ImageServer is designed to work with a high volume of studies.  A design decision was made early on to apply rules when a study is being processed, and to store the output of those rules for disk management purposes.  For this reason, the Filesystem Reapply Rules service must be run if the rules are changed.

For instance, if there is a desire to introduce compression rules, this service can be run after the rules have been configured so that studies that already exist on the filesystem have the rules run against them.  The current disk management related entries for a study can be viewed from the Study Details page.  The Filesystem Reapply Rules service is disabled by default. After it runs once, it also disables itself.

Filesystem Rebuild Study XML

The Filesystem Rebuild Study XML service can be used to rebuild the Study XML files associated with each study.  The Study XML files are used to support streaming to the ClearCanvas Viewer, and also to store image level information about studies.  There have been several changes in the content of these files between ImageServer releases which necessitated rebuilding the Study XML files.  This service is used to accomplish the rebuild for each filesystem.

The release notes for an ImageServer release will include a note if the XML files should be rebuilt.

Import DICOM Files

The Import DICOM Files service can be used to directly import files into the ImageServer, bypassing the DICOM service.  The ImageServer selects a Tier 1 filesystem when it starts up the first time add adds a folder in the root of the filesystem for importing.  The service will periodically schedule itself to examine the contents of the directory and import any DICOM files from this directory into the ImageServer.

Technical Note

Folders used for importing have special names that reflect the server partition they are associated with.  For instance, to import files into the server partition with the AE Title "ImageServer", copy the files into the "ImageServer_Incoming" folder.

Archive Application Log

The ImageServer software uses a Log4Net appender to automatically insert logs into the database.  The logs are inserted from both the web GUI's logs and the Windows service.  When using clustered servers, the logs from all the servers are also added to the database for viewing on the Web GUI.  Because of the volume of log messages, it is impractical to keep these logs in the database permanently.  The Archive Application Log service runs once daily, and archives log messages older than a configured number of days (the default is 2 days) to one of the filesystems.

When archiving, the log files are placed in zip files for each day, and the zip files are stored in a folder for each month the ImageServer is operating.  The first time the service runs, it selects a filesystem for archival.  It picks a filesystem on the lowest configured filesystem tier of storage when it first runs.

Purge Alerts

The Purge Alerts service is used to automatically purge Alerts from the database and achive them to a filesystem.  This service operates in a similar manner to the Archive Application Log service.  Alerts are archived to a filesystem on the lowest tier of storage.  Note that archival of alerts is disabled by default and must be enabled in the ClearCanvas.ImageServer.ShredHostService.exe.config file.