Skip to main content

Why Does the Initial Malware Scan Take a Long Time?

S
Written by Salvador Aguilar
Updated today

When you first install and enable Monarx, you might notice that the initial scan takes longer than you expected. This is completely normal and is actually a sign that the agent is doing its job thoroughly.

Here is why that first scan requires some extra time and the factors that influence its speed.

The "First Look" Process

The primary reason the initial scan is the longest is that the agent is seeing your files for the very first time. Unlike subsequent scans that only look for changes, the first scan must:

  1. Catalogue and Map: The agent crawls your entire "scan base" (usually the /home/ directory) to identify every single file.

  2. Generate Metadata: For every file found, the agent calculates its metadata (digital fingerprints and attributes).

  3. Cloud Synchronization: This metadata is uploaded to our cloud to see if we’ve analyzed these files before.

  4. Upload & Action: If the cloud identifies a file it hasn't seen in the past, the agent must upload a copy for analysis. If you have Active Protection Mode enabled, the agent also has to take immediate action (cleaning or quarantining) as it finds threats.

Once this "baseline" is established, future scans are significantly faster because we only process what has changed.

We Respect Your Server's Resources

It’s important to know that Monarx is designed to be lightweight. We prioritize your server's performance over scan speed. Our agent constantly monitors the server load; if it detects that your CPU or RAM usage is getting too high, it will automatically "step back" and reduce its scanning speed to ensure your websites remain fast and responsive for your visitors.

⌛ Factors That Impact Scan Duration

Outside of the initial cataloging, several environmental factors can affect how long the process takes:

  • High File Density: A server with millions of tiny files (like large email caches or complex frameworks) takes longer to crawl than one with a few large files.

  • I/O Filesystem Restrictions: Some Operating Systems or hosting platforms place "throttles" on how fast an application can read data from the disk to prevent a single process from hogging all the resources.

  • Hardware Speed: The physical reading speed of your hard drive (SSD vs. HDD) plays a major role in how fast the agent can move through your data.

  • Existing Server Load: If other applications (like database backups or high-traffic web apps) are already consuming CPU and RAM, the Monarx agent will slow down to avoid overwhelming the system.

  • Network Latency: Since we sync metadata with the cloud, a slow or unstable internet connection can add delays to the synchronization step.

  • Archive Depth: If your server contains many nested zip or tar files, the agent may take extra time to look inside those archives to ensure no malware is "hiding" within them.

Did this answer your question?