Turn On GPU Acceleration

SpamFoo Client runs on the server's processor (CPU) by default, and for most servers that is all it needs. If the server has an NVIDIA graphics card (GPU), you can have SpamFoo Client use it to scan mail faster.

  • The GPU runs the model that reads message text, which is the largest part of each scan.
  • The other models stay on the CPU.
  • You only install the NVIDIA driver. SpamFoo Client downloads everything else it needs, directly from NVIDIA, and checks it before use.

Requirements

  • An NVIDIA GPU that supports CUDA 13. CUDA is NVIDIA's software for running programs on its GPUs. Examples include the GeForce RTX 30 and 40 series and the NVIDIA T4. Older GPUs, such as the GeForce GTX 10 series, and other GPU brands are not supported.
  • An NVIDIA driver that supports CUDA 13.
  • Windows or Linux on an x64 processor. GPU acceleration is not available in the Docker image.
  • Outbound HTTPS (port 443) access to developer.download.nvidia.com for the NVIDIA libraries. If the server can't reach it, see Servers That Can't Reach NVIDIA.
  • Outbound HTTPS access to downloads.spamfoo.com for the GPU build of SpamFoo Client.
Note GPU acceleration uses more memory and disk space. Watch memory use after you turn it on, especially on servers that are close to their limit.

Turn On GPU Acceleration

  1. Install the NVIDIA driver for your GPU from nvidia.com/drivers. Restart the server if the installer asks you to.
  2. Open the admin console and go to System > Settings.
  3. In the Hardware card, turn on GPU Acceleration.
  4. Click Save Changes.
  5. If a box asks Enable GPU acceleration?, click Enable and download.

SpamFoo Client does the rest:

  • If it's running the standard build: it moves to the GPU release channel and installs the GPU build, the same way it installs a program update. It stops while the new files are put in place. See Update and Back Up for how it starts again.
  • On the GPU build: it downloads NVIDIA's CUDA 13 and cuDNN 9 libraries, checks them against NVIDIA's published SHA-256 hashes, and saves them in the runtime folder of the data directory. A progress bar appears under the GPU Acceleration switch while this happens.
  • During the download: scanning continues on the CPU, so mail is not held up.
  • When the download finishes: scanning moves to the GPU. No restart is needed.

To check that the GPU is in use, go to System > Status. The status line at the top says GPU active. If it says GPU present, not in use, the switch is off, the NVIDIA libraries are still downloading, no message has been scanned since the download finished, or the card is too old to support CUDA 13. In that last case, SpamFoo Client keeps scanning on the processor. Download messages also appear in the system log. See Monitor Logs and Health.

Fix a Switch You Can't Turn On

The Switch Says No GPU Was Detected

The message under the switch says No compatible NVIDIA GPU was detected on this server.

Cause
SpamFoo Client did not find an NVIDIA GPU, or the NVIDIA driver is not working.
Fix
Check that the card is installed and the NVIDIA driver is installed and working. Then restart SpamFoo Client.

The Switch Is Locked by an Environment Variable

The message under the switch says GPU acceleration is controlled by the SPAMFOO_GPU environment variable and cannot be changed here.

Cause
The SPAMFOO_GPU environment variable is set on the server.
Fix
Remove the variable and restart SpamFoo Client to control GPU acceleration from the Settings page.

Turn Off GPU Acceleration

  1. Go to System > Settings.
  2. In the Hardware card, turn off GPU Acceleration.
  3. Click Save Changes.

SpamFoo Client goes back to the CPU starting with the next message. If turning the switch on moved it to a GPU release channel, it also goes back to the release channel it was on before.

The NVIDIA libraries stay in the runtime folder, so turning GPU acceleration on again later is faster.

Environment Variables

Most servers only need the switch on the Settings page. These variables are for servers where you want the GPU settings fixed ahead of time, such as automated setups.

SPAMFOO_GPU

Set to true to always use the GPU, or false to always use the CPU. While it's set, the switch on the Settings page is locked. true only works when the GPU build is installed.

Default: not set

SPAMFOO_GPU_DEVICE

Which GPU to use when the server has more than one. GPUs are numbered from 0.

Default: 0

SPAMFOO_GPU_AUTODOWNLOAD

Set to false to stop SpamFoo Client from downloading the NVIDIA libraries. GPU acceleration still works if the libraries are already installed on the server.

Default: true

SPAMFOO_RUNTIME

The folder where the NVIDIA libraries are saved.

Default: <data directory>/runtime

Servers That Can't Reach NVIDIA

  1. Set SPAMFOO_GPU_AUTODOWNLOAD=false.
  2. Install NVIDIA's CUDA 13 runtime and cuDNN 9 libraries on the server yourself.
  3. Restart SpamFoo Client.

When the libraries are installed for the whole system, SpamFoo Client finds and uses them without downloading anything. Moving to the GPU build still needs access to downloads.spamfoo.com.

Next Steps