Skip to content

Commit

Permalink
backup: add some worker threads by default
Browse files Browse the repository at this point in the history
  • Loading branch information
sebsura committed Nov 6, 2023
1 parent df2d2da commit 76fe898
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/filed/backup.cc
Expand Up @@ -208,6 +208,10 @@ bool BlastDataToStorageDaemon(JobControlRecord* jcr, crypto_cipher_t cipher)
jcr->fd_impl->xattr_data->u.build->content = GetPoolMemory(PM_MESSAGE);
}

// enable the use of some workers
auto num_workers = std::thread::hardware_concurrency() / 2;
jcr->fd_impl->pool.ensure_num_workers(num_workers);

// Subroutine SaveFile() is called for each file
if (!FindFiles(jcr, (FindFilesPacket*)jcr->fd_impl->ff, SaveFile,
PluginSave)) {
Expand Down

0 comments on commit 76fe898

Please sign in to comment.