tramp-chunksize

tramp-chunksize is a variable defined in `tramp.el'.
Its value is
nil


Documentation:
If non-nil, chunksize for sending input to local process.
It is necessary only on systems which have a buggy `process-send-string'
implementation. The necessity, whether this variable must be set, can be
checked via the following code:

(with-temp-buffer
(let* ((user "xxx") (host "yyy")
(init 0) (step 50)
(sent init) (received init))
(while (= sent received)
(setq sent (+ sent step))
(erase-buffer)
(let ((proc (start-process (buffer-name) (current-buffer)
"ssh" "-l" user host "wc" "-c")))
(when (memq (process-status proc) '(run open))
(process-send-string proc (make-string sent ?\ ))
(process-send-eof proc)
(process-send-eof proc))
(while (not (progn (goto-char (point-min))
(re-search-forward "\\w+" (point-max) t)))
(accept-process-output proc 1))
(when (memq (process-status proc) '(run open))
(setq received (string-to-number (match-string 0)))
(delete-process proc)
(message "Bytes sent: %s\tBytes received: %s" sent received)
(sit-for 0))))
(if (> sent (+ init step))
(message "You should set `tramp-chunksize' to a maximum of %s"
(- sent step))
(message "Test does not work")
(display-buffer (current-buffer))
(sit-for 30))))

In the Emacs normally running Tramp, evaluate the above code
(replace "xxx" and "yyy" by the remote user and host name,
respectively). You can do this, for example, by pasting it into
the `*scratch*' buffer and then hitting C-j with the cursor after the
last closing parenthesis. Note that it works only if you have configured
"ssh" to run without password query, see ssh-agent(1).

You will see the number of bytes sent successfully to the remote host.
If that number exceeds 1000, you can stop the execution by hitting
C-g, because your Emacs is likely clean.

When it is necessary to set `tramp-chunksize', you might consider to
use an out-of-the-band method (like "scp") instead of an internal one
(like "ssh"), because setting `tramp-chunksize' to non-nil decreases
performance.

If your Emacs is buggy, the code stops and gives you an indication
about the value `tramp-chunksize' should be set. Maybe you could just
experiment a bit, e.g. changing the values of `init' and `step'
in the third line of the code.

Please raise a bug report via "M-x tramp-bug" if your system needs
this variable to be set as well.

You can customize this variable.