i'm trying to solve this problem in six months<br><br>this is my configuration<br><br><div class="im"><div>thread pool {</div><div><span style="white-space: pre;">       </span>start_servers = 10</div><div><span style="white-space: pre;">  </span>max_servers = 32 </div>
<div><span style="white-space: pre;">     </span>min_spare_servers = 3</div><div><span style="white-space: pre;">       </span>max_spare_servers = 10</div></div><div><span style="white-space: pre;">  </span>max_requests_per_server = 0</div>
<div>}</div><br>what i can change ?<br><br>upgrade start_servers?<br><br><div class="gmail_quote">2009/12/23 Borislav Dimitrov <span dir="ltr"><<a href="mailto:b.dimitrov@ngsystems.net">b.dimitrov@ngsystems.net</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="word-wrap: break-word;">It's difficult to say, but I'd say about 7 - 10... Try with something like that:<div>
<div class="im"><div>thread pool {</div><div><span style="white-space: pre;"> </span>start_servers = 10</div><div><span style="white-space: pre;">  </span>max_servers = 32 </div><div><span style="white-space: pre;">  </span>min_spare_servers = 3</div>
<div><span style="white-space: pre;">     </span>max_spare_servers = 10</div></div><div class="im"><div><span style="white-space: pre;">  </span>max_requests_per_server = 0</div><div>}</div><div><br></div></div><div>I don't know what your setup is exactly but in some situations its advisable that you configure FR not to start and stop processes/threads dynamically (e.g.if you have some heavy setup procedures that need to be executed on thread startup; e.g. if you have a custom rlm_perl module which loads lots of configuration from a DB on thread startup).</div>
<div>I now saw you second message. The default settings should be good for about 3500 users and more. For VoIP accounting even less is OK. I'm starting to think that your problem is elsewhere... Does your CPU usage stay low? Have you created indexes in your DB? Is <span style="font-family: monospace,Arial,sans-serif; font-size: 13px; line-height: 16px; white-space: pre;">hostname_lookups = no? <span style="font-family: Helvetica; font-size: medium; line-height: normal; white-space: normal;">I find it difficult to guess what the problem is without knowing your setup but something is deffinitely slowing things down... FR is capable of managing many more than 3500 users on a commodity server when configured properly. Also check for general network delay packet loss etc... It's not normal the CPU usage to stay low while requests are queueing one after another to be processed...</span></span></div>
<div><font face="Helvetica, Arial, sans-serif"><br></font></div></div><div><div><div class="im"><div> <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="word-wrap: break-word;">
<div>Sincerely,</div><div><br></div><div><div><div style="word-wrap: break-word;"><div>Borislav Dimitrov</div><div>e-mail: <a href="mailto:b.dimitrov@ngsystems.net" target="_blank">b.dimitrov@ngsystems.net</a></div><div>GSM: 0888 51 55 45; 0889 28 54 57</div>
NG Systems<div><div>Lavele 32 str, fl: 4,</div><div>Sofia, Bulgaria</div><div><br></div></div></div></div></div></div></span><br> </div><br></div><div><div></div><div class="h5"><div><div>On 23.12.2009, at 15:49, Alisson wrote:</div>
<br><blockquote type="cite">ok..<br><br>look I have 3500 customers authenticating on this server with mysql<br><br>how many threads I need to set?<br><br><div>thread pool {</div><div><span style="white-space: pre;">     </span>start_servers = 1</div>
<div> <span style="white-space: pre;">    </span>max_servers = 1 </div><div><span style="white-space: pre;">   </span>min_spare_servers = 1</div><div><span style="white-space: pre;">       </span>max_spare_servers = 1</div><div><span style="white-space: pre;">       </span>max_requests_per_server = 0</div>
 <div>}</div><br><br><div class="gmail_quote">2009/12/23 Borislav Dimitrov <span dir="ltr"><<a href="mailto:b.dimitrov@ngsystems.net" target="_blank">b.dimitrov@ngsystems.net</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
 <div style="word-wrap: break-word;">Just to add that I hope that you are starting FR without the debug flag/option (i.e. without -X). When started like that (radiusd -X &) it starts in a single thread and obviously the requests will await each other to finish...<div>
 <div><br><div> <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="word-wrap: break-word;">
 <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="word-wrap: break-word;">
 <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div>
 С поздрави</div><div><div style="word-wrap: break-word;"><div><br></div><div>Борислав Димитров</div><div>e-mail: <a href="mailto:b.dimitrov@ngsystems.net" target="_blank">b.dimitrov@ngsystems.net</a></div><div>GSM: 0888 51 55 45; 0889 28 54 57</div>
 NG Systems<br><div><div>Лавеле 32, ет: 4,</div><div>София, България</div></div></div></div></span><br></div></span><br></div></span><br> </div><br></div><div><div><div>On 23.12.2009, at 15:43, Borislav Dimitrov wrote:</div>
 <br></div><blockquote type="cite"><div style="word-wrap: break-word;"><div><div>In radiusd.conf:</div><div><br></div><div># THREAD POOL CONFIGURATION</div><div>thread pool {</div><div><span style="white-space: pre;"> </span>start_servers = 1</div>
 <div><span style="white-space: pre;">    </span>max_servers = 1 </div><div><span style="white-space: pre;">   </span>min_spare_servers = 1</div><div><span style="white-space: pre;">       </span>max_spare_servers = 1</div><div><span style="white-space: pre;">       </span>max_requests_per_server = 0</div>
 <div>}</div><div><br></div><div>...but instead of ones (1s) put something more appropriate for your network usage (like 5s or 7s). It's similar to Apache's thread pool settings... Stay monitoring and tuning until the error discarding duplicate packet disappears or becomes very rare. Also look at the Acct-Delay-Time parameter returned from the NAS to FR. It should be 0. If it's more than 0, then there's some delay. When you increase you thread pool settings the CPU usage will start increasing as FR starts processing more requests simultaneously/concurrently. Also check your NAS documentation for configuration options of these timeout etc parameters. For Cisco they are like that: </div>
 <blockquote type="cite"><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">"radius-server retransmit 0" etc</blockquote>
 </div></blockquote><br></div><div> <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="word-wrap: break-word;">
 <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="word-wrap: break-word;">
 <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div>
 Ð¡ Ð¿Ð¾Ð·Ð´Ñ€Ð°Ð²Ð¸</div><div><div style="word-wrap: break-word;"><div><br></div><div>БориѠлав Ð”имитров</div><div><div>e-mail: <a href="mailto:b.dimitrov@ngsystems.net" target="_blank">b.dimitrov@ngsystems.net</a></div>
 <div>GSM: 0888 51 55 45; 0889 28 54 57</div>NG Systems<br></div><div><div>Лавеле 32, ÐµÑ‚: 4,</div><div>СофиѠ, Ð‘ългариѠ</div></div></div></div></span><br></div></span><br></div></span><br> </div><br><div>
 <div><div></div><div><div>On 23.12.2009, at 15:36, Alisson wrote:</div><br></div></div><blockquote type="cite"><div><div></div><div>hi, my DB is ok I tested with another programms e etc, and is running well<br> <br>how I set the thread pool to better concurrency?<br>
<br></div></div><div class="gmail_quote"><div><div></div><div>2009/12/23 Borislav Dimitrov <span dir="ltr"><<a href="mailto:b.dimitrov@ngsystems.net" target="_blank">b.dimitrov@ngsystems.net</a>></span><br> </div></div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div>Hi,<br> <br> This question has been answered many times on this ML. I myself have (at least tried) answered it two times. Here're some of my previous messages:<br>
 <br> Msg1:<br> Hi,<br> <br> I've already tried to answer a similar question some time ago (and I'm probably not the only one) but anyways...<br> The cause of the problems probably is some delay or packet loss or something like that. Notice the Acct-Delay-Time value increasing as the NAS retries to send the "lost" accounting packet (although - at least in my case - it wasn't lost but just its processing was delayed). I've experienced such issues with Cisco VoIP routers - the router's log is flooded with RADIUS Server DEAD - and then ... ALIVE messages and in the FR log you can see the retries with the values of Acct-Delay-Time increasing. The main cause of the problem may be different, so you'll have to check it in your case. In my case it was caused by the thread pool settings not being appropriate for the load. In this case the CPU usage stays low but it's not used because you cannot achieve good concurrency and request have to await each other to finish. So find the main cause for your problems and eliminate it. The other thing is that most NASs have options to configure the RADIUS timeout, dead, retransmit etc times. E.g.for Cisco you could try "radius-server retransmit 0".<br>
 <br> Msg2:<br> Hi,<br> <br> As far as I can see, the people on the list have provided you with a lot of very useful suggestions on what could cause the problem. As I said earlier (let me clarify) and to help you narrow things a little bit - it's probably due to the RADIUS response timing out hence the NAS complains the server is dead and later when it responds finally it marks it as alive again. The reasons can be different depending on your setup - slow network, database, custom module (like rlm_perl/python etc) or as I suggested (from my personal experiences) improperly configured concurrence settings of FR itself. See which component of your setup is causing the slow responds (it can be the backend, or messed up FR configuration) and fix it. Just for completeness check your NASs manuals - most have these settings configurable - response timeouts, retransmits, marking the server as dead etc but playing with the NAS while possibly useful is probably not the main issue in your setup - check what is slowing things down.<br>
 <br> Msg3:<br> Hi there,<br> <br> I may be mistaken but... these are log message on the NAS aren't they?<br> If this is the case, I've experienced similar behavior with Cisco VoIP routers (RADIUS Server DEAD and then... ALIVE). This happens if you haven't properly enabled concurrency in FreeRADIUS - the CPU usage stays low 0%-1%-2% but if the requests are many they are obviously waiting each other... This happens when you have stared FreeRADIUS with the -X key (I think it starts with a single thread then) or have too low values for the thread pool parameters (and/or the *_clones options of rlm_perl which are to be deprecated soon). If you configure proper values according to the expected usage (concurrent requests), then the request won't wait each other to finish while the CPU stays unused and you'll avoid this annoying message in your logs. A sure sing that something like that is going on is the Acct-Delay-Time parameter with values greater than 0 - that is for accounting not sure for auth etc. Anyways if the values of that parameter are high (they are in seconds I think) then the requests are waiting too long and hence the error messages.<br>
 <br> Bottom line:<br> 1) Check the ML for more info<br> 2) The NAS can be configured when to timeout and resend the RADIUS packages<br> 3) Something is slowing down your setup. It may be the DB or something else. If your CPU usage stays low (< 5%), check your thread pool settings and increase them to achieve better concurrency.<br>
 <br> Sincerely,<br> <br> Borislav Dimitrov<br> e-mail: <a href="mailto:b.dimitrov@ngsystems.net" target="_blank">b.dimitrov@ngsystems.net</a><br> GSM: 0888 51 55 45; 0889 28 54 57<br> NG Systems<br> Lavele 32 str, fl: 4,<br>
 Sofia, Bulgaria<div><div></div><div><br> <br> <br> <br> On 23.12.2009, at 15:10, Alisson wrote:<br> <br> </div></div></div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
 <div><div></div><div><div><div></div><div> hi, in another day I posted this same error ' Error: Discarding duplicate request from client '<br> <br> and the answer was 'your database is slow'<br> <br> so I upgrade my server with more memory, and changed servers variables...<br>
 <br> but, i'm still having this problem<br> <br> and I dont know what can be<br> <br> -- <br> Att.<br></div></div> Alisson F. Gonçalves<br> Sistemas de Informação - UFGD<br></div></div><div> -<br> List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br>
 </div></blockquote><div> <br> <br> -<br> List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br> </div></blockquote> </div>
<br><br clear="all"><br>-- <br>Att.<br>Alisson F. Gonçalves<br>Sistemas de Informação - UFGD<div><br> -<br>List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a></div>
 </blockquote></div><br></div></blockquote></div><br></div></div><br>-<br> List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Att.<br>Alisson F. Gonçalves<br> Sistemas de Informação - UFGD<br> -<br>List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a></blockquote>
</div><br></div></div></div></div></div><br>-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br></blockquote></div><br><br clear="all"><br>-- <br>Att.<br>Alisson F. Gonçalves<br>
Sistemas de Informação - UFGD<br>