From owner-freebsd-current@freebsd.org Sat Jan 2 18:29:49 2021 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B3D554D9F72 for ; Sat, 2 Jan 2021 18:29:49 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D7VmX4F4gz4lbK; Sat, 2 Jan 2021 18:29:48 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f179.google.com with SMTP id l207so27380317oib.4; Sat, 02 Jan 2021 10:29:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=LmLcjgZwv6Tb4PjhugGOu12x62dk4Zi4l1hIt+HXBYQ=; b=XPQ13cTQ2AthGCW+aOytajOykknChUuZyulUBwGm16UVzIgqcboue7t/k99GxU0Usa cll53NPbOFTzGWOWGkoeUNnYQpbJRjWqtVvmQUKCsLXmtAm7KD84IXFVWV34A2V7xJXL T17BDbYDFwCmCuws817uK8lyq9YzF/ejJdsn1NHKYsMYIzXTLHlPSgUlP1nA6GICpS4+ UvVY5FyRck/cZE5FfU93rwv0h6XlNs2xVhnzEq9v++Kx4yTksgWQmmk/1fmbA3z6ZRjH EKn2GaO52DViOQQLiIk/s4932IzbQBXqz3W5wV7nprdNRmnTGGuq5itdSFZtx0NoMdQ3 WD8A== X-Gm-Message-State: AOAM531oyU2XLvesLzaaSvEq6xfbMqyeRgs16hE0mr4g5RgWBiZ2liCp qu903jeUsqqgBYzgndVoelsQfOeE2bXvQ8IYva0= X-Google-Smtp-Source: ABdhPJxdcW+lYm9+EYFhBextr/lKhFPgUITBqi/xJPDZw/XEglNsJt4NIE1tTqVAWbD568TZgSbrp90TSAtD2btH0CA= X-Received: by 2002:aca:540e:: with SMTP id i14mr13530237oib.57.1609612187618; Sat, 02 Jan 2021 10:29:47 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Alan Somers Date: Sat, 2 Jan 2021 11:29:36 -0700 Message-ID: Subject: Re: cp(1) of large files is causing 100% CPU utilization and poor transfer To: Matthias Apitz , Rick Macklem , Alan Somers , FreeBSD CURRENT , Konstantin Belousov , Kirk McKusick X-Rspamd-Queue-Id: 4D7VmX4F4gz4lbK X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.62 / 15.00]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.167.179:from]; RCVD_COUNT_TWO(0.00)[2]; FREEFALL_USER(0.00)[asomers]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; RCVD_TLS_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_FIVE(0.00)[6]; SPAMHAUS_ZRD(0.00)[209.85.167.179:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.62)[-0.623]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.179:from]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.179:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; MAILMAN_DEST(0.00)[freebsd-current] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2021 18:29:49 -0000 On Sat, Jan 2, 2021 at 11:28 AM Matthias Apitz wrote: > El d=C3=ADa s=C3=A1bado, enero 02, 2021 a las 05:06:05p. m. +0000, Rick M= acklem > escribi=C3=B3: > > > Just fyi, I've reproduced the problem. > > All I did was create a 20Gbyte file > > on UFS on a slow (4Gbyte or RAM, > > slow spinning disk) laptop. > > (The UFS file system is just what the installer creates these days.) > > > > cp still hasn't finished and is definitely > > taking a looott longer than dd did. > > > > I'll start drilling down later to-day. > > > > I'll admit doing lots of testing of copy_file_range(2) > > with large sparse files, but I may have missed testing > > a large non-sparse file. > > > > rick > > ps: I've added Kostik and Kirk to the cc. > > As the problem seems to be clear now, should I still file a PR? > I'm happy to do so. > > matthias > Yes please . That will help ensure that we don't lose track of it.