CRLF / LF conversion, all over again
Timothee Besset
ttimo at idsoftware.com
Thu Feb 21 04:46:40 GMT 2002
Obviously there is some file caching involved, and therefore a cost in
terms of overall performance and disk space. That's all there is to say
about it really, it's not a problem of 'what if' and 'what if'.
If I have to cache the text files (or at least the ones I want to provide
conversions for to the clients), and do some dance to maintain the CRLF
and the LF versions in sync, I will do it. It is an inevitable cost.
Wether it would scale well to high availability servers which distribute
thousands of 600Mb text files .. I honestly don't care.
Now, this could be written (as I described in a previous email) by an
independant daemon on the server machine, maintaining two copies of the
shared directories in sync and doing the conversions. Or maybe it would be
cleaner/more efficient written as a samba extension. I would probably not
look at samba code and just start on a standalone solution to get directly
to the core of the problem though.
TTimo
On Thu, 21 Feb 2002 13:28:12 +0200
Ihar Viarheichyk <i.viarheichyk at sam-solutions.net> wrote:
> On Thu, Feb 21, 2002 at 11:56:51AM +0100, Timothee Besset wrote:
>
> > - file size? not a problem, if the client is win32 it is served with CRLF
> > converted files from the unix server, and sees the correct size
> This will require to read all the file to get it's size. Not a problem,
> if not trying to get listing of directory containing hundreds files.
>
> > - 5k at the end of 600Mb file .. text files are typically small. Odds are,
> > if it's 600Mb, it's binary. (at least in my case I don't have text files
> > that go above 100kb).
> Ok. Let it be 100k. Reading 5k an the end on 100k file requires to read
> all 100k. Notice that there is no difference between binary and text
> files for many programs, e.g. text editor can read text file by 4k
> binary blocks. Imagine how slower will be reading of a file in this
> case.
>
> > What do you mean by 'write a VFS module'? My understanding is that if the
> > server does CRLF conversion, obviously it will have to cache the CRLF and
> > LF versions, and synchronise when one of the clients changes something (as
> > I said, I know nothing the precise problems in smbd).
> You can write own extension, caled VFS module, which will read file as
> you want and where you want.
>
> --
> Igor Vergeichik
> ICQ 47298730
>
>
>
More information about the samba-technical
mailing list