From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70901: 30.0.50; Tramp doesn't use ControlMaster even with (setq tramp-use-connection-share nil) Date: Fri, 17 May 2024 16:57:58 +0200 Message-ID: <87seygtrih.fsf@gmx.de> 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> Reply-To: Michael Albinus Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3859"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 70901@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 17 16:59:08 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 1s7z35-0000oM-Pg for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 May 2024 16:59:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7z2z-00048o-HN; Fri, 17 May 2024 10:59: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 1s7z2x-00048N-Ff for bug-gnu-emacs@gnu.org; Fri, 17 May 2024 10:58:59 -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 1s7z2x-0004LS-7y for bug-gnu-emacs@gnu.org; Fri, 17 May 2024 10:58:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7z2z-0005PQ-JU for bug-gnu-emacs@gnu.org; Fri, 17 May 2024 10:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 May 2024 14:59:01 +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.171595789720773 (code B ref 70901); Fri, 17 May 2024 14:59:01 +0000 Original-Received: (at 70901) by debbugs.gnu.org; 17 May 2024 14:58:17 +0000 Original-Received: from localhost ([127.0.0.1]:55670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7z2F-0005Ot-92 for submit@debbugs.gnu.org; Fri, 17 May 2024 10:58:17 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:59379) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7z2B-0005Of-6R for 70901@debbugs.gnu.org; Fri, 17 May 2024 10:58:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1715957879; x=1716562679; i=michael.albinus@gmx.de; bh=9czDt5NrIzp9XuQVrwfj3glCOyEE7D/PZNPNkm3KDKI=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=KnE7C5VjTzK4KGW0SfVRnvjAXC5NWdwPhKPOBLdIN8PJ7NdMtnjuq7Hybx9MHMov btboik48L+ae8Z3KyzqqzX6VEWU5COFeenBo2jyP2Wff8z/h9tChwStQ/fuNg3UYB c3NQVfwMygdJ7LE5oJN7wvC9+0JEy/7ae4A8qjProsdBt7hZ12FhqaFcV5xP2awGA ioQsENHesjggGezdF3KVKltXTvGapC5U5groRlO++9DyJEttJD3xeIDoht6ixabWV vQAECNtpdwAFWXjZ+GJjv8tSBZWpMtfnIu0weOx0oKcy1O3CbaypOXhqW78TvA20i tOGDlgM539Er2QZa8Q== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.38.151]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MvbG2-1sO0Xp0wOE-00sgTJ; Fri, 17 May 2024 16:57:59 +0200 In-Reply-To: (Dmitry Gutov's message of "Thu, 16 May 2024 22:50:20 +0300") X-Provags-ID: V03:K1:Ha31OiEuD4bx2/zVeXlOTxezPJWQ6HEUPese8jTgHsyQkkuGQg1 WOB6g3H+kTfqcF1trSEGAYXFGp9AovRWLktjTQLb9mahyiTSU501j98v2xXkb3utp9Rk0tH EsA0pNmdaXv8fCZbwT009yRv4I805VDU7XFDmd/SHeuJncm+C1H3GXWHl28yLwHWLxxsjIj +Iu7rFczo65u3FC16x7TA== UI-OutboundReport: notjunk:1;M01:P0:stkeVywrsQU=;ZQ3S+NJRpusg31W71HGkg/pmnjF rDnWnOPx8OQ3YyczMYpB0oxj2gHDv8QUM7+VGCz6qgtVLFgSKZzDkPHm3uO96a54bwWeSO1KC VULWsCSbDazEFS/3efsO7ZZra873wR/O1z4wAEtj1LtrUwkzvnrmzL1/CtYalivh9qob1P6Ui 0owZ1PbmnT398FFSgIcWeRuIM0IzUUPqJCl7X9MZBguRxnpBFmXpbE+xYvMo2sIsQOkPhWZ19 vFKch4MST7ZpWoQK1kjqL13Rvxt2nnm8Gg/ezmp9En3wFbuSE0deLmYr6k5ZkmvPSQ4i7JX2v EJ/PDmfey1TnUKISumA59Vl0z0diYj8QuAnCmcT7nGYAvHowhRp/vpShQoa/mdaNWQW/+ZIxx Ey2JPbRIVKB0lZSeLghsGYuqarQBGzfQcaLJ+bOBQhh32GQOZbL50lQjVCGp028gf7f0YDyut 1CXEIEyS+gxWsj7TXgewTfEEXfdic1jT+3y+/8xiVBTIO4CjPUW6OpUIMCaH9jgprG/7bPcU/ df5mVbPDWwCSMsng93ZNqnFZ08hRgOFqXI88tdamnuN+MGdvUuXXABx+4XUisqbAxs5oiXWhh oY74lGYnxlVKnWDB0g69J/bzmnNxDZOB9QJS3GJGRfnWDe7D7w2EuNVBUqz9cXNJDBkHL3hdz TEwzNDs0dDZqQasRt9yvUpPn20XkXOEf9Rdho1A1m/5cfR/aqz6mZaFHqxQrt3UfR5TYVYEl8 9O5RkjyQw0MzX4SLqTdcPR6SvhV4yieDQOsCAKbUKXcMcWRw+8yBMtt/+GpcXCL12u3xe4dK 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:285248 Archived-At: Dmitry Gutov writes: > Hi Michael, Hi Dmitry, >> If we want to go into detail, we need a clean testbed. In your tests, I >> don't know whether another connection already exists which Tramp could >> reuse due to your ControlMaster settings. > > Like I said, it does: in the background terminal I'm using ssh with > the same connection. But you could probably replicate the experiment > without much trouble. Do you have access to fencepost? > >> And we need to separate the >> time the "ssh ..." call takes inside Tramp, from the other time when >> Tramp does some roundtrips for the initialization. We must count the >> time Tramp needs when tramp-verbose has a higher level. Etc pp. > > I could insert some (benchmark-progn ...) forms at your direction > instead, to measure some blocks in the code. That's often a more > expedient investigation tool. > >> Do we need this? We have seen that Tramp doesn't touch Control* options >> when you set tramp-use-connection-share to nil. And that's what this bu= g >> report is about. > > My question is, shouldn't ControlMaster be able to speed the process > up, at least somewhat? The complaint isn't that the operation remains > somewhat slow (though it does), but that I'm not seeing any > statistically significant improvement from ControlMaster - which > should seemingly be used and useful. 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: =2D-8<---------------cut here---------------start------------->8--- 16:48:11.758022 tramp-send-command (6) # exec ssh -o ControlMaster=3Dauto = -o ControlPath=3D/home/albinus/.cache/emacs/tramp.%C -o ControlPersist=3Dn= o -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:d= f3d [albinus@gandalf ~]$ =2D-8<---------------cut here---------------end--------------->8--- 2. In another Emacs instance, accessing the same host < 0.2 sec: =2D-8<---------------cut here---------------start------------->8--- 16:50:13.291729 tramp-send-command (6) # exec ssh -o ControlMaster=3Dauto = -o ControlPath=3D/home/albinus/.cache/emacs/tramp.%C -o ControlPersist=3Dn= o -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:d= f3d [albinus@gandalf ~]$ =2D-8<---------------cut here---------------end--------------->8--- All other commands after this are Tramp's initialization on that host, which doesn't depend on ControlMaster. > 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. But of course, there's no obligation for you to do so. Best regards, Michael.