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]

Parameter

Type

Default/Example

Description

version

string

"0.6.0"

Version of the Infinity software.

time_zone

string

"utc-8"

Time zone setting for logs/timestamps.


[network]

Parameter

Type

Default/Example

Description

server_address

string

"0.0.0.0"

IP address/interface the server listens on.

postgres_port

int

5432

Port for PostgreSQL database connectivity.

http_port

int

23820

Port for the HTTP server interface.

client_port

int

23817

Port for client connections.

connection_pool_size

int

128

Size of the connection pool for database or network connections.


[log]

Parameter

Type

Default/Example

Description

log_filename

string

"infinity.log"

Name of the log file.

log_dir

string

"/var/infinity/log"

Directory path where logs are stored.

log_to_stdout

bool

true

Whether to print logs to standard output.

log_file_max_size

string

"100MB"

Maximum size of a log file before rotation.

log_file_rotate_count

int

10

Number of rotated log files to keep.

log_level

string

"trace"

Minimum level of logs to output. Levels include: trace, debug, info, warning, error, critical.


[storage]

Parameter

Type

Default/Example

Description

persistence_dir

string

"/var/infinity/persistence"

Directory for persistent storage.

data_dir

string

"/var/infinity/data"

Directory for general data storage.

optimize_interval

string

"10s"

Interval for activating garbage collection or optimization. Supports time units (s/m/h).

cleanup_interval

string

"60s"

Interval at which cleanup tasks run.

compact_interval

string

"120s"

Interval for data compaction tasks.

storage_type

string

"local"

Type of storage in use (e.g., local, s3).

mem_index_capacity

int

65536

Capacity threshold for dumping memory index entries.


[buffer]

Parameter

Type

Default/Example

Description

buffer_manager_size

string

"8GB"

Total size allocated for buffer management.

lru_num

int

7

Number of LRU (Least Recently Used) buffer slots or caches.

temp_dir

string

"/var/infinity/tmp"

Directory for temporary files.

result_cache

string

"off"

Enables or disables result caching.

memindex_memory_quota

string

"1GB"

Memory quota for in-memory indexing.


[wal]

Parameter

Type

Default/Example

Description

wal_dir

string

"/var/infinity/wal"

Directory path for WAL files.


[resource]

Parameter

Type

Default/Example

Description

resource_dir

string

"/var/infinity/resource"

Path to resource directory.


Implementation Details and Algorithms


Interaction with Other System Components


Usage Example

A typical deployment might involve editing this file to:


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.