Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Jan 2021 09:30:13 -0700
From:      Alan Somers <asomers@freebsd.org>
To:        Matthias Apitz <guru@unixarea.de>, FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Re: cp(1) of large files is causing 100% CPU utilization and poor transfer
Message-ID:  <CAOtMX2iRS6XVLkABSMQdcDCUHRXhEHEjyzuOqkMHudK=he33GA@mail.gmail.com>
In-Reply-To: <X/CbUu4tVQG81ItJ@c720-r368166.fritz.box>
References:  <X/CKQFbpbWDdLXvw@c720-r368166.fritz.box> <CAOtMX2gd6vaBF=6Z6stefGRN8A7S4Gtf4drO-YgAbd=KXPwKNg@mail.gmail.com> <X/CY/kuKUJHUVEbB@c720-r368166.fritz.box> <CAOtMX2hFupzf-MD84eo_-n9OzfYX6b6tWRsHPECZGKaq5QCUVw@mail.gmail.com> <X/CbUu4tVQG81ItJ@c720-r368166.fritz.box>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jan 2, 2021 at 9:12 AM Matthias Apitz <guru@unixarea.de> wrote:

> El d=C3=ADa s=C3=A1bado, enero 02, 2021 a las 09:06:24a. m. -0700, Alan S=
omers
> escribi=C3=B3:
>
> > > As I said, it can be reproduced using only the local file system. Thi=
s
> > > was setup recently on a SSD:
> > >
> > > # dmesg | grep ada0
> > > ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
> > > ada0: <TS512GMTS430S R0906A> ACS-2 ATA SATA 3.x device
> > > ada0: Serial Number F995890846
> > > ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 1024bytes)
> > > ada0: Command Queueing enabled
> > > ada0: 488386MB (1000215216 512 byte sectors)
> > >
> > > and by this procedure:
> > >
> > > # gpart create -s gpt ada0
> > > # gpart add -t freebsd-boot -s 512k -a4k -l ssdboot ada0
> > > # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i1 ada0
> > > # gpart add -t freebsd-ufs -l ssdrootfs -b 1m -s 2g ada0
> > > # gpart add -t freebsd-ufs -l ssdvarfs -a 1m -s 2g ada0
> > > # gpart add -t freebsd-ufs -l ssdusrfs -a 1m ada0
> > > # newfs -U -t /dev/gpt/ssdrootfs
> > > # newfs -U -t /dev/gpt/ssdvarfs
> > > # newfs -U -t /dev/gpt/ssdusrfs
> > >
> > > # gpart show -l ada0
> > > =3D>        40  1000215136  ada0  GPT  (477G)
> > >           40        1024     1  ssdboot  (512K)
> > >         1064         984        - free -  (492K)
> > >         2048     4194304     2  ssdrootfs  (2.0G)
> > >      4196352     4194304     3  ssdvarfs  (2.0G)
> > >      8390656    16777216     4  ssdswap  (8.0G)
> > >     25167872   975046656     5  ssdusrfs  (465G)
> > >   1000214528         648        - free -  (324K)
> > >
> > > # mount -t ufs
> > > /dev/gpt/ssdrootfs on / (ufs, local, soft-updates)
> > > /dev/gpt/ssdvarfs on /var (ufs, local, soft-updates)
> > > /dev/gpt/ssdusrfs on /usr (ufs, local, soft-updates)
> > >
> > > When I run in the /usr fs the command
> > >
> > > # cp -p guru-20210102.tar.gz xxx
> > >
> > > it copies around 168M per minute.
> > >
>
> > Is that copying from /usr to /usr, or from /usr to /var or /?
>
> # cd /home/backups
> # cp -p guru-20210102.tar.gz xxx
>
> i.e. from /usr to /usr.
>
>         matthias
>

Ok, let's narrow this down.  Could you please run the command with the
attached D script ?
sudo dtrace -s copy_file_range.d -c "cp -p guru-20210102.tar.gz xxx"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2iRS6XVLkABSMQdcDCUHRXhEHEjyzuOqkMHudK=he33GA>