Tips: What are the Best Practices to Optimize Memory Usage During Scans?

Optimizing memory usage is critical for maintaining endpoint stability and ensuring scans complete efficiently, especially when dealing with large files or resource-constrained machines.

Here are the best practices for optimizing memory usage during Spirion scans, categorized by configuration area:

1. Tune the "Advanced Options" in the Scan Wizard

  • Set Realistic Memory Triggers:
    • Use the Memory Trigger System Pagefile (recommended: 10%) to prevent system crashes.
    • Use the Memory Trigger Application setting if you want to cap the Spirion process itself (for example, set it to 1024 MB or 2048 MB). This prevents the Agent from growing too large when decompressing massive archives.
  • Limit Parallelism (Number of Cores):
    • Each additional core used in a scan increases the memory footprint because the Agent buffers multiple files simultaneously.
    • Best Practice: For workstations, use 1 or 2 cores. Only use "0" (all cores) on high-spec servers with 32 GB or more of RAM.

2. Optimize File Handling

  • Limit Compressed File Depth:
    • In the "Scan Email and Compressed Files" settings, limit the Recursion Level (e.g., to 3 or 5). Deeply nested zip files (a zip inside a zip inside a zip) consume exponential amounts of memory to unpack.
  • Set Maximum File Size Limits:
    • Configure the Agent to skip files larger than a certain size (for example, 100 MB or 500 MB) unless absolutely necessary.
    • Scanning multi-gigabyte log files or database exports is the #1 cause of memory exhaustion.
  • Use "Ignore Unchanged Files":
    • Enable Search History. This ensures the agent only spends memory processing new or modified files, significantly reducing the resource load on subsequent scan runs.

3. Manage OCR (Optical Character Recognition)

  • Targeted OCR:
    • OCR is extremely memory-intensive. Only enable it for specific locations where images (PDFs, JPGs) are likely to contain sensitive data.
    • Best Practice: If you must use OCR, ensure "Run Low Process Priority" is enabled to allow the OS to manage the heavy CPU/Memory spikes OCR creates.

4. Agent Policy & Throttling

  • CPU Throttling:
    • While primarily for CPU, throttling the agent to 20% or 30% indirectly helps memory stability by slowing down the rate at which the agent "feeds" new data into memory buffers.
  • Schedule During Idle Time:
    • Run memory-intensive scans (like full drive searches) during off-hours. This ensures Spirion isn't competing for RAM with the user's web browser, Outlook, or Teams.

5. Endpoint Environment Prep

  • SSD vs. HDD:
    • If possible, prioritize scanning on machines with SSDs. SSDs handle "paging" (moving data between RAM and the Pagefile) much faster than HDDs, which prevents the system from "locking up" when memory triggers are approached.
  • Exclude Known "Noise" Folders:
    • Exclude large, non-sensitive directories like C:\Windows, C:\Program Files, and temporary cache folders. This prevents the Agent from wasting memory analyzing system binaries and temp files.

Summary Checklist for High-Memory Environments:

Setting

Recommended Value

Number of Cores

1 or 2

Memory Trigger Pagefile

10%

Max File Size

100 MB

Compressed Recursion

3

Process Priority

Low

Tip: If you are scanning Database Blobs or Large PSTs, memory usage will naturally be higher. In these cases, it is often better to use a Dedicated Scanning Agent (a high-spec VM) rather than running the scan on the end-user's local machine.