[erlang-questions] Linux O_DIRECT flag
Sat Mar 15 09:00:26 CET 2008
> I would also doubt that, given the way the problem is presented. In any
> case the O_DIRECT thing sounds like a performance disaster unless you
> have an application that has been specifically designed with those
> semantics in mind.
Application was designed to take advantage of RAM, with journaling and write
behind... however, I fail to see a relevance of answers visa-a-vis my
question -- question was how to do it, and not so much, if at all, why one
should not do it.
As far as implementing support for O_DIRECT flag: I suppose that a proper
place for it would be in "prim_file.erl" open_mode/4. However, doing it on
my own would mean that I have to do it every time a new release is out.
Well, I'm not crazy about it -- wouldn't it be far more convenient if this
becomes a part of standard release (pveeez). I mean, if O_DIRECT option
exist, it is there for a reason, so if someone is crazy (or stupid) enough
to use it, let him knock (him|her)self out, right?
IMHO, performance tuning is much more difficult if one needs to do it at
kernel level -- you may fix one thing, but brake another. If one could
establish desired behavior/performance at the application level, one has a
better way to manage performance of such application in a long run.
----- Original Message -----
From: "Alpár Jüttner" <alpar@REDACTED>
To: "Toby Thain" <toby@REDACTED>
Cc: "Valentin Micic" <valentin@REDACTED>; <erlang-questions@REDACTED>
Sent: Saturday, March 15, 2008 8:12 AM
Subject: Re: [erlang-questions] Linux O_DIRECT flag
> On Fri, 2008-03-14 at 20:53 -0400, Toby Thain wrote:
>> On 14-Mar-08, at 5:14 PM, Valentin Micic wrote:
>> > Not when your application starts to swap-in and out because it is
>> > running out of RAM,
>> That should never happen!
> It may be, but it still happens. For example if you just copy a very big
> file of directory tree (cp -a), the linux desktop often becomes unusably
> sluggish. If you don't use an application (e.g. Firefox) for some time,
> it gets out of the RAM and it takes several seconds until it reacts the
> first click. Some time later you want to go back to Emacs, the same
> But this should be a factor of the kernel configuration, because
> sometimes linux does it sometime it doesn't. For example there is a
> kernel 'swappisess' parameter /proc/sys/vm/swappiness which should
> control this. I asked google about this file and the first hit was this:
More information about the erlang-questions