Hy,
I suppose, I’ve got the same problem.
Nextcloud documentation (see: SMB/CIFS — Nextcloud latest Administration Manual latest documentation) says,
libsmbclient-php should be installed for optimum performance.
Ubuntu 20.04 unfortunately does not provide a ready compiled package for this.
This source GitHub - eduardok/libsmbclient-php: smbclient's extension for PHP should work.
To compile this PECL module in Ubuntu 20.04, you have to install php7.4-dev and libsmbclient-dev.
Thanks for this hint: Extreme CPU load and slow operation with external storage SMB/CIFS · Issue #6865 · nextcloud/server · GitHub