GNU bug report logs - #74793
[PATCH] Add support for TCP_NODELAY on network streams

Previous Next

Package: emacs;

Reported by: Eric Marsden <eric.marsden <at> risk-engineering.org>

Date: Wed, 11 Dec 2024 16:18:01 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 31.1

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74793 in the body.
You can then email your comments to 74793 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#74793; Package emacs. (Wed, 11 Dec 2024 16:18:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eric Marsden <eric.marsden <at> risk-engineering.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 11 Dec 2024 16:18:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eric Marsden <eric.marsden <at> risk-engineering.org>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Add support for TCP_NODELAY on network streams
Date: Wed, 11 Dec 2024 17:17:38 +0100
[Message part 1 (text/plain, inline)]
Hi,

The attached patch adds support for the socket option TCP_NODELAY,
to disable Nagle's algorithm. This means that network segments are
sent as soon as possible, even when they contain little data. This
reduces network latency on the network connection, but can lead to
many small packets being sent.

I have only tested on Linux/AMD64, but support for this socket option
is very widespread. Patch reformatted following feedback from Robert
Pluim and Eli Zaretskii.

My motivation for adding this support is that Emacs is very slow
when connecting to the PostgreSQL database over the network, using
my pg-el library, and is unable to saturate CPU when sending a
stream of messages. It is much faster when using a local Unix
connection and saturates CPU.

With this patch, a test case that takes 911 seconds goes down to
76 seconds (x 12 speedup).

Eric
[net-tcp-nodelay.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74793; Package emacs. (Fri, 13 Dec 2024 08:31:03 GMT) Full text and rfc822 format available.

Message #8 received at 74793 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Eric Marsden <eric.marsden <at> risk-engineering.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 74793 <at> debbugs.gnu.org
Subject: Re: bug#74793: [PATCH] Add support for TCP_NODELAY on network streams
Date: Fri, 13 Dec 2024 09:29:10 +0100
>>>>> On Wed, 11 Dec 2024 17:17:38 +0100, Eric Marsden <eric.marsden <at> risk-engineering.org> said:

    Eric> I have only tested on Linux/AMD64, but support for this socket option
    Eric> is very widespread. Patch reformatted following feedback from Robert
    Eric> Pluim and Eli Zaretskii.

It builds and works on macOS for me.

Can it be applied with "Copyright-paperwork-exempt: yes"?

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74793; Package emacs. (Fri, 13 Dec 2024 09:15:01 GMT) Full text and rfc822 format available.

Message #11 received at 74793 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Eric Marsden <eric.marsden <at> risk-engineering.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 74793 <at> debbugs.gnu.org
Subject: Re: bug#74793: [PATCH] Add support for TCP_NODELAY on network streams
Date: Fri, 13 Dec 2024 10:13:11 +0100
>>>>> On Fri, 13 Dec 2024 09:39:17 +0100, Eric Marsden <eric.marsden <at> risk-engineering.org> said:

    Eric> On 13/12/2024 09:29, Robert Pluim wrote:
    >> It builds and works on macOS for me.
    >> 
    >> Can it be applied with "Copyright-paperwork-exempt: yes"?
    Eric> Thanks for the testing.

    Eric> FWIW, I have signed FSF copyright transfer papers sometime in the
    Eric> early 2000s.

Was that using a different email address? In any case, the maintainers
have access to the master list of people who have signed the papers.

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74793; Package emacs. (Fri, 13 Dec 2024 12:05:01 GMT) Full text and rfc822 format available.

Message #14 received at 74793 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Eric Marsden <eric.marsden <at> risk-engineering.org>
Cc: rpluim <at> gmail.com, 74793 <at> debbugs.gnu.org
Subject: Re: bug#74793: [PATCH] Add support for TCP_NODELAY on network streams
Date: Fri, 13 Dec 2024 14:03:59 +0200
> Date: Fri, 13 Dec 2024 09:39:17 +0100
> Cc: 74793 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
> From: Eric Marsden <eric.marsden <at> risk-engineering.org>
> 
> On 13/12/2024 09:29, Robert Pluim wrote:
> 
>  It builds and works on macOS for me.
> 
> Can it be applied with "Copyright-paperwork-exempt: yes"?
> 
> Thanks for the testing. 
> 
> FWIW, I have signed FSF copyright transfer papers sometime in the early 2000s. 

Yes, Eric's assignment is on file (using a different email address).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74793; Package emacs. (Fri, 13 Dec 2024 12:22:02 GMT) Full text and rfc822 format available.

Message #17 received at 74793 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Eric Marsden <eric.marsden <at> risk-engineering.org>
Cc: rpluim <at> gmail.com, 74793 <at> debbugs.gnu.org
Subject: Re: bug#74793: [PATCH] Add support for TCP_NODELAY on network streams
Date: Fri, 13 Dec 2024 14:21:15 +0200
> Date: Fri, 13 Dec 2024 10:29:22 +0100
> Cc: 74793 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
> From: Eric Marsden <eric.marsden <at> risk-engineering.org>
> 
> 
> On 13/12/2024 10:13, Robert Pluim wrote:
> 
>      Eric> FWIW, I have signed FSF copyright transfer papers sometime in
>  the
>     Eric> early 2000s.
> 
> Was that using a different email address? In any case, the maintainers
> have access to the master list of people who have signed the papers.
> 
> Most likely with the address emarsden <at> laas.fr

No, it's emarsden <at> mail.dotcom.fr




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74793; Package emacs. (Fri, 13 Dec 2024 13:42:02 GMT) Full text and rfc822 format available.

Message #20 received at 74793 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 74793 <at> debbugs.gnu.org, Eric Marsden <eric.marsden <at> risk-engineering.org>
Subject: Re: bug#74793: [PATCH] Add support for TCP_NODELAY on network streams
Date: Fri, 13 Dec 2024 14:40:52 +0100
tags 74793 fixed
close 74793 31.1
quit

>>>>> On Fri, 13 Dec 2024 14:03:59 +0200, Eli Zaretskii <eliz <at> gnu.org> said:

    Eli> Yes, Eric's assignment is on file (using a different email address).

Closing.
Committed as c265febd97e

Eric, I added the bug# in the commit message.

Robert
-- 




Added tag(s) fixed. Request was from Robert Pluim <rpluim <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 13 Dec 2024 13:42:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 31.1, send any further explanations to 74793 <at> debbugs.gnu.org and Eric Marsden <eric.marsden <at> risk-engineering.org> Request was from Robert Pluim <rpluim <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 13 Dec 2024 13:42:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 11 Jan 2025 12:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 159 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.