Re: O_DIRECT and tcl
- From: ikeon <shay.rozen@xxxxxxxxx>
- Date: Thu, 12 Nov 2009 05:15:25 -0800 (PST)
On Nov 11, 5:15 pm, "Donal K. Fellows"
<donal.k.fell...@xxxxxxxxxxxxxxxx> wrote:
On 11 Nov, 14:08, ikeon <shay.ro...@xxxxxxxxx> wrote:
I was told it has to do with NFS cache and stuff and after reading NFS
behavior the cache can be reduced but not disabled.
One recommendation was to open the file with O_DIRECT flag which is an
option like blocking or non_blocking - this way there is a direct I/O
to the file and no cache/buffers.
There is no way that that could ever be made to work over a network,
even if Tcl supported passing that flag through (which it doesn't, as
it happens). The issue is that network systems have buffers *anyway*
in the OS and the fileserver probably buffers stuff too (to say
nothing of the other machine). Sorry, but it won't ever work.
Instead, you need a different system architecture (e.g., a dedicated
server that acts as a control point, or maybe a database server).
Changing from one way of doing things to another is non-trivial, but
can't be helped as you're hitting the point where simple hacks don't
cut it.
Donal.
Thank for your help !
I did some workaround that work...
Instead of reading remotley and writeing locally i've turned it the
other way around -
Reading locally and writing remotely using "flush" so that way the
file get updated through the network immediately and the reading is
locally so it solved my problems.
Thanks again.
Shay.
.
- Follow-Ups:
- Re: O_DIRECT and tcl
- From: Nick Hounsome
- Re: O_DIRECT and tcl
- From: Alexandre Ferrieux
- Re: O_DIRECT and tcl
- References:
- O_DIRECT and tcl
- From: ikeon
- Re: O_DIRECT and tcl
- From: Donal K. Fellows
- O_DIRECT and tcl
- Prev by Date: Re: Can't compile small extension due to linking problem
- Next by Date: Re: O_DIRECT and tcl
- Previous by thread: Re: O_DIRECT and tcl
- Next by thread: Re: O_DIRECT and tcl
- Index(es):
Relevant Pages
|