Result Writer Settings#
💡 Tip: You can change these settings directly in the bgscan application instead of editing the TOML file manually.
Navigate to Settings → General Settings tab 2 in the main menu to configure these options interactively using the TUI inspector.
Configuration file: settings/writer_settings.toml
This file controls buffering and how often results are flushed to disk.
Quick Reference#
| Setting | Default | Description |
|---|---|---|
merge_flush_interval | 2000 | Interval (in milliseconds) for merging delta results into the main result file. |
chan_size | 4096 | Capacity of the internal channel used by scanner workers to send IP scan results to the writer goroutine. |
batch_size | 4096 | Initial capacity of the in-memory batch used to accumulate IP scan results before flushing them to disk. |
Merge Flush Interval#
Controls how frequently (in milliseconds) partial scan results are committed to disk. Lower values increase disk I/O but reduce memory usage. Higher values reduce disk I/O but increase memory usage.
merge_flush_interval = 2000Recommended values:
1000-5000for typical use- Lower values for systems with fast storage
- Higher values for systems with limited I/O bandwidth
Channel Size#
The capacity of the internal channel used by scanner workers to send IP scan results to the writer goroutine. Higher values can help prevent worker bottlenecks during heavy disk I/O.
chan_size = 4096Recommended values:
1024-4096for moderate throughput4096-16384for high-throughput scanning
Batch Size#
The initial capacity of the in-memory batch used to accumulate IP scan results before flushing them to disk. Higher values reduce the frequency of disk writes but increase memory usage.
batch_size = 4096Recommended values:
1024-4096for memory-constrained systems4096-16384for systems with ample memory
Related Files#
general_settings.toml— Global scan control and pipeline modeicmp_settings.toml— ICMP scan configurationtcp_settings.toml— TCP port scan configurationhttp_settings.toml— HTTP/HTTPS/HTTP3 probe configurationdns_settings.toml— DNS scan configurationxray_settings.toml— Xray outbound validation