From owner-freebsd-current@freebsd.org Sat Jan 2 17:06:08 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 BA6994D7905 for ; Sat, 2 Jan 2021 17:06:08 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-to1can01on0615.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5d::615]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D7Svz5L4Kz4fkN; Sat, 2 Jan 2021 17:06:07 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DBqoGn2XtrnSti0d+kVUsdYBXD66Iu/SAkHLBt7VCh9OWhIPNRlHNiEgvEYRnfjzj4HBLKbizMVfnadXmK8EV8tOcdzH1Pe9Nps7IHUlLNANPRYTYAaD7XnMEX+hNIUGyhOX8hkwaqDN0iEvetC9p8FE66PrcqWlly9gMGyrAllUva7QqUqp/KiBHZTWj5Hw22wmZEC2UXrXcF+vzFGTy4vhJzZ6kznCcr0P5vKgcYtOvX2Ii7pwYW1buUxkcKaDKi6ulkd85CZqwOHpgB835hFUX+UfzxwVok2htHqLkQ5c6as6YUaHjmrxn+yGfyxzh/VWuQQl6PN1WpwgvvshHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dkuOsLGiB6U61RafAmDmsw2D/4v3VWoKh5TAT6NaAQw=; b=R/E+OJR8K2AFh6uN4TByPbNXD49pJkMx4jMxQdy5Zh0otm3WVd9UeO7I6v/LuLlL8IlmTYTkcEvL6V/lZxGNgSbxaYBS0kzUAHVAiwFEKT7I/ctTwknyb5BfN7UZ5qOuNIqNx5Tv3f2pFZHqBgqEWdzCJR3OSIEH9otdmKW/jBO/rWRxB6Dhu3AY+vDe4s0+rzBb8Lrg4B1fafBGWtzld8u83r8gCsJ16Q1Im3kH1K4GyDK+6staDudIgshqi0ya3hTMzDCVfRrp8nv8kGgTxKjkx5TziK4z8H9+i18hRtdaJYj/2TcfTOKu2c4aAaxMoaDnN5uj1Kx8AuOMUtIFwA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=uoguelph.ca; dmarc=pass action=none header.from=uoguelph.ca; dkim=pass header.d=uoguelph.ca; arc=none Received: from YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:19::29) by YQBPR0101MB1057.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:d::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.19; Sat, 2 Jan 2021 17:06:05 +0000 Received: from YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM ([fe80::3d86:c7f9:bc4c:40c0]) by YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM ([fe80::3d86:c7f9:bc4c:40c0%6]) with mapi id 15.20.3721.023; Sat, 2 Jan 2021 17:06:05 +0000 From: Rick Macklem To: Alan Somers , Matthias Apitz , FreeBSD CURRENT CC: Konstantin Belousov , Kirk McKusick Subject: Re: cp(1) of large files is causing 100% CPU utilization and poor transfer Thread-Topic: cp(1) of large files is causing 100% CPU utilization and poor transfer Thread-Index: AQHW4RfbLUWuHSdTW0ScUnflZYfe96oUeW+AgAAFnQCAAAEzAIAAAZMAgAAFFYCAAAcTBA== Date: Sat, 2 Jan 2021 17:06:05 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d7d3ae54-460c-4986-d36e-08d8af40b0f1 x-ms-traffictypediagnostic: YQBPR0101MB1057: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2657; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: XovBxGl9sV4eKVU6Zb02o8h9DVvqwfnqr8Lyyrv4whBF0XyLISCyEZ5SSUPqVhpiOtE1dfRs2v48JfzVpMi7LCE5xCORzD3blvYpe1z4PCGULoPrT1Li21EZrHucnlWMcPODkm4gu2zmtAyPANUMnzR5K284ri7WIkBNljacPTRXiqPbKEvjBpV+6QHLWRy3B49HeqENsHBPh4GshqLsn3h1r/fqYZHFLvaXdsRoN8bvGT6+NEi/0Tcbzz2daLq7eD062yHUihstlSKLULH90Z7ssaBOXuHKhnyW8lMDyu1P27RsfS84BB1jWmQvPBPKDVADPW2Ov43CjiPXa+QAPKMAqNai/Cf36LhCSIioEY/Z5uHJklE18+lFpv0AW2w9joDDdQBhmpvHhfR/4MLgeUKDEQBty4Z2pA3UdUPPJ55TGQ1Og6IcmvRpfMtCegBGVVPjDmhW+xfDjQ7qjXyJAow96PHHQBzGOPGOa31MVur0KbzpCr+ZZoN03I4GLoQWyUQlFCZoP8ElM0gDE42Jkg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(39850400004)(346002)(376002)(136003)(396003)(366004)(786003)(316002)(52536014)(6506007)(66556008)(26005)(66446008)(64756008)(54906003)(5660300002)(76116006)(66946007)(53546011)(7696005)(2906002)(91956017)(8936002)(86362001)(66476007)(110136005)(186003)(33656002)(8676002)(9686003)(55016002)(4326008)(478600001)(966005)(71200400001)(83380400001)(66574015)(21314003); DIR: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859-1?Q?+u5rGYZJApc7MsH3RBvI85l4bleg+R9r3d2yXyedVnHFr4TXr9kosRkoJb?= =?iso-8859-1?Q?se+4vK/wUaf9EyJ6PzbLx6kOZUyNfKCHMsKRgYQDv27cDaIGUNXcUwJxrv?= =?iso-8859-1?Q?eO+hObrYMmgCJj4bnfHnU1ds96kePrWjK3nUWF/jLkVrvUjK/SiYK9axgA?= =?iso-8859-1?Q?rfThWtXZafrEffPO4=3D?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: d7d3ae54-460c-4986-d36e-08d8af40b0f1 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jan 2021 17:06:05.3301 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: kK9TsvSlXqvJZipGkl3h8JhleOd5I5NV5EjPhdfD9ebWGuJIl1RwAjMbFcHUa1kqB2dM4TB1O6MB0xWOYkgoVA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQBPR0101MB1057 X-Rspamd-Queue-Id: 4D7Svz5L4Kz4fkN X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a01:111:f400:fe5d::615:from]; R_DKIM_ALLOW(-0.20)[uoguelph.ca:s=selector1]; FREEFALL_USER(0.00)[rmacklem]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a01:111:f400::/48]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_SHORT(1.00)[1.000]; RCPT_COUNT_FIVE(0.00)[5]; SPAMHAUS_ZRD(0.00)[2a01:111:f400:fe5d::615:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[uoguelph.ca:+]; DMARC_POLICY_ALLOW(-0.50)[uoguelph.ca,none]; DWL_DNSWL_LOW(-1.00)[uoguelph.ca:dkim]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:8075, ipnet:2a01:111:f000::/36, country:US]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; MAILMAN_DEST(0.00)[freebsd-current] 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 17:06:08 -0000 Just fyi, I've reproduced the problem.=0A= All I did was create a 20Gbyte file=0A= on UFS on a slow (4Gbyte or RAM,=0A= slow spinning disk) laptop.=0A= (The UFS file system is just what the installer creates these days.)=0A= =0A= cp still hasn't finished and is definitely=0A= taking a looott longer than dd did.=0A= =0A= I'll start drilling down later to-day.=0A= =0A= I'll admit doing lots of testing of copy_file_range(2)=0A= with large sparse files, but I may have missed testing=0A= a large non-sparse file.=0A= =0A= rick=0A= ps: I've added Kostik and Kirk to the cc.=0A= =0A= =0A= ________________________________________=0A= From: owner-freebsd-current@freebsd.org = on behalf of Alan Somers =0A= Sent: Saturday, January 2, 2021 11:30 AM=0A= To: Matthias Apitz; FreeBSD CURRENT=0A= Subject: Re: cp(1) of large files is causing 100% CPU utilization and poor = transfer=0A= =0A= CAUTION: This email originated from outside of the University of Guelph. Do= not click links or open attachments unless you recognize the sender and kn= ow the content is safe. If in doubt, forward suspicious emails to IThelp@uo= guelph.ca=0A= =0A= =0A= On Sat, Jan 2, 2021 at 9:12 AM Matthias Apitz wrote:=0A= =0A= > El d=EDa s=E1bado, enero 02, 2021 a las 09:06:24a. m. -0700, Alan Somers= =0A= > escribi=F3:=0A= >=0A= > > > As I said, it can be reproduced using only the local file system. Thi= s=0A= > > > was setup recently on a SSD:=0A= > > >=0A= > > > # dmesg | grep ada0=0A= > > > ada0 at ahcich0 bus 0 scbus0 target 0 lun 0=0A= > > > ada0: ACS-2 ATA SATA 3.x device=0A= > > > ada0: Serial Number F995890846=0A= > > > ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 1024bytes)=0A= > > > ada0: Command Queueing enabled=0A= > > > ada0: 488386MB (1000215216 512 byte sectors)=0A= > > >=0A= > > > and by this procedure:=0A= > > >=0A= > > > # gpart create -s gpt ada0=0A= > > > # gpart add -t freebsd-boot -s 512k -a4k -l ssdboot ada0=0A= > > > # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i1 ada0=0A= > > > # gpart add -t freebsd-ufs -l ssdrootfs -b 1m -s 2g ada0=0A= > > > # gpart add -t freebsd-ufs -l ssdvarfs -a 1m -s 2g ada0=0A= > > > # gpart add -t freebsd-ufs -l ssdusrfs -a 1m ada0=0A= > > > # newfs -U -t /dev/gpt/ssdrootfs=0A= > > > # newfs -U -t /dev/gpt/ssdvarfs=0A= > > > # newfs -U -t /dev/gpt/ssdusrfs=0A= > > >=0A= > > > # gpart show -l ada0=0A= > > > =3D> 40 1000215136 ada0 GPT (477G)=0A= > > > 40 1024 1 ssdboot (512K)=0A= > > > 1064 984 - free - (492K)=0A= > > > 2048 4194304 2 ssdrootfs (2.0G)=0A= > > > 4196352 4194304 3 ssdvarfs (2.0G)=0A= > > > 8390656 16777216 4 ssdswap (8.0G)=0A= > > > 25167872 975046656 5 ssdusrfs (465G)=0A= > > > 1000214528 648 - free - (324K)=0A= > > >=0A= > > > # mount -t ufs=0A= > > > /dev/gpt/ssdrootfs on / (ufs, local, soft-updates)=0A= > > > /dev/gpt/ssdvarfs on /var (ufs, local, soft-updates)=0A= > > > /dev/gpt/ssdusrfs on /usr (ufs, local, soft-updates)=0A= > > >=0A= > > > When I run in the /usr fs the command=0A= > > >=0A= > > > # cp -p guru-20210102.tar.gz xxx=0A= > > >=0A= > > > it copies around 168M per minute.=0A= > > >=0A= >=0A= > > Is that copying from /usr to /usr, or from /usr to /var or /?=0A= >=0A= > # cd /home/backups=0A= > # cp -p guru-20210102.tar.gz xxx=0A= >=0A= > i.e. from /usr to /usr.=0A= >=0A= > matthias=0A= >=0A= =0A= Ok, let's narrow this down. Could you please run the command with the=0A= attached D script ?=0A= sudo dtrace -s copy_file_range.d -c "cp -p guru-20210102.tar.gz xxx"=0A= _______________________________________________=0A= freebsd-current@freebsd.org mailing list=0A= https://lists.freebsd.org/mailman/listinfo/freebsd-current=0A= To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"= =0A=