From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1424C433F5 for ; Thu, 6 Jan 2022 18:55:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243097AbiAFSz0 (ORCPT ); Thu, 6 Jan 2022 13:55:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242979AbiAFSzY (ORCPT ); Thu, 6 Jan 2022 13:55:24 -0500 Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com [IPv6:2607:f8b0:4864:20::b2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E9F0C061201 for ; Thu, 6 Jan 2022 10:55:24 -0800 (PST) Received: by mail-yb1-xb2a.google.com with SMTP id j83so10236613ybg.2 for ; Thu, 06 Jan 2022 10:55:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bYklUVQjHe1AjfBK1kYtqPoo415C0s9/LvGvTkzvUnE=; b=erG93Ur1E+iWw7UoTMag8a89H6GTrwAzsH7/iIb+Ap1Sg+C16xVUay2wVQ+DiRf5x1 0H5ncxmg1xw4OE9Ebq0cThoONH6ZZs2bsuIQ/lj5xEFAqB+9Ni81SIkGzjflv25IOiiI ET53TZ9IAC5m7Htd5f4Y+1vSezvIZxJ8EC+qTeVN6xjCX33fV/tCfx3AwBGClrTIBQMP dao34nZeZorQVYuqLslOJNQ68tj/lUBbilZr56SwZl0UNFTykkhrW0WNyAs9+axFHNEa 7kxKfaIRGcjEAQkbmPviiyJ40pd67knUF9x/qf96BUDxt8Ck05S4K4IDoxlDYxr14EaP NeSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bYklUVQjHe1AjfBK1kYtqPoo415C0s9/LvGvTkzvUnE=; b=e0T+NTAAX5r0XHtYR/7qx5ZWl6eQ+wXfJxYMRh09i2c78CLVaiurbtDkH5sNeqZqlx 6AJ3/0EOCk8NwC5JijhwjAMLaILoehMqD2/Hqw/WyVyYNR56sQobOLoi6fM9l4C2Qbfq FsgPznNOHFKwWFG9eF7SrXIk6HGyS5HRalmIKwZlVOmx+8pmFmX2Ud+zb7ykqy8WOpNv +g/bpQRKHiNW76sU3zEE3Ma0jSCt9lwo30mrLijwalCyyExZF30GQIon3X64oKt8yn6b lPss4G1t303HOjAUYjSlUiufDdp5N19I3tIUqped1E3KRV7rIUXwlgFPd4/fn2X2MLW1 SOPA== X-Gm-Message-State: AOAM531Id5QSPtrR31ultL5RhCnqNzNFS4yTcIHTNQsMDblUxPOGvMvh NSdo+HFYZ+GmfOZb5dFTACb3pmS4T/P9rvP27Dj0qg== X-Google-Smtp-Source: ABdhPJwP7IoP7NjRDzy6p2ZfiXQERQTg7y1bsLXHR1HfXsnuH67L4XK1GX2wGhd4FGF7AXhCrc6Ab211f51ySRHvsjM= X-Received: by 2002:a25:a06:: with SMTP id 6mr2351823ybk.5.1641495323045; Thu, 06 Jan 2022 10:55:23 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Eric Dumazet Date: Thu, 6 Jan 2022 10:55:12 -0800 Message-ID: Subject: Re: Expensive tcp_collapse with high tcp_rmem limit To: Daniel Dao Cc: netdev , kernel-team , linux-kernel , David Miller , Jakub Kicinski , Hideaki YOSHIFUJI , Marek Majkowski Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 6, 2022 at 10:52 AM Eric Dumazet wrote: > I think that you should first look if you are under some kind of attack [1] > > Eventually you would still have to make room, involving expensive copies. > > 12% of 16MB is still a lot of memory to copy. > > [1] Detecting an attack signature could allow you to zap the socket > and save ~16MB of memory per flow. I forgot to ask, have you set tcp_min_snd_mss to a sensible value ? https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=5f3e2bf008c2221478101ee72f5cb4654b9fc363