-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
defectcategory: a defect or misbehaviourcategory: a defect or misbehaviour
Description
What type of defect/bug is this?
Unexpected behaviour (obvious or verified by project member)
How can the issue be reproduced?
How can the issue be reproduced?
- Set up FreeRADIUS 3.2.x (Tested in 3.2.3 - 3.2.7) with PostgreSQL backend (tested on versions 16 and 17)
- Configure standard radacct, radpostauth, and cui tables using default schema
- Generate accounting traffic to accumulate 2+ million records in radacct table
- Observe query timeouts and performance degradation
- Scale to 10+ million records - performance becomes unacceptable even with buffered/decoupled accounting
High-Level Suggestions for Resolution
Database Schema Issues:
- Insufficient Indexing: Default PostgreSQL schema lacks indexes for common WHERE clauses and query patterns used by FreeRADIUS
- Monolithic Table Design: radacct, radpostauth, and cui tables grow indefinitely without built-in archival strategy
- Partitioning Limitations: Standard partitioning approaches conflict with radacctid uniqueness constraints
Performance Scaling Problems:
- Query Timeout Threshold: Performance degrades significantly after ~2 million records without additional indexing
- Index Effectiveness Limit: Even with custom indexes, performance issues emerge around 10 million records
- Hardware Dependency: Requires NVMe storage and significant hardware upgrades to maintain performance
Architectural Recommendations:
- Enhanced Default Indexing: Include performance-optimized indexes in default PostgreSQL schema
- Built-in Archival Strategy: Provide recommended data retention and archival procedures
- Partitioning Guidance: Document partition-friendly schema modifications for high-volume deployments
- Load Distribution: Improve buffered SQL processing with intelligent load balancing
- Monitoring Integration: Include performance monitoring recommendations for production deployments
Impact:
This affects any FreeRADIUS deployment using PostgreSQL at scale, particularly ISPs and large organizations processing millions of accounting records. Current workarounds require significant database expertise and custom schema modifications.
Log output from the FreeRADIUS daemon
N/A
Relevant log output from client utilities
N/A
Backtrace from LLDB or GDB
N/A
WayFi-Simeon
Metadata
Metadata
Assignees
Labels
defectcategory: a defect or misbehaviourcategory: a defect or misbehaviour