stec-inc / EnhanceIO

EnhanceIO Open Source for Linux
Other
420 stars 176 forks source link

Cache trashing strategy #26

Closed MageSlayer closed 11 years ago

MageSlayer commented 11 years ago

Hi

I'd like to know how EnhanceIO is going to behave in a following situation.

  1. Cache contains useful data (files accessed frequently, etc)
  2. Now I am starting to write a file with size equal to SSD (cache) size.

What happens to cache contents after file is written? Would it contain all pages filled with the file pages and all "useful" data gets evicted from cache?

sanoj-stec commented 11 years ago

Hi

Yes, it would overwrite the cache contents. EnhanceIO does not not attempt to perform bypass of sequential IO . The user would be benefited in turn around time fro the large write. However, at the cost of increased latency in subsequent reads.

MageSlayer commented 11 years ago

Ok. I see. Personally I see this as a problem.

Another question: Are techniques like https://github.com/Feh/nocache going to be used to address this? I haven't studied in details this idea, but it looks like it is possible to propagate fadvice usage information down to EnhanceIO block level.

sanoj-stec commented 11 years ago

True. We would be adding a sequential bypass logic in near future. It would be nice to have a discussion here on this

MageSlayer commented 11 years ago

I will gladly participate in a discussion, if my experience allows that :)

CoRpO commented 11 years ago

sequential IO bypass logic should stay an option, as it may be usefull in some cases (like mine : lots of big files but few of them accessed frequently, mainly read only pattern)

I see a (maybe) strange behavior regarding to this question : my cache is setup in read only / lru policy, but while filling the storage with rsync, I see that the cache is filled (via readfill). Is rsync reading back files it wrote ?!

sanoj-stec commented 11 years ago

Closing this issue as we have a related discussion on issue #32 so as to have single thread of discussion