reformat for 80 cols
[freeradius.git] / doc / tuning_guide
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 Tune the ldap_connections_number to be larger than the number of
27   simultaneous user authentication requests.
28 o Try to maximize caching in the ldap server.  In particular *always*
29   enable indexing of the uid attribute (equality index) and the
30   cn attribute (equality index - the cn attribute is used to search
31   for groups).  Make the ldap server entry/directory cache memory sizes
32   as large as possible.  In general try allocating as much memory as you
33   can afford to your ldap server.
34 o Put default profiles in ldap.  User entries should only contain
35   non standard values in order to remain small and maximize the gains
36   of caching the user default/regular profiles.
37 o Enable caching in the ldap module (try it first, the openldap code
38   is not quite mature).
39
40 ------------ SQL MODULE --------------
41 o Tune the num_sql_socks to be larger than the number of simultaneous
42   authentication/accounting requests.
43 o Create an index for the radacct table to minimize the penalty of a
44   growing accounting table. The index should be for the UserName attribute
45   with additional attributes:
46     AcctSessionId,AcctStartTime,AcctStopTime,NASIPAddres
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
53 ------------ RADUTMP MODULE ----------
54 o Enable noatime on the radutmp file