<div dir="auto">I use database for lots of configs. On any given first request i do around 10 queries.<div dir="auto"><br></div><div dir="auto">A while ago i measured the processing time  (using bm_timer) when i was still using MySql and got times of around 6ms per first Invite and around 2ms for other in-dialog requests.</div><div dir="auto"><br></div><div dir="auto">While i think those are big processing times, i don't think they should be the problem at a rate as low as 20CPS.</div><div dir="auto"><br></div><div dir="auto">Thank you for your help :) </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">A quarta, 27/02/2019, 18:35, Duarte Rocha <<a href="mailto:duarterocha91@gmail.com">duarterocha91@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Ok, i reduced the number of processes and tried a few different values, but the performance hasn't changed a lot.<div dir="auto"><br></div><div dir="auto">How can i debug this and find the bottleneck in my system? </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">A quarta, 27/02/2019, 17:56, Duarte Rocha <<a href="mailto:duarterocha91@gmail.com" target="_blank" rel="noreferrer">duarterocha91@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Greetings Alex,<div dir="auto"><br></div><div dir="auto">At the moment i'm trying to debug some issues with the server and try some solutions to see the impact. </div><div dir="auto">With little load i'm getting some percentage of "503 Server Unavaliable" errors from Kamailio. I made some testing without using database for anything but Dispatcher and Accounting and the performance got way better.</div><div dir="auto"><br></div><div dir="auto">Right now, on this server, under as little as 20CPS Kamailio is returning "503" on 1-2% of all calls. However, my CPU and Memory look like this: </div><div dir="auto"><br></div><div dir="auto">%Cpu(s): 20.3 us,  6.1 sy,  0.0 ni, 73.3 id,  0.0 wa,  0.0 hi,  0.2 si,  0.2 st</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Memory : </div><div dir="auto"><br></div><div dir="auto">              total        used        free      shared  buff/cache   available</div><div dir="auto">Mem:           1830        1172         382         109         274         375</div><div dir="auto">Swap:           819          49         770</div><div dir="auto"><br></div><div dir="auto">I have around 100 processes for Kamailio.</div><div dir="auto"><br></div><div dir="auto">Cheers</div></div>
</blockquote></div>
</blockquote></div>