[erlang-questions] Information on file:advise/4

Valentin Micic v@REDACTED
Thu Aug 30 09:52:21 CEST 2018

On 30 Aug 2018, at 5:43 AM, Max Lapshin wrote:

> I advice to find out how to very deeply and properly monitor usage of this feature.
> We had once made a release that ruined performance of flussonic disk access when I just tried to play with this feature.
> Just plain linux vfs cache happened to be more efficient than our efforts to help it.
> So if you want to use it, it would be good to find out how to track its performance.

Thanks for sharing, Max.

As a matter of fact, if memory serves me correctly, it may be someone from my company (amongst many others) that have asked for this feature a few years back.
At the time, we have been loading a number of reasonably big files into the RAM on Linux OS. We noticed that a considerable amount of RAM was utilized by OS for caching of files, which we no longer needed.
As there was no on-demand support for release of this cache from Erlang, we had to write a C code and call it against the given file once it has been loaded. Quite cumbersome!
So, I am very grateful that this interface has been made available in Erlang. I just wasn't clear about semantics behind various options.

But, I do understand caveats... for a long time, my (or, shall I say our clients') operating environment was a mixed bag of Solairs and Linux. The thing about these two, for example, is that they have a diametrically different views on OS caching.
Thus, over the time, I came to a realization that it is quite difficult to relay on good OS features and still stay out of trouble in a heterogeneous environment.
The remedy for us was to reinvent a hot water from time to time, by providing our own alternative for these features, which was always easy because Erlang seems to be generous that way. 

Again thank you very much for sharing your experiences. 

Kind regards


More information about the erlang-questions mailing list