[asterisk-dev] [Code Review] Rate limit astdb->sync() calls
sst at sil.at
sst at sil.at
Tue Sep 7 18:44:33 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 ;)
> >
>
> schmidts wrote:
> 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 wrote:
> without my patch from issue 17912 the 20k peer register test brakes down after 15k peers. with this patch it runs really smooth:
>
> rasterisk -x"sip show peers" | tail
> user9993/user9993 x.x.x.x D N 5060 OK (2 ms)
> user9994/user9994 x.x.x.x D N 5060 OK (2 ms)
> user9995/user9995 x.x.x.x D N 5060 OK (5 ms)
> user9996/user9996 x.x.x.x D N 5060 OK (9 ms)
> user9997/user9997 x.x.x.x D N 5060 OK (1 ms)
> user9998/user9998 x.x.x.x D N 5060 OK (1 ms)
> user9999/user9999 x.x.x.x D N 5060 OK (5 ms)
> 20015 sip peers [Monitored: 20000 online, 0 offline Unmonitored: 15 online, 0 offline]
> w
> 23:04:22 up 12 days, 7:59, 2 users, load average: 0,36, 0,29, 0,17
>
> i will try tomorrow the output of my testdb app with plain 1.6.2 astdb to show the power increase with this.
>
after 20 mins and only 85000 runs out of 1 million i stop the test and really try it tomorrow again ;)
- 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