Fix call to otp_write
[freeradius.git] / doc / tuning_guide
index 46dcaa9..bf972fa 100644 (file)
@@ -40,11 +40,24 @@ o Enable caching in the ldap module (try it first, the openldap code
 ------------ SQL MODULE --------------
 o Tune the num_sql_socks to be larger than the number of simultaneous
   authentication/accounting requests.
+o Use the sql module in the session section instead of the radutmp module.
+  It works *much* quicker.
+o Create a multi column index for the (UserName,AcctStopTime) attributes especially
+  if you are using sql for double login detection.
+o If you are using mysql and you do a lot of accounting try using InnoDB for the radacct
+  table instead of MyISAM
+o Add AcctUniqueId in the accounting_stop query. Especially if you have a lot of access
+  servers or your NAS does not send very random Session-Ids. That way you will always have
+  one candidate row to search for, instead of all the rows that have the same AcctSessionId
 
 ------------ COUNTER MODULE ----------
 o Enable noatime on the counter db files.
 o Tune the cache-size configuration directive to match your needs.
   The cache size should be set to 2-3 * number of available nas ports.
+o Keep the database in a memory mapped file if you can help. Backup the
+  file every 10 mins to the disk and copy it to the memory mapped one
+  on server startup.
 
 ------------ RADUTMP MODULE ----------
 o Enable noatime on the radutmp file
+o Don't use it