infinity_conf.toml
Overview
infinity_conf.toml is a configuration file for the Infinity system, defining key runtime parameters and operational settings. It governs aspects such as network connectivity, logging behavior, storage options, buffer management, write-ahead logging (WAL), and resource directories. This file is written in TOML (Tom's Obvious, Minimal Language) format, offering a clear, human-readable structure for configuring the Infinity application.
This configuration file enables system administrators and developers to customize how Infinity operates in different environments, such as specifying ports, log verbosity, storage paths, and memory quotas, ensuring flexibility and performance tuning.
Configuration Sections and Parameters
The file is organized into named sections, each grouping related configuration keys. Below is a detailed explanation of these sections and their parameters.
[general]
Purpose: Defines fundamental system-wide settings.
Parameters:
Parameter | Type | Default/Example | Description |
|---|---|---|---|
string |
| Version of the Infinity software. | |
string |
| Time zone setting for logs/timestamps. |
[network]
Purpose: Configures network-related parameters including server binding and ports.
Parameters:
Parameter | Type | Default/Example | Description |
|---|---|---|---|
string |
| IP address/interface the server listens on. | |
int |
| Port for PostgreSQL database connectivity. | |
| int |
| Port for the HTTP server interface. |
int |
| Port for client connections. | |
| int |
| Size of the connection pool for database or network connections. |
[log]
Purpose: Controls logging behavior and output.
Parameters:
Parameter | Type | Default/Example | Description |
|---|---|---|---|
string | Name of the log file. | ||
| string | Directory path where logs are stored. | |
| bool | Whether to print logs to standard output. | |
string |
| Maximum size of a log file before rotation. | |
int | Number of rotated log files to keep. | ||
| string | Minimum level of logs to output. Levels include: trace, debug, info, warning, error, critical. |
[storage]
Purpose: Specifies storage-related configurations, including local and object storage.
Parameters:
Parameter | Type | Default/Example | Description |
|---|---|---|---|
string | Directory for persistent storage. | ||
string | Directory for general data storage. | ||
string |
| Interval for activating garbage collection or optimization. Supports time units (s/m/h). | |
string |
| Interval at which cleanup tasks run. | |
string |
| Interval for data compaction tasks. | |
string |
| Type of storage in use (e.g., local, s3). | |
int |
| Capacity threshold for dumping memory index entries. |
Note: The file contains commented-out example configuration for S3-compatible object storage under [storage.object_storage] for cloud storage scenarios.
[buffer]
Purpose: Settings for buffer management and temporary storage.
Parameters:
Parameter | Type | Default/Example | Description |
|---|---|---|---|
| string |
| Total size allocated for buffer management. |
int |
| Number of LRU (Least Recently Used) buffer slots or caches. | |
| string | Directory for temporary files. | |
string |
| Enables or disables result caching. | |
| string |
| Memory quota for in-memory indexing. |
[wal]
Purpose: Configuration for Write-Ahead Logging (WAL) directory.
Parameters:
Parameter | Type | Default/Example | Description |
|---|---|---|---|
| string | Directory path for WAL files. |
[resource]
Purpose: Directory path for additional resource files required by Infinity.
Parameters:
Parameter | Type | Default/Example | Description |
|---|---|---|---|
| string |
| Path to resource directory. |
Implementation Details and Algorithms
Time Interval Parameters:
The[storage]section contains time-based interval parameters (optimize_interval, cleanup_interval, compact_interval) that support suffixes to denote units:0 means real-time or immediate execution,
sfor seconds (e.g.,"60s"= 60 seconds),mfor minutes (e.g.,"60m"= 60 minutes),hfor hours (e.g.,"1h"= 1 hour).
This flexible parsing allows fine-grained control over periodic background maintenance tasks such as garbage collection, cleanup, and compaction.
Memory Index Dumping (mem_index_capacity):
Controls when the in-memory index entries get flushed/dumped based on capacity (number of entries). This is crucial for managing memory usage and ensuring persistence.Logging Rotation:
The log settings support file size-based rotation using parameters like log_file_max_size and log_file_rotate_count. When the log file reaches the max size, it is rotated, and old files are kept up to the specified count.Buffer Management:
The buffer manager size and LRU settings indicate an in-memory buffer pool with least recently used eviction, improving performance by caching frequently accessed data.
Interaction with Other System Components
Database (PostgreSQL):
The postgres_port and connection pool size indicate that Infinity interacts with a PostgreSQL database backend for persistent storage or metadata management.HTTP Server:
Configured HTTP port (http_port) suggests Infinity exposes an API or a web UI.Logging System:
Log configuration parameters control the logging subsystem, affecting how logs are stored, rotated, and displayed.Storage Subsystem:
Local storage directories and optional object storage configuration allow Infinity to persist data either locally or on cloud storage.Write-Ahead Log (WAL):
WAL directory configuration points to a subsystem that ensures durability and consistency of writes.Buffer Manager:
Buffer-related settings control caching layers that improve read/write performance.
Usage Example
A typical deployment might involve editing this file to:
Set the server to listen on a specific IP and ports.
Adjust logging levels and output destinations for debugging.
Configure storage paths according to the environment (e.g., production vs development).
Tune buffer sizes and memory quotas for performance optimization.
Uncomment and configure object storage parameters if using S3-compatible storage.
Visual Diagram
This file is a configuration utility file with multiple sections. The following flowchart diagram illustrates the main configuration sections and their relationships.
flowchart TD
A[infinity_conf.toml] --> B[general]
A --> C[network]
A --> D[log]
A --> E[storage]
A --> F[buffer]
A --> G[wal]
A --> H[resource]
E --> I[object_storage (optional)]
style A fill:#f9f,stroke:#333,stroke-width:2px
style B fill:#bbf,stroke:#333,stroke-width:1px
style C fill:#bbf,stroke:#333,stroke-width:1px
style D fill:#bbf,stroke:#333,stroke-width:1px
style E fill:#bbf,stroke:#333,stroke-width:1px
style F fill:#bbf,stroke:#333,stroke-width:1px
style G fill:#bbf,stroke:#333,stroke-width:1px
style H fill:#bbf,stroke:#333,stroke-width:1px
style I fill:#ccf,stroke:#333,stroke-width:1px,stroke-dasharray: 5 5
Summary
The infinity_conf.toml file is a critical configuration artifact for the Infinity system, enabling fine-tuning of networking, logging, storage, memory, and resource management. Its modular TOML structure allows clear separation of concerns, supporting flexibility and scalability. Proper configuration of this file is essential for the stable and optimized operation of the Infinity application.