关闭分块上传能提升处于高上传带宽环境时文件上传的性能表现,可根据自身需求选择是否启用。
方法为在ssh连接中切换到 Nextcloud 所在目录,执行以下命令( www-data 是 Nextcloud 文件所属用户,根据自己的情况替换)
sudo -u www-data php occ config:app:set files max_chunk_size --value [分块大小的数值]
命令后面加上自己想要设置的分块上传大小的值(单位为字节),此设置默认为 10485760 字节 (10 MB),如果处于高上传带宽环境时,可以尝试关闭分块上传以提升上传性能,方法为执行以下命令
sudo -u www-data php occ config:app:set files max_chunk_size --value 0
Adjust chunk size on Nextcloud side
For upload performance improvements in environments with high upload bandwidth, the server’s upload chunk size may be adjusted:
sudo -u www-data php occ config:app:set files max_chunk_size –value 20971520
Put in a value in bytes (in this example, 20MB). Set --value 0
for no chunking at all.
Default is 10485760 (10 MiB).
Note
Changing max_chunk_size
will not have any performance impact on files uploaded through File Drop shares as unauthenticated file uploads are not chunked.