[Prev][Next][Index][Thread]
Re: 486-100/16mb. linux is slow
Tuvik Beker wrote:
> The point was that if done properly, a swap file will have no 'holes'
> anyway.
I think you didn't understand the meaning of 'holes'. 'Holes' are
created when a program seeks passed the end of a file then starts
writing
again. The 'skipped' blocks are not allocated anywere but look to be
filled
with zero's when read and will be allocated when writen to.
Ref: Advanced Programming in the UNIX environment, W. Richard Stevens.
I suppose the ref to 'cp' is because Linux cp either preserves the
'holes'
or tries to get smart and create ones when possible (i.e. when the input
file
has large blocks of zeros).
> Note that a swap file must not contain any holes (so,
> using cp(1) to create the file is not acceptable).
I don't know how they though of using cp(1) here, but then Linux' cp(1)
is a little different.
Cheers,
--Amos
References: