---
title: Measuring disk performance for SecurityGateway deployments
description: Security Gateway is heavily I/O bound. Disk performance directly impacts message processing throughput. Before deploying Security Gateway in production, verify your storage meets minimum IOPS and latency requirements using Microsoft DiskSpd.
---

[Skip to content](https://knowledge.mdaemon.com/measuring-disk-performance-securitygateway#main-content)

[![](https://knowledge.mdaemon.com/hs-fs/hubfs/MDaemon-Technologies_logo.png?width=200&height=150&name=MDaemon-Technologies_logo.png)](https://mdaemon.com/)

- [Knowledge Base Home](https://knowledge.mdaemon.com/)
- [Go to www.mdaemon.com](https://mdaemon.com/)

Open main navigation

Close main navigation

- [Knowledge Base Home](https://knowledge.mdaemon.com/)
- [Go to www.mdaemon.com](https://mdaemon.com/)
- [Contact Us](https://mdaemon.com/pages/contact-us)

[Contact Us](https://mdaemon.com/pages/contact-us)

 Knowledge Base

- There are no suggestions because the search field is empty.

1. [Knowledge Base Home](https://knowledge.mdaemon.com/?hsLang=en)
2. [SecurityGateway for Email Servers](https://knowledge.mdaemon.com/securitygateway-for-email-servers?hsLang=en)

# Measuring disk performance for SecurityGateway deployments

## SecurityGateway is heavily I/O bound. Disk performance directly impacts message processing throughput. Before deploying SecurityGateway in production, verify your storage meets minimum IOPS and latency requirements using Microsoft DiskSpd.

### **Download DiskSpd**

DiskSpd is a free storage benchmarking tool from Microsoft.

- **Download:** [https://github.com/Microsoft/diskspd/releases/latest/download/DiskSpd.zip](https://aka.ms/getdiskspd)
- **Documentation:** [https://github.com/microsoft/diskspd/wiki](https://github.com/microsoft/diskspd/wiki)
- **Project page:** [https://github.com/microsoft/diskspd](https://github.com/microsoft/diskspd)

Extract the ZIP file and use the executable matching your platform (amd64 for 64-bit Windows).

### **Minimum Requirements by Deployment Size**

| Deployment | Users | Est. Messages/Day | Min. IOPS | Min. Storage |
| --- | --- | --- | --- | --- |
| Small | Up to 100 | 50,000 | 500 | Spinning disk or SSD |
| Medium | 100 - 500 | 250,000 | 3,000 | SSD |
| Large | 500 - 1,000 | 500,000 | 10,000 | SSD |
| Enterprise | 1,000 - 2,500 | 1,250,000 | 20,000 | SSD |
| High Volume | 2,500+ | 2,500,000+ | 50,000+ | SSD (NVMe recommended) |

Both read and write IOPS should meet the minimum threshold for your deployment tier.

### **Latency Thresholds**

| Rating | Read Latency | Write Latency |
| --- | --- | --- |
| Good | \< 1 ms | \< 1 ms |
| Acceptable | 1 - 10 ms | 1 - 15 ms |
| Poor | \> 10 ms | \> 15 ms |

SecurityGateway uses a Firebird embedded database with frequent small transactions. Low latency is critical for optimal performance, especially as database files grow over time.

### **Running the Test**

Open an elevated command prompt and navigate to the directory where SecurityGateway will store its data (or where it is currently installed). Run the following command:

```
-Sh diskspd -b4K -d60 -o32 -t4 -r -w50 -L -c1G testfile.dat
```

### **Parameter Explanation**

| Parameter | Description |
| --- | --- |
|   `-Sh` |  Disable both software (OS-level) and hardware write    caching |
| `-b4K` | 4KB block size (matches SecurityGateway's I/O pattern) |
| `-d60` | 60-second test duration |
| `-o32` | 32 outstanding I/Os per thread (queue depth) |
| `-t4` | 4 threads |
| `-r` | Random I/O (not sequential) |
| `-w50` | 50% writes, 50% reads |
| `-L` | Capture latency statistics |
| `-c1G` | Create 1GB test file |

Run the test on the actual drive where SecurityGateway data will reside. If running in a virtual machine, run the test inside the VM to measure actual available performance.

 

### **Reading the Results**

After the test completes, DiskSpd displays a detailed report. Here's how to find the key metrics.

### **Finding IOPS**

Look for the **Read IO**, **Write IO**, and **Total IO** sections near the end of the output:

```
Read IOthread |       bytes     |     I/Os     |    MiB/s   |  I/O per s |  AvgLat  | LatStdDev |-------------------------------------------------------------------------------------------total: |      2469135802 |       602468 |      24.68 |   10041.13 |    5.892 |     2.345 |Write IOthread |       bytes     |     I/Os     |    MiB/s   |  I/O per s |  AvgLat  | LatStdDev |-------------------------------------------------------------------------------------------total: |      2469135802 |       602468 |      24.68 |   10041.14 |    6.576 |     2.789 |Total IOthread |       bytes     |     I/Os     |    MiB/s   |  I/O per s |  AvgLat  | LatStdDev |-------------------------------------------------------------------------------------------total: |      4938271604 |      1204936 |      49.36 |   20082.27 |    6.234 |     2.567 |
```

The **I/O per s** column shows your IOPS:

- **Read IO: I/O per s** = Read IOPS
- **Write IO: I/O per s** = Write IOPS
- **Total IO: I/O per s** = Combined IOPS

Both read and write IOPS should meet the minimum threshold for your deployment tier.

### **Finding Latency**

The **AvgLat** column in the I/O tables shows average latency in milliseconds. For more detail, look for the percentile distribution table:

```
  %-ile |  Read (ms) | Write (ms) | Total (ms)----------------------------------------------    min |      0.082 |      0.091 |      0.082   25th |      3.456 |      4.567 |      3.890   50th |      5.678 |      6.789 |      6.123   75th |      8.901 |     10.012 |      9.345   90th |     12.345 |     14.567 |     13.456   95th |     15.678 |     18.901 |     17.234   99th |     22.345 |     26.789 |     24.567    max |     45.678 |     52.345 |     52.345
```

Key values to check:

- **AvgLat:** Average latency shown in the I/O table
- **50th percentile (median):** Should be under 10ms for reads, under 15ms for writes
- **99th percentile:** High values here indicate occasional latency spikes

### **Example Results**

### **Good Result**

```
Read IO:   I/O per s: 12,500    AvgLat: 2.1 msWrite IO:  I/O per s: 12,480    AvgLat: 3.2 msTotal IO:  I/O per s: 24,980
```

This storage is suitable for large deployments (500 - 1,000 users).

### **Poor Result**

```
Read IO:   I/O per s: 420    AvgLat: 38.5 msWrite IO:  I/O per s: 395    AvgLat: 52.1 msTotal IO:  I/O per s: 815
```

This storage will cause performance problems. Message processing will be slow and the web interface may be unresponsive during peak load.

### **Common Issues**

### **Low IOPS on Virtual Machines**

Virtual machines sharing storage with other VMs often show degraded IOPS during peak hours. Solutions:

- Use dedicated storage for the SecurityGateway VM
- Use thick-provisioned virtual disks (thin provisioning causes latency spikes)
- Consider direct-attached storage instead of SAN/NAS
- Monitor hypervisor-level disk latency

### **High Latency with Adequate IOPS**

If IOPS numbers look acceptable but latency is high:

- Check for disk fragmentation
- Verify the storage controller has write caching enabled
- On SSDs, check if the drive is near capacity (performance degrades above 80% full)
- Check for firmware updates for storage controllers or drives

### **Inconsistent Results**

If results vary significantly between test runs:

- Other processes may be competing for disk I/O
- Run tests during off-peak hours for baseline measurements
- Check for antivirus software scanning the test file
- On virtual machines, other VMs may be causing I/O contention

### **SSD Recommendations**

For production deployments, choose SSDs rated for high write endurance (DWPD - Drive Writes Per Day). SecurityGateway generates constant write activity from:

- Message queuing
- Database transactions
- Logging

Consumer SSDs may wear prematurely. Enterprise or "mixed-use" SSDs with 1+ DWPD rating are recommended.

### **Cleanup**

After testing, delete the test file:

```
del testfile.dat
```

### **See Also**

- [SecurityGateway System Requirements](https://mdaemon.com/pages/security-gateway-system-requirements)
- [Microsoft DiskSpd Wiki](https://github.com/microsoft/diskspd/wiki)
- [DiskSpd Releases](https://github.com/microsoft/diskspd/releases)

- [MDaemon Email Server](https://knowledge.mdaemon.com/mdaemon-email-server?hsLang=en#main-content)

    - [Mobile Device Management](https://knowledge.mdaemon.com/mdaemon-email-server?hsLang=en#mobile-device-management)
- [MDaemon AntiVirus (SecurityPlus)](https://knowledge.mdaemon.com/mdaemon-antivirus-securityplus?hsLang=en)
- [ActiveSync for MDaemon](https://knowledge.mdaemon.com/activesync-for-mdaemon?hsLang=en)
- [MDaemon Connector for Outlook (Outlook Connector)](https://knowledge.mdaemon.com/mdaemon-connector-for-outlook-outlook-connector?hsLang=en)
- [SecurityGateway for Email Servers](https://knowledge.mdaemon.com/securitygateway-for-email-servers?hsLang=en)
- [RelayFax Network Software](https://knowledge.mdaemon.com/relayfax-network-software?hsLang=en)

[![Chill listening crop-3](https://knowledge.mdaemon.com/hs-fs/hubfs/belch.io/template-assets/MDaemon-Technologies_logo.png?width=199&height=41&name=MDaemon-Technologies_logo.png "Chill listening crop-3")](https://www.mdaemon.com)

[Knowledge Base Home](https://knowledge.mdaemon.com?hsLang=en)

<https://www.youtube.com/c/MDaemonTechnologies> <https://www.linkedin.com/company/mdaemon-technologies/> <https://www.facebook.com/MDaemon.Technologies/> <https://www.twitter.com/MDaemon_Email>

Copyright © 2025, MDaemon Technologies