From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#70901: 30.0.50; Tramp doesn't use ControlMaster even with (setq tramp-use-connection-share nil) Date: Sat, 18 May 2024 05:29:28 +0300 Message-ID: <8a1d6d51-d5eb-4d0d-a6dd-32ffb140725d@gutov.dev> References: <5959e6f4-607d-4a8f-8e49-fbdd9b438af1@gutov.dev> <87o79ags7m.fsf@gmx.de> <44185444-8a6a-4924-88f9-853f65a1c61a@gutov.dev> <87r0e4g428.fsf@gmx.de> <19d0563d-2778-4e27-92b0-03a86c8e1473@gutov.dev> <87y18bebf0.fsf@gmx.de> <871q63djrv.fsf@gmx.de> <9287b788-a366-48b2-8d8f-8f48d6144fac@gutov.dev> <87msoqcctv.fsf@gmx.de> <87seygtrih.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30162"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 70901@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 18 04:30:28 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s89q7-0007fx-IE for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 May 2024 04:30:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s89ph-0007rQ-JF; Fri, 17 May 2024 22:30:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s89pg-0007r9-6z for bug-gnu-emacs@gnu.org; Fri, 17 May 2024 22:30:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s89pf-0002V3-VA for bug-gnu-emacs@gnu.org; Fri, 17 May 2024 22:29:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s89pi-0005tX-K5 for bug-gnu-emacs@gnu.org; Fri, 17 May 2024 22:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 May 2024 02:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70901 X-GNU-PR-Package: emacs Original-Received: via spool by 70901-submit@debbugs.gnu.org id=B70901.171599938222627 (code B ref 70901); Sat, 18 May 2024 02:30:02 +0000 Original-Received: (at 70901) by debbugs.gnu.org; 18 May 2024 02:29:42 +0000 Original-Received: from localhost ([127.0.0.1]:58588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s89pO-0005st-65 for submit@debbugs.gnu.org; Fri, 17 May 2024 22:29:42 -0400 Original-Received: from fhigh4-smtp.messagingengine.com ([103.168.172.155]:54319) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s89pL-0005sn-Nl for 70901@debbugs.gnu.org; Fri, 17 May 2024 22:29:40 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 0BE0C1140126; Fri, 17 May 2024 22:29:31 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 17 May 2024 22:29:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1715999371; x=1716085771; bh=PZPkEk3kZ8oUmt+7HhfT4QD5KRbwvFCsF5nyBixSTY0=; b= TZCl+HKi3aPtoD/pI9uK2KqT4bSFmFXY+LKTEugVYb6XbtdY2cM309fSoHzhoZMr AI7OdbC3xPYkB//sjnQARSOGLMGjh923nzqB0+2ymIHu4mk6IqeJZZYjCzfehJLU QAEr2+mkV61XHfyx6jdyY0PFA0hb3LCeEgMNzuHPn00kVnExDwBV+nWQmvlhoByf TsxgFHmexvSpoTY5Gq82g92foRCKNlgCfgrm9+5JQGWe84mzgXSLitdaKtr/k4ba 58LgscZz25BadAFCR1aDDzwcaBG+0nXLE3YjHrq4C+VY+m9wi0G6MySdYUME++1N 7mFZGyRxM5GvGNg9rx1Rjg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1715999371; x= 1716085771; bh=PZPkEk3kZ8oUmt+7HhfT4QD5KRbwvFCsF5nyBixSTY0=; b=C g+vEuBWGsk4N6ZMt/K2v+f701mOotTOkBIaZcjgDXWzcJyjdrPk3FNV0M1zH9YYR CkwUuOTBpACrtNxwC+2nRcQo+Q9xGaVILkfl7MiowzkiFw23oAV+JU4bGNbNPoeJ KS943pGKCc4aoV6hXiTiHApLXU+exzyUQA0hKUDEF0+fV9DScaPpI4CrcfLmL5j9 mlO6oEoAh6kubuVTDt0505KQil/DH21WzUwt043DfwWR4jVdAi2rJReOxDLKqs1E lbhCmANqACmWybW0VhxlijmKiXEkeh3pe+P3la9ugD1U+AG9iWDVkS0KlMyNkPaq Rs4X6UppxI5jUvXJhVGyQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdehhedgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepffeifedvleeukedtgfelieegudfgveekfeejveejffetffeuueeugefhveei uddvnecuffhomhgrihhnpehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 17 May 2024 22:29:29 -0400 (EDT) Content-Language: en-US In-Reply-To: <87seygtrih.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:285273 Archived-At: Hi Michael, On 17/05/2024 17:57, Michael Albinus wrote: > Using ControlMaster or not should make a difference. If you want to > measure time, I recommend to measure only the time Tramp calls "ssh ..." > and receives the prompt. That is in the traces (even with timestamps). > > 1. On a fresh booted system > 2 sec: > > --8<---------------cut here---------------start------------->8--- > 16:48:11.758022 tramp-send-command (6) # exec ssh -o ControlMaster=auto -o ControlPath=/home/albinus/.cache/emacs/tramp.%C -o ControlPersist=no -e none gandalf || exit > 16:48:13.919576 tramp-process-actions (6) # > Last login: Fri May 17 16:48:11 2024 from 2002:6443:eb5:0:f832:242f:9e14:df3d > [albinus@gandalf ~]$ > --8<---------------cut here---------------end--------------->8--- > > 2. In another Emacs instance, accessing the same host < 0.2 sec: > > --8<---------------cut here---------------start------------->8--- > 16:50:13.291729 tramp-send-command (6) # exec ssh -o ControlMaster=auto -o ControlPath=/home/albinus/.cache/emacs/tramp.%C -o ControlPersist=no -e none gandalf || exit > 16:50:13.481880 tramp-process-actions (6) # > Last login: Fri May 17 16:50:11 2024 from 2002:6443:eb5:0:f832:242f:9e14:df3d > [albinus@gandalf ~]$ > --8<---------------cut here---------------end--------------->8--- > > All other commands after this are Tramp's initialization on that host, > which doesn't depend on ControlMaster. Thank you. It seems that ControlMaster does in fast get used - it shaves the initial connection from ~3 seconds down to ~1 second or a little less. I suppose it's just that the remainder of the process takes a while too (additional 3 seconds for something as simple as 'ls'), so the difference is not as pronounced. Perhaps it'd make sense to adjust the logging so that the first "...done" is printed right after the connection is established. At the moment it looks like this: 05:26:32.739888 tramp-send-command (6) # exec ssh -q -l dgutov -e none fencepost.gnu.org || exit ... Last login: Fri May 17 22:25:53 2024 from 82.102.62.129 dgutov@fencepost:~$ 05:26:33.297344 tramp-process-actions (3) # Waiting for prompts from remote shell...done ... 05:26:35.959207 tramp-maybe-open-connection (3) # Opening connection *Async Shell Command* for dgutov@fencepost.gnu.org using ssh...done I'll do some more testing, just in case (on another system). >> I'm planning to write a small article with recommendations on how to >> configure Tramp for performance in a common setup, with the options >> and explanations. > > Nice. If you like you could show me this article for comments, before > you publish. Of course, no problem.