Order CTA repacks by file creation time
After investigating the full software stack of CASTOR repack it was understood that temporal collocation of data is achieved by repacking tapes in order. It became apparent however that the order in which tapes were repacked could be improved.
The CASTOR repack tools order tapes by the last time they were written to. This logic works well for the very first repack of a set of tapes but gets worse and worse as tapes are repacked again and again as the time when the previous repack took place is used. CASTOR uses the last time a tape was written to due to implementation constraints.
CTA should use the creation times of the files written to a tape when ordering that tape in the repack queue. The creation time of a file should not change no matter how many times a file is repacked from one tape to another. Of course the first time a tape is repacked will still be the best as each file was created and written to the tape one after another. Over time tapes will contain files from different tapes that were not repacked during exactly the same time period.