Ticket #3445 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

Implement a DiskMRU class

Reported by: Janik Zikovsky Owned by: Janik Zikovsky
Priority: critical Milestone: Iteration 30
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Wenduo Zhou

Description

This class is to be used by the file-back-end of MDEventWorkspace, but build it more generally. This is a class that:

  • Limits the amount of objects in the cache to a certain amount of memory (not a fixed number of items) since objects will have varied sizes.
  • Keeps the most recently used objects in memory.
  • Delegates the loading/saving of the data to the object itself (because the object will stay in memory but its contents won't).
    • Use an ISaveable simple interface to delegate the loading and saving.
    • Each ISaveable tells the the DiskMRU when it needs to load itself so that the MRU :
      • Marks it as recently used.
      • Frees some memory by writing out another one.

Also, the DiskMRU should:

  • Combine write operations in "blocks" so that seeking is minimized.
    • A certain minimum write size will be accumulated before writing to disk.
    • Objects will be sorted by their file index position before writing.

Change History

comment:1 Changed 9 years ago by Janik Zikovsky

  • Status changed from new to accepted

comment:2 Changed 9 years ago by Janik Zikovsky

In [13563]:

Refs #3445: Start of a DiskMRU class. But mostly this was to remove the dependency on TestHelpers of API which makes building APITest slow.

comment:3 Changed 9 years ago by Janik Zikovsky

In [13564]:

Refs #3445: Fix build.

comment:4 Changed 9 years ago by Janik Zikovsky

In [13565]:

Refs #3445.

comment:5 Changed 9 years ago by Janik Zikovsky

In [13600]:

Refs #3445: Basic diskMRU

comment:6 Changed 9 years ago by Janik Zikovsky

In [13602]:

Refs #3445: Fix build.

comment:7 Changed 9 years ago by Janik Zikovsky

In [13605]:

Refs #3445: DiskMRU with a cache to save to file, with tests.

comment:8 Changed 9 years ago by Janik Zikovsky

In [13608]:

Refs #3445: DiskMRU with/without a write buffer, seems thread safe.

comment:9 Changed 9 years ago by Janik Zikovsky

  • Status changed from accepted to verify
  • Resolution set to fixed

In [13687]:

Fixes #3445: DiskMRU class should now have all the necessary functionality. Refs #3467: Implemented diskMRU into MDEventWorkspace, which now caches a certain amount of events in memory when using the file back end. First level of writable cache (can't change the # of events in a list yet).

comment:10 Changed 9 years ago by Wenduo Zhou

  • Status changed from verify to verifying
  • Tester set to Wenduo Zhou

comment:11 Changed 9 years ago by Wenduo Zhou

Unit test passed.

It is better to have these two functions in unit test, too. (1) defragFreeBlocks() (2) getMemoryStr()

comment:12 Changed 9 years ago by Wenduo Zhou

  • Status changed from verifying to closed

comment:13 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 4292

Note: See TracTickets for help on using tickets.