Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set a maximum number of threads #9

Merged
merged 1 commit into from
Aug 17, 2023
Merged

fix: set a maximum number of threads #9

merged 1 commit into from
Aug 17, 2023

Conversation

trym-b
Copy link
Contributor

@trym-b trym-b commented Aug 16, 2023

Motivation

According to the solrwayback team, the maximum number of threads that can be safely used for indexing is 40. This assumes that the filesystem uses SSDs to store the data. According to them, more threads will result in errors and not a slowdown.

If slower storage media is used, the number of threads should be reduced.

Interface

If you give too many or too few threads, you will get the following output:

python index_it.py --collection t --warc-file-directory /warc-collection/ --number-of-threads 41
usage: index_it.py [-h] --collection COLLECTION --warc-file-directory WARC_FILE_DIRECTORY --number-of-threads NUMBER_OF_THREADS
index_it.py: error: argument --number-of-threads: Number of threads must be less than or equal to 40
python index_it.py --collection t --warc-file-directory /warc-collection/ --number-of-threads 0
usage: index_it.py [-h] --collection COLLECTION --warc-file-directory WARC_FILE_DIRECTORY --number-of-threads NUMBER_OF_THREADS
index_it.py: error: argument --number-of-threads: Number of threads must be greater than 0

# Motivation

According to the `solrwayback` team, the maximum number of threads that
can be safely used for indexing is 40. This assumes that the filesystem
uses SSDs to store the data. According to them, more threads will result
in errors and not a slowdown.

If slower storage media is used, the number of threads should be
reduced.

# Interface

If you give too many or too few threads, you will get the following
output:

```
python index_it.py --collection t --warc-file-directory /warc-collection/ --number-of-threads 41
usage: index_it.py [-h] --collection COLLECTION --warc-file-directory WARC_FILE_DIRECTORY --number-of-threads NUMBER_OF_THREADS
index_it.py: error: argument --number-of-threads: Number of threads must be less than or equal to 40
```

```
python index_it.py --collection t --warc-file-directory /warc-collection/ --number-of-threads 0
usage: index_it.py [-h] --collection COLLECTION --warc-file-directory WARC_FILE_DIRECTORY --number-of-threads NUMBER_OF_THREADS
index_it.py: error: argument --number-of-threads: Number of threads must be greater than 0
```
@trym-b trym-b merged commit 42e764a into main Aug 17, 2023
3 checks passed
@trym-b trym-b deleted the fix/add-max-threads branch August 17, 2023 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant