Cache Data is increasing on Disk.How to clean this up?

Hi,

I have cache manager and cache inside it.and configuration settings are persist to disk.
Our application load the cache from DB once IS restarts or if someone manually runs the loader service.

Now I see that IntegrationServer\cacheStore\OMB_CacheM\persistence directory is more than 8 GB(seg000000003.frs…full of frs file). earlier it was low. its keep on increasing.

one thing many of these frs files is modified 1 year ago…looks to me not in use.

So to clean up, what I did is, I removed the old dates frs files and left just recent ones 2-3. and tried to restart the IS.

But IS is not getting started. i checked logs its saying that missing file into this directory. Not sure where IS has recorded these file names. from where its looking these files.

How can I cleanup my disk space? due to this IS is taking 30 min to start(audit is enabled)…any help please.

What is the IS version here we are talking about?

Any chance can you restore those deleted files and retry to see if that resolves?

HTH,
RMG

Hi,

I am using IS 9.0 version.

yes by the chance i had backup of this and restored this at same path and IS started up also.

but point is this is 8 gb file. I want to clear those which is not in use.

while IS was coming up, did you notice which all files from your specified directory IS is reading ??

Thanks,

Upload your ehcache.xml file please…

-Senthil

Senthil, Not sure which ehcache.xml file you are asking for. what is path.
but I am attaching my cache setting, i think you are looking the same.

Samashti,
Looking at the cache configuration, the ‘eternal’ property is set to ‘true’ & the number of elements is only ‘500’ which is a smaller data set.

TC is designed to work with large sized data sets. For smaller data sets, you will see such behavior of consuming more disk space. This can even go up to 10 GB.

To work around the problem, remove the ‘eternal’ flag and every time during IS startup, load the data from back end database to the cache. Use Terracotta as a cache, and not as a storage in your case.

Modify your implementation in such a way, verify if the key is available in cache. If available, pick it from there and return back to the application. If key is not available in cache, application should access db for retrieving the value, put the key/value in cache, and return back the value to the caller. Next time when get is performed, application will receive it from cache.

Regards
Senthil

Thanks Senthil for Reply…Let me tell you little more about how we load the cache.

we have the separate DB connected to WM. all the required data which should load into cache is present in DB… now we have written initCache flow service which gets the data from DB and Load into cache…and this service(initCache) is set as startup service.

So whenever IS gets restarts its gets all the data from DB and load into cache…

Senthil, in that case we don’t need eternal? I am not sure what is number of element. by default it gives 500 so i did not changed it…please guide me for my case what could be correct configuration which can fulfill my need.

No option to buying Terracotta license.

This is the typical way how you load the data into the cache during server startup, so that is fine.

Do not set ‘eternal’ flag to true & pin data all the while. Instead, set a time limit for expiry of the data.

In the implementation while performing ‘get’, follow the steps as mentioned in the flow chart.

Regards
Senthil
Capture.PNG

Could you try to nullify the data instead of deleting?