Measuring disk performance for Security Gateway deployments
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.
Download DiskSpd
DiskSpd is a free storage benchmarking tool from Microsoft.
- Download: https://github.com/Microsoft/diskspd/releases/latest/download/DiskSpd.zip
- Documentation: https://github.com/microsoft/diskspd/wiki
- Project page: 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 |
Security Gateway 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 Security Gateway will store its data (or where it is currently installed). Run the following command:
diskspd -b4K -d60 -o32 -t4 -r -w50 -L -c1G testfile.dat
Parameter Explanation
| Parameter | Description |
|---|---|
-b4K |
4KB block size (matches Security Gateway'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 Security Gateway 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 IO
thread | bytes | I/Os | MiB/s | I/O per s | AvgLat | LatStdDev |
-------------------------------------------------------------------------------------------
total: | 2469135802 | 602468 | 24.68 | 10041.13 | 5.892 | 2.345 |
Write IO
thread | bytes | I/Os | MiB/s | I/O per s | AvgLat | LatStdDev |
-------------------------------------------------------------------------------------------
total: | 2469135802 | 602468 | 24.68 | 10041.14 | 6.576 | 2.789 |
Total IO
thread | 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 ms
Write IO: I/O per s: 12,480 AvgLat: 3.2 ms
Total 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 ms
Write IO: I/O per s: 395 AvgLat: 52.1 ms
Total 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 Security Gateway 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). Security Gateway 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