| 1 |
------------ MAIN SERVER ------------- |
| 2 |
o If you have a large user base and/or many authentication requests try |
| 3 |
using a scalable authentication mechanism like ldap or sql. |
| 4 |
o Enable noatime on all the freeradius log files or better yet on the |
| 5 |
freeradius log directory. |
| 6 |
o Always use the latest cvs version. It will probably contain a few |
| 7 |
fixes and enhancements. |
| 8 |
o Always try to use the least modules possible. In particular if you |
| 9 |
can avoid it do not use the detail and radwtmp (files) modules. |
| 10 |
They will slow down your accounting. |
| 11 |
o Use the users file to only set default profiles. Do not place any |
| 12 |
users there. Keep it as small as possible. Always set default |
| 13 |
attributes in the users file and don't fill the user entries in |
| 14 |
ldap/sql with default values. In general the ldap/sql user profiles |
| 15 |
should contain user attributes only in special user cases. |
| 16 |
o Tune thread pool parameters to match your size requirements. |
| 17 |
Set max_requests_per_server to zero to avoid server thread restarts. |
| 18 |
o Enlarge the timeout (10 secs) and retries (5-7) in the access servers |
| 19 |
for accounting. That way you won't lose any accounting information. |
| 20 |
o Use well tuned Fast Ethernet connections to minimize latency. |
| 21 |
o freeradius is multi threaded and i/o bound. That means you should use |
| 22 |
the latest OS kernels/patches for improved multi processor and |
| 23 |
network performance. |
| 24 |
|
| 25 |
------------ LDAP MODULE ------------- |
| 26 |
o Try to maximize caching in the ldap server. In particular *always* |
| 27 |
enable indexing of the uid attribute (equality index) and the |
| 28 |
cn attribute (equality index - the cn attribute is used to search |
| 29 |
for groups). Make the ldap server entry/directory cache memory sizes |
| 30 |
as large as possible. In general try allocating as much memory as you |
| 31 |
can afford to your ldap server. |
| 32 |
o Put default profiles in ldap. User entries should only contain |
| 33 |
non standard values in order to remain small and maximize the gains |
| 34 |
of caching the user default/regular profiles. |
| 35 |
o Enable group caching in groups. |
| 36 |
|
| 37 |
------------ SQL MODULE -------------- |
| 38 |
o Use the sql module in the session section instead of the radutmp module. |
| 39 |
It works *much* quicker. |
| 40 |
o Create a multi column index for the (UserName,AcctStopTime) attributes especially |
| 41 |
if you are using sql for double login detection. |
| 42 |
o If you are using mysql and you do a lot of accounting try using InnoDB for the radacct |
| 43 |
table instead of MyISAM (this should be the default in all schemas) |
| 44 |
o Add AcctUniqueId in the accounting_stop query. Especially if you have a lot of access |
| 45 |
servers or your NAS does not send very random Session-Ids. That way you will always have |
| 46 |
one candidate row to search for, instead of all the rows that have the same AcctSessionId |
| 47 |
|
| 48 |
------------ COUNTER MODULE ---------- |
| 49 |
o Enable noatime on the counter db files. |
| 50 |
o Tune the cache_size configuration directive to match your needs. |
| 51 |
The cache size should be set to 2-3 * number of available nas ports. |
| 52 |
o Keep the database in a memory mapped file if you can help. Backup the |
| 53 |
file every 10 mins to the disk and copy it to the memory mapped one |
| 54 |
on server startup. |
| 55 |
|
| 56 |
------------ RADUTMP MODULE ---------- |
| 57 |
o Enable noatime on the radutmp file |
| 58 |
o Don't use it |