Deletion of least recently accessed studies - dcm4che/dcm4chee-arc-light GitHub Wiki

Overview

This feature can be used when user wants to free up space from storage systems which are being used for cache archiving purpose and space on these systems is limited. Enabling this feature activates the auto deletion of those studies whose access time are the oldest when the value set in deleter threshold has been reached.

Configuration for Deletion

Using Archive UI

  1. Go to Menu->Configuration, then on Devices page, Edit the dcm4chee-arc device. Go to Extensions and
    Edit extension of Device Extension. Again go to its Extensions and Edit extension of Archive Device.
  2. Enter values in fields Purge Storage Polling Interval, Purge Storage Fetch Size and Delete Study Batch Size as required by one's application needs and Save.
  3. Next go to the archive device extension's Child Objects and select a storage from Storage Descriptor for which this feature needs to be enable this feature. Enter value for field Deleter Threshold. One may add more than one Deleter Threshold and Save.

Note :

  • From version 5.13.1 onwards upto version 5.15.0, one has to set field No Deletion Constraint to true, if one wants unconstrained deletion of studies from filesystem. This is because a feature is implemented to delete studies when threshold is reached only if studies are available on Nearline Storage specified by Export Storage ID or on External Retrieve Location specified by External Retrieve AET.
  • From version 5.16.0 onwards, No Deletion Constraint has been removed and enumeration for Storage Duration has been added instead. The value may be set to TEMPORARY, if it is the only storage system. It can be set to CACHE, and it would make sense to also have objects either on External Retrieve Location or Nearline Storage, so that the objects can be retrieved later if required.

Using LDAP

One may either

  • create a LDIF file (e.g.):

          version: 1
          dn: dcmStorageID=fs1,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
          changetype: modify
          add: dcmDeleterThreshold
          dcmDeleterThreshold: 500MB
          -
          
          dn: dcmStorageID=fs1,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
          changetype: modify
          add: dcmDeleterThreshold
          dcmDeleterThreshold: 1[hour=10-11 dayOfWeek=*]100MB
          -
          
          dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
          changetype: modify
          add: dcmPurgeStoragePollingInterval
          dcmPurgeStoragePollingInterval: PT5M
          -
          
          dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
          changetype: modify
          add: dcmPurgeStorageFetchSize
          dcmPurgeStorageFetchSize: 100
          -
          
          dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
          changetype: modify
          add: dcmDeleteStudyBatchSize
          dcmDeleteStudyBatchSize: 10
          -
    

For versions 5.13.1 to 5.15.0

        dn: dcmStorageID=fs1,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
        changetype: modify
        add: dcmNoDeletionConstraint
        dcmNoDeletionConstraint: true
        -

For versions 5.15.1 onwards

        dn: dcmStorageID=fs1,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
        changetype: modify
        add: dcmStorageDuration
        dcmStorageDuration: TEMPORARY
        -

and import it to the LDAP Server by using the ldapmodify command line utility.

  • or use the Add Attribute... and Add Value... function of Apache Directory Studio to add attributes on Storage Level (e.g.: dcmStorageID=dcm4chee_store) in the Archive Configuration.

One may refer to Storage Descriptor and Archive Device to understand the description of attributes.

Above example shows that one may add one or more deleter thresholds depending on one's application. Value of 2nd dcmDeleterThreshold is explained below :

  • priority = 1
  • size = 100MB
  • schedule = timings between 10a.m. to 11a.m. any day of the week

Refer ISO-8601 Duration format for more know-how on Durations.

Go to the Control tab on Configuration page in archive UI and reload the configuration.

Below is log snippet once this feature is activated (i.e. on auto deletion after the configured intervals)

2016-01-26 15:04:49,021 INFO  [org.dcm4chee.arc.delete.impl.PurgeStorageScheduler] (EE-ManagedScheduledExecutorService-default-Thread-2) Successfully delete Study[pk=7919, uid=2.16.124.113543.6004.101.103.20021117.192613.1, id=2K-ANATM] on file:///srv/retrievecache from database
2016-01-26 15:04:49,034 INFO  [org.dcm4chee.arc.delete.impl.PurgeStorageScheduler] (EE-ManagedScheduledExecutorService-default-Thread-2) Successfully delete Location[pk=1271475, systemID=dcm4chee_store, path=2016/01/26/B4E078D8/EBDDF01B/F54E1477, tsuid=1.2.840.10008.1.2.4.80, size=4150696, status=TO_DELETE] from file:///srv/retrievecache
2016-01-26 15:04:49,040 INFO  [org.dcm4chee.arc.delete.impl.PurgeStorageScheduler] (EE-ManagedScheduledExecutorService-default-Thread-2) Successfully delete Location[pk=1271418, systemID=dcm4chee_store, path=2016/01/26/B4E078D8/EBDDF01C/B5322463, tsuid=1.2.840.10008.1.2.4.80, size=3371384, status=TO_DELETE] from file:///srv/retrievecache
2016-01-26 15:04:49,045 INFO  [org.dcm4chee.arc.delete.impl.PurgeStorageScheduler] (EE-ManagedScheduledExecutorService-default-Thread-2) Successfully delete Location[pk=1271398, systemID=dcm4chee_store, path=2016/01/26/B4E078D8/EBDDF01D/98A7DAE6, tsuid=1.2.840.10008.1.2.4.80, size=3406152, status=TO_DELETE] from file:///srv/retrievecache
2016-01-26 15:04:49,050 INFO  [org.dcm4chee.arc.delete.impl.PurgeStorageScheduler] (EE-ManagedScheduledExecutorService-default-Thread-2) Successfully delete Location[pk=1271478, systemID=dcm4chee_store, path=2016/01/26/B4E078D8/EBDDF01D/07A6CE9D, tsuid=1.2.840.10008.1.2.4.80, size=2734182, status=TO_DELETE] from file:///srv/retrievecache

Configuration for updation of Access time in Study table

Using Archive UI

  1. Go to Menu->Configuration, then on Devices page, Edit the dcm4chee-arc device. Go to Extensions and
    Edit extension of Device Extension. Again go to its Extensions and Edit extension of Archive Device.
  2. Enter values in fields Maximum Access Time Staleness as required by one's application needs and Save.

Using LDAP

One may either

  • create a LDIF file (e.g.):

      version: 1
      dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
      changetype: modify
      add: dcmMaxAccessTimeStaleness
      dcmMaxAccessTimeStaleness: PT5H
    

    and import it to the LDAP Server by using the ldapmodify command line utility.

  • or use the Add Attribute... and Add Value... function of Apache Directory Studio to add attributes on Device Level (e.g.: dicomDeviceName=dcm4chee-arc) of the Archive Configuration.

One may refer to Archive Device to understand the description of attributes.

Refer ISO-8601 Duration format for more know-how on Durations.

Go to the Control tab on Configuration page in archive UI and reload the configuration.

By setting this property system checks the difference between the current accessed time and this value (in above example set to 5 hours). If the difference is larger than the last study access time only then the access time in study table is updated. The benefit of setting this property is that, for eg. if a study has 10000 instances then the access time in study table is updated only once instead of 10000 times, which also saves the expensive db operations. The value of this property can be set as required by one's application.

⚠️ **GitHub.com Fallback** ⚠️