all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* tramp: Maximum buffer size exceeded
@ 2003-08-29  2:55 Kin Cho
  2003-08-29  9:19 ` Phillip Lord
  2003-08-29 19:53 ` Kai Großjohann
  0 siblings, 2 replies; 7+ messages in thread
From: Kin Cho @ 2003-08-29  2:55 UTC (permalink / raw)


Hi,

tramp (2.0.35) seems to have trouble with large file size.

I was trying to copy /large-file (210 Meg) from foobar to a local
directory.

Perhaps there is another tramp method which doesn't require first
fetching a remote file to a local temp file?

Thanks.

-kin

tramp: Fetching /scp:root@foobar:/large-file to tmp file /tmp/tramp.61036yh...done
tramp: Inserting local temp file `/tmp/tramp.61036yh'...
setq: Maximum buffer size exceeded

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tramp: Maximum buffer size exceeded
  2003-08-29  2:55 tramp: Maximum buffer size exceeded Kin Cho
@ 2003-08-29  9:19 ` Phillip Lord
  2003-08-29 15:59   ` Kin Cho
  2003-08-29 19:53 ` Kai Großjohann
  1 sibling, 1 reply; 7+ messages in thread
From: Phillip Lord @ 2003-08-29  9:19 UTC (permalink / raw)


>>>>> "Kin" == Kin Cho <kin@neoscale.com> writes:

  Kin> Hi,

  Kin> tramp (2.0.35) seems to have trouble with large file size.

  Kin> I was trying to copy /large-file (210 Meg) from foobar to a
  Kin> local directory.

  Kin> Perhaps there is another tramp method which doesn't require
  Kin> first fetching a remote file to a local temp file?

  Kin> Thanks.

  Kin> -kin

  Kin> tramp: Fetching /scp:root@foobar:/large-file to tmp file
  Kin> /tmp/tramp.61036yh...done tramp: Inserting local temp file
  Kin> `/tmp/tramp.61036yh'...  setq: Maximum buffer size exceeded

 
This is not a problem with tramp per se, but with emacs. It has a
maximum buffer size (which is I think something like 2^26
characters). Your 210 meg file is too large for it. 

Try it locally. You would still have the same problem. 

There is essentially no way around this, other than bad hacks, like
splitting the file up into two. 

Phil

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tramp: Maximum buffer size exceeded
  2003-08-29  9:19 ` Phillip Lord
@ 2003-08-29 15:59   ` Kin Cho
  2003-08-29 16:45     ` Kevin Rodgers
  0 siblings, 1 reply; 7+ messages in thread
From: Kin Cho @ 2003-08-29 15:59 UTC (permalink / raw)


Phillip Lord <p.lord@russet.org.uk> writes:

> >>>>> "Kin" == Kin Cho <kin@neoscale.com> writes:
> 
>   Kin> Hi,
> 
>   Kin> tramp (2.0.35) seems to have trouble with large file size.
> 
>   Kin> I was trying to copy /large-file (210 Meg) from foobar to a
>   Kin> local directory.
> 
>   Kin> Perhaps there is another tramp method which doesn't require
>   Kin> first fetching a remote file to a local temp file?
> 
>   Kin> Thanks.
> 
>   Kin> -kin
> 
>   Kin> tramp: Fetching /scp:root@foobar:/large-file to tmp file
>   Kin> /tmp/tramp.61036yh...done tramp: Inserting local temp file
>   Kin> `/tmp/tramp.61036yh'...  setq: Maximum buffer size exceeded
> 
>  
> This is not a problem with tramp per se, but with emacs. It has a
> maximum buffer size (which is I think something like 2^26
> characters). Your 210 meg file is too large for it. 

But scp is an out-of-band method, why does tramp has to process
the file content in emacs?

> Try it locally. You would still have the same problem. 

Manually using scp works fine.

-kin

> There is essentially no way around this, other than bad hacks, like
> splitting the file up into two. 
> 
> Phil

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tramp: Maximum buffer size exceeded
  2003-08-29 15:59   ` Kin Cho
@ 2003-08-29 16:45     ` Kevin Rodgers
  2003-08-29 17:05       ` Kin Cho
  0 siblings, 1 reply; 7+ messages in thread
From: Kevin Rodgers @ 2003-08-29 16:45 UTC (permalink / raw)


Kin Cho wrote:

> Phillip Lord <p.lord@russet.org.uk> writes:
>>>>>>>"Kin" == Kin Cho <kin@neoscale.com> writes:
>>  Kin> tramp (2.0.35) seems to have trouble with large file size.
>>
>>  Kin> I was trying to copy /large-file (210 Meg) from foobar to a
>>  Kin> local directory.
>>
>>  Kin> Perhaps there is another tramp method which doesn't require
>>  Kin> first fetching a remote file to a local temp file?
>>
>>  Kin> Thanks.
>>
>>  Kin> -kin
>>
>>  Kin> tramp: Fetching /scp:root@foobar:/large-file to tmp file
>>  Kin> /tmp/tramp.61036yh...done tramp: Inserting local temp file
>>  Kin> `/tmp/tramp.61036yh'...  setq: Maximum buffer size exceeded
>> 
>>This is not a problem with tramp per se, but with emacs. It has a
>>maximum buffer size (which is I think something like 2^26
>>characters). Your 210 meg file is too large for it. 
> 
> But scp is an out-of-band method, why does tramp has to process
> the file content in emacs?


It has to insert the file contents into a buffer so you can edit it.


>>Try it locally. You would still have the same problem. 
> 
> Manually using scp works fine.

The copy succeeded.  The failure occurred trying to insert the local

copy of the file into an Emacs buffer.

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tramp: Maximum buffer size exceeded
  2003-08-29 16:45     ` Kevin Rodgers
@ 2003-08-29 17:05       ` Kin Cho
  0 siblings, 0 replies; 7+ messages in thread
From: Kin Cho @ 2003-08-29 17:05 UTC (permalink / raw)


Kevin Rodgers <ihs_4664@yahoo.com> writes:

> Kin Cho wrote:
> 
> > Phillip Lord <p.lord@russet.org.uk> writes:
> >>>>>>>"Kin" == Kin Cho <kin@neoscale.com> writes:
> >>  Kin> tramp (2.0.35) seems to have trouble with large file size.
> >>
> >>  Kin> I was trying to copy /large-file (210 Meg) from foobar to a
> >>  Kin> local directory.
> >>
> >>  Kin> Perhaps there is another tramp method which doesn't require
> >>  Kin> first fetching a remote file to a local temp file?
> >>
> >>  Kin> Thanks.
> >>
> >>  Kin> -kin
> >>
> >>  Kin> tramp: Fetching /scp:root@foobar:/large-file to tmp file
> >>  Kin> /tmp/tramp.61036yh...done tramp: Inserting local temp file
> >>  Kin> `/tmp/tramp.61036yh'...  setq: Maximum buffer size exceeded
> >> This is not a problem with tramp per se, but with emacs. It
> >> has a
> >>maximum buffer size (which is I think something like 2^26
> >> characters). Your 210 meg file is too large for it.
> > But scp is an out-of-band method, why does tramp has to process
> > the file content in emacs?
> 
> 
> It has to insert the file contents into a buffer so you can edit it.

I wasn't trying to edit the file.

I was copying /large-file (dwim style) from a (tramp) dired
buffer to a (non-tramp) dired buffer.

-kin

> 
> >> Try it locally. You would still have the same problem.
> > Manually using scp works fine.
> 
> The copy succeeded.  The failure occurred trying to insert the local
> 
> copy of the file into an Emacs buffer.
> 
> -- 
> Kevin Rodgers

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tramp: Maximum buffer size exceeded
  2003-08-29  2:55 tramp: Maximum buffer size exceeded Kin Cho
  2003-08-29  9:19 ` Phillip Lord
@ 2003-08-29 19:53 ` Kai Großjohann
  2003-08-29 22:41   ` Kin Cho
  1 sibling, 1 reply; 7+ messages in thread
From: Kai Großjohann @ 2003-08-29 19:53 UTC (permalink / raw)


Kin Cho <kin@neoscale.com> writes:

> tramp (2.0.35) seems to have trouble with large file size.
>
> I was trying to copy /large-file (210 Meg) from foobar to a local
> directory.

It's a pity.  I didn't think of this optimization.  If you look at
the function tramp-do-copy-or-rename-file, then you will see that it
deals with the following special cases:

* Both are Tramp files.  In that case, I look whether they are from
  the same user/host/method combo.  If so, I invoke "mv"/"cp" on the
  remote system directly.  If not, see the last case.

* Neither are Tramp files.  Error.

* This is the default case: fetch file into a buffer, then save the
  buffer.

I should add another case which looks whether exactly one of them is
remote and the method is an out of band method.  In that case, I can
invoke rcp/scp/... directly.

Want to code this?
-- 
Two cafe au lait please, but without milk.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tramp: Maximum buffer size exceeded
  2003-08-29 19:53 ` Kai Großjohann
@ 2003-08-29 22:41   ` Kin Cho
  0 siblings, 0 replies; 7+ messages in thread
From: Kin Cho @ 2003-08-29 22:41 UTC (permalink / raw)


kai.grossjohann@gmx.net (Kai Großjohann) writes:

> Kin Cho <kin@neoscale.com> writes:
> 
> > tramp (2.0.35) seems to have trouble with large file size.
> >
> > I was trying to copy /large-file (210 Meg) from foobar to a local
> > directory.
> 
> It's a pity.  I didn't think of this optimization.  If you look at
> the function tramp-do-copy-or-rename-file, then you will see that it
> deals with the following special cases:
> 
> * Both are Tramp files.  In that case, I look whether they are from
>   the same user/host/method combo.  If so, I invoke "mv"/"cp" on the
>   remote system directly.  If not, see the last case.
> 
> * Neither are Tramp files.  Error.
> 
> * This is the default case: fetch file into a buffer, then save the
>   buffer.
> 
> I should add another case which looks whether exactly one of them is
> remote and the method is an out of band method.  In that case, I can
> invoke rcp/scp/... directly.
> 
> Want to code this?

I'll take a shot at it.

However, since I don't copy these large files often (may be once
a month), and even then it's easy to manually type the scp
command anyway.  My sense of urgency to work on this will be low.

Speaking of urgency, one thing that comes to mind as being more
urgently needed is to optimize tramp startup connection time.

An idea I had was to cache the little things that tramp sends to
the remote host.  That way, tramp would startup much quicker the
next time it connects to the same host.

-kin

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-08-29 22:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-29  2:55 tramp: Maximum buffer size exceeded Kin Cho
2003-08-29  9:19 ` Phillip Lord
2003-08-29 15:59   ` Kin Cho
2003-08-29 16:45     ` Kevin Rodgers
2003-08-29 17:05       ` Kin Cho
2003-08-29 19:53 ` Kai Großjohann
2003-08-29 22:41   ` Kin Cho

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.