[asterisk-dev] [Code Review] Rate limit astdb->sync() calls

sst at sil.at sst at sil.at
Tue Sep 7 15:32:36 CDT 2010



> On 2010-09-07 14:39:06, schmidts wrote:
> > sorry i havent seen your latest changes.
> > 
> > i will have a closer look at this, cause its not so easy to test the performance. if its just depending on 1k or even 10k entries its fast as hell (25 usec for each astdb_put) but this would only take up to 20 ms or 200 ms for 10k and its still below the first fsync usleep cycle ;)
> >

i will take a sipp test tomorrow to see the impact on call handling/register but it looks really good so far:

TESTDB RESULT: Overall Time: 26005514us
Writing 1000000 Entries to Astdb tooks 12625184 usec
Deleting 1000000 Entries from Astdb tooks 12577738 usec
WRITE:   avg time: 12.000000 usec        max time: 35371 usec    min time: 10 usec       longer than min+10us: 3894      min+100us: 133
DEL:     avg time: 12.000000 usec        max time: 283213 usec   min time: 10 usec       longer than min+10us: 4008      min+100us: 138
the max time happens when a astdb_put or del hits the fsync but atleast there are only 0,004% calls which tooks longer than 20 usec and only 0,00013 % which tooks longer than 110us. 


- schmidts


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/825/#review2691
-----------------------------------------------------------


On 2010-09-07 13:43:48, Russell Bryant wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/825/
> -----------------------------------------------------------
> 
> (Updated 2010-09-07 13:43:48)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> There has been a discussion going on about astdb performance on the -dev list.  This patch implements rate limiting on astdb->sync() executions.  It will ensure that it will not get called any more often than twice a second.  It is being posted here so that it can be tested to see if it makes a difference in the test scenario.
> 
> 
> Diffs
> -----
> 
>   /branches/1.6.2/main/db.c 285234 
> 
> Diff: https://reviewboard.asterisk.org/r/825/diff
> 
> 
> Testing
> -------
> 
> I have not tested this.  I'm posting it here in hopes that Stefan Schmidt will be able to test this and compare it against the results he got before.
> 
> 
> Thanks,
> 
> Russell
> 
>




More information about the asterisk-dev mailing list