# Aligners, GPU, and resource usage The most expensive step is alignment with DIAMOND or MMseqs2, hence choosing the right aligner and tuning alignment parameters will have the highest impact. There are three flavors you can choose from: DIAMOND (the default aligner), MMseqs2 CPU mode, and MMseqs2 GPU mode. If the aligner is outside `PATH`, use `--path_to_diamond` or `--path_to_mmseqs`. ## MMseqs2 GPU On Linux, install a GPU enabled MMseqs2 binary and a compatible NVIDIA driver. Then install the optional CAT pack GPU dependency. ```bash python -m pip install 'cat-pack[gpu]' ``` Then prepare the MMSeqs2 database with `--build_mmseqs2` `--gpu` like this: ```bash CAT_pack prepare --db_fasta reference.faa --names names.dmp --nodes nodes.dmp --acc2tax accession2taxid.tsv --db_dir prepared_db --common_prefix reference --build_mmseqs2 --gpu ``` Then select the MMseqs2 aligner and add the `--gpu` flag like this: ```bash CAT_pack cat -c contigs.fna -d prepared_db -o gpu-cat --aligner mmseqs2 --gpu ``` Preparing the database also requires DIAMOND. GPU searches use maximum sensitivity. The `--sensitivity` option applies to MMseqs2 CPU searches. For hardware and driver details, see the [MMseqs2 GPU guide](https://github.com/soedinglab/MMseqs2/wiki#gpu-accelerated-search). ## Optimising running time, RAM, and disk usage CAT and BAT may take a while to run, and may use quite a lot of RAM and disk space. Depending on what you value most, you can tune CAT and BAT to maximize one and minimize others. The classification algorithm itself is fast and is friendly on memory and disk space. The most expensive step is alignment with DIAMOND, hence tuning alignment parameters will have the highest impact: - The `-n / --threads` argument allows you to choose the number of cores to deploy. - You can choose to run DIAMOND in sensitive mode with the `--diamond_mode sensitive` flag. This will increase sensitivity but will make alignment considerably slower. - Setting the `--block_size` parameter lower will decrease memory and temporary disk space usage. Setting it higher will increase performance. - For high memory machines, it is advised to set `--index_chunks` to 1 (currently the default). This parameter has no effect on temporary disk space usage. - You can specify the location of temporary DIAMOND files with the `--tmpdir` argument.